Answer the question
In order to leave comments, you need to log in
How is message data stored in the database?
Are they all stored in a separate table linked to the user?
Answer the question
In order to leave comments, you need to log in
It depends on who writes how.
Of course, it is correct to store separately.
Separately. User bound. Usually one user can write several messages.
I store it like this:
id integer Auto Increment
chat_id integer
user_id integer
body text
created_at timestamp(0) NULL
updated_at timestamp(0) NULL
Just for the record - OLTP is not the right place to store messages. A more document-oriented database is more suitable here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question