4 ms·
I have a lot of experience with ORMs (the Django one in particular). I'm having a hard time finding a quick overview of how Prisma's model is different. Are the
by wiremine 6y ago
I have a lot of experience with ORMs (the Django one in particular). I'm having a hard time finding a quick overview of how Prisma's model is different. Are there any good overviews of the similarities and differences?
- nikolasburk 6y agoI think one very common characteristic of most ORMs is that tables are defined in terms of classes (often called models). You then instantiate these classes to work with the model instances for data storage and retrieval. Prisma takes a fundamentally different approach by generating a database client that returns plain old JS objects. We've written more extensively about this topic in the docs: https://www.prisma.io/docs/understand-prisma/why-prisma https://www.prisma.io/docs/understand-prisma/why-prisma
- 2color 6y agoDaniel from the Prisma team here. Both Prisma and ORMs abstract away from SQL and let you "think in objects". However, how they do that is different. With ORMs, you typically map tables to model classes With Prisma, the focus is on queries and structural typing; queries return plain objects that are fully typed based on the query. For a broader comparison with ORMs, check out the documentation page about why Prisma is not an ORM: https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/is-prisma-an-orm https://www.prisma.io/docs/understand-prisma/prisma-in-your-...
- wiremine 6y agoCool, thank you very much!