-
Notifications
You must be signed in to change notification settings - Fork 1
/
Database Schema.sql
48 lines (47 loc) · 1.17 KB
/
Database Schema.sql
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
36
37
38
39
40
41
42
43
44
45
46
47
48
create database ampify;
use ampify;
create table userdata(
username varchar(30) primary key,
password varchar(20) not null,
firstname varchar(20) not null,
lastname varchar(20) not null,
email varchar(30) not null unique
);
create table allsongs(
songname varchar(50) primary key,
playcount int,
language varchar(20),
artist varchar (40),
genre varchar(30),
timeadded timestamp(6)
);
create table playlists(
username varchar(30) not null,
playlistname varchar(50) not null
);
create table songsinplaylists(
username varchar(30) not null,
playlistname varchar(50) not null,
songname varchar(50) not null
);
create table userplayedcount(
username varchar(30) not null,
songname varchar(50) not null unique,
artist varchar(40) not null,
playcount int not null
);
create table recentlyplayed(
username varchar(30) not null,
songname varchar(50) not null,
artist varchar(40) not null,
timeplayed timestamp(6) not null
);
create table userhistory(
username varchar(50) not null,
songname varchar(50) not null,
timeplayed timestamp(6) not null
);
create table likedsongs(
username varchar(30) not null,
songname varchar(50) not null
);