Keith#1141
Keith#1141
PPrisma
Created by Keith#1141 on 9/3/2024 in #help-and-questions
Clarification on Prisma and DB Congruence
Dear Prisma Support Staff, I hope this message finds you well! I am a Software Engineering student currently using Prisma and have some clarifications to make. I have read in the documentation that the Prisma Schema is the single source of truth and it can either be pushed or migrated to the backend to construct the backend, or if the backend has already constructed Prisma may introspect the backend to construct the schema. Thus, it is my understanding that the Prisma schema follows a similar configuration to the database records. This goes against information that has also be asserted upon me. I had been told that the Prisma models and the database should not be similar and that Prisma should retrieve the records from the db and reconstruct them again to match their own models. Here is an example: DB Table 1 has a username field DB Table 2 has a password field The backend retrieves both and reconstructs them together to match the Prisma object - User. This interferes with my understanding of Prisma migration/introspection which ensures that the schema and db are kept in sync. Thank you for your assistance in the matter and I look forward to your speedy reply! Sincerely, Keith Software Engineering Student
7 replies