W
W
WarriorKodeK2018-03-30 18:36:17
Database design
WarriorKodeK, 2018-03-30 18:36:17

How to properly design a base?

Guys help design a database.
I have an idea to create a music network where you can

  • register
  • create playlists
  • add songs to it
  • add comments
  • like.

My playlist will store songs, you can vote for playlists.
The only thing I don't know is how to define foreign key for tables. Essentially the Playlist table should be connected to Song and User , Comments should be connected to User and Playlist . That's what I have now - Thank you very much!!
5abe5ced8277c125218569.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
idShura, 2018-03-30
@WarriorKodeK

give me a link to the diagram...
upd1
upd2
votes should be made into a separate table (by analogy with Comments).
Add the "Name" field to the Playlist table.
To the Comments table Add a field for the date and time of the comment.
Perhaps you need to add tables "Album", "Artist".
The Song table is clearly not complete, more fields need to be added.
The User table is clearly not complete, more fields need to be added.
etc.
upd3
Perhaps it is necessary to provide for the possibility for users to save their favorite playlists.
Create new playlists from existing ones.
etc.
In general, you still have a lot of work, good luck.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question