How should I structure my database?

-1

I'm studying MySQL and I have a user system. When the user logs into the account, he or she can create notes. I imagine the table of the user straight, but what about the notes? Should I create a table just for them and use foreign keys? What do I do?

    
asked by anonymous 06.06.2018 / 07:47

1 answer

0

It would be interesting in the annotations table to have a foreign key for the user table, so you know that annotation belongs to that user, ie in the annotations table you would have a column id_user containing the id of that user who made the annotation, so all annotations containing that id have that user. I hope I have helped!

    
06.06.2018 / 15:14