Consistency on the design of a messaging app database

Viewed 14

I'm currently designing a database to a personal project. It's still very simple, here's the model.

Basically, the issue i'm having is to decide the most consistent approach: Is it better to have the id of the user who sent the message and the id of the user who received the same message on the messages table (as shown in the image), or it is better to point, at the messages table, if the sender user is the user 1 or 2, using some sort of enum, referencing the chats table? Also, are there any better approachs than these two?

0 Answers
Related