-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_diagram.io
35 lines (30 loc) · 838 Bytes
/
db_diagram.io
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Table songs {
SONG_ID varchar [primary key]
SONG_NAME varchar
DURATION_MS number
URL varchar
ALBUM_ID varchar
ARTIST_ID varchar
}
Table artists {
ARTIST_ID varchar [primary key]
ARTIST_NAME varchar
EXTERNAL_URL varchar
}
Table albums {
ALBUM_ID varchar [primary key]
ALBUM_NAME varchar
RELEASE_DATE DATE
TOTAL_TRACKS integer
URL varchar
}
Table weekly_hits {
id integer [primary key]
SONG_ID varchar
WEEKLY_RANK number
POPULARITY number
SONG_ADDED date
}
ref : artists.ARTIST_ID < songs.ARTIST_ID
ref : albums.ALBUM_ID < songs.ALBUM_ID
ref : weekly_hits.SONG_ID > songs.SONG_ID