postgres
How should I design my database schema and store the chats?
Right now I made a table with
Id
Createdat
Content (json)
Senderid (uuid foreign key)
Reciverid (uuid foreign key)
I was thinking of storing each message as a separate row but Idk if this is how it's done... Any guidance or resources will be helpful
Yeah, in an RDBMS you want to stick to normalized forms as much as you can, and later denormalize where you find performance issues.
Обсуждают сегодня