C
C
ClaraOswald2017-02-28 14:08:00
Database
ClaraOswald, 2017-02-28 14:08:00

How to make the messaging system better?

I had a dilemma about how best to implement the message system.
There are two options.
The first one is three tables dialogList, dialogUsers and dialogMessages
dialogList:
id, type, name, owner
dialogUsers:
id, idDialog, status
dialogMessages:
id, idDialog, idUser, message
The second one is two tables dialogList and dialogMessages
dialogList:
id, type, name, owner , users(json object with list of users)
dialogMessages:
id, idDialog, idUser, message
question which system is better? which one to use and why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Bukharev, 2017-02-28
@evgenybuckharev

Designing a database schema for a messaging system?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question