Answer the question
In order to leave comments, you need to log in
What is the best way to create a base?
Good afternoon! There is such a task. Create a kind of social network in which you can register. You can add your notes to your profile. (well, editing, deleting, of course, too). But there is also a trick that this object (that is, a note) can be sent to another registered user. The question is this. you need to start in any way from the base, so that's what the structure should be like. Well, there is a User table with some attributes there, there is a Note table with attributes. The relationship is one-to-many. But how to display this transfer of notes?
Answer the question
In order to leave comments, you need to log in
Author - a field in the note, to whom it was sent - many-to-many if it is possible to send to several users. Optionally with the "new" status, which is reset when the user reads the note. Then there will be a relation table (user_id, note_id, is_seen) with a primary key (user_id, note_id).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question