---
# System prepended metadata

title: Basis Data - Kelompok 5 - TK 3

---

# SHERYL

## 1. AKUN
CREATE TABLE AKUN (
    email VARCHAR(50) PRIMARY KEY,
    password VARCHAR(50) NOT NULL,
    nama VARCHAR(100) NOT NULL,
    gender INT NOT NULL CHECK (gender IN (0, 1)),
    tempat_lahir VARCHAR(50) NOT NULL,
    tanggal_lahir DATE NOT NULL,
    is_verified BOOLEAN NOT NULL,
    kota_asal VARCHAR(50) NOT NULL
);


CREATE TABLE AKUN (
    "email" TEXT,
    "password" TEXT,
    "nama" TEXT,
    "gender" INT,
    "tempat_lahir" TEXT,
    "tanggal_lahir" TIMESTAMP,
    "is_verified" TEXT,
    "kota_asal" TEXT
);
INSERT INTO AKUN VALUES ('user1@mail.com','password1','Budi Santoso',1,'Jakarta','1990-05-15 00:00:00','True','Jakarta'),
	('user2@mail.com','password2','Siti Rahayu',0,'Bandung','1988-09-22 00:00:00','True','Bandung'),
	('user3@mail.com','password3','Ahmad Gunawan',1,'Surabaya','1995-03-10 00:00:00','True','Surabaya'),
	('user4@mail.com','password4','Dewi Lestari',0,'Yogyakarta','1992-11-28 00:00:00','True','Yogyakarta'),
	('user5@mail.com','password5','Rudi Hidayat',1,'Semarang','1985-07-03 00:00:00','True','Semarang'),
	('user6@mail.com','password6','Lina Marwah',0,'Medan','1997-01-20 00:00:00','True','Medan'),
	('user7@mail.com','password7','Iwan Setiawan',1,'Malang','1983-12-05 00:00:00','True','Malang'),
	('user8@mail.com','password8','Rina Anggraini',0,'Bandung','1993-08-17 00:00:00','True','Bandung'),
	('user9@mail.com','password9','Adi Nugroho',1,'Surabaya','1998-04-25 00:00:00','True','Surabaya'),
	('user10@mail.com','password10','Yuni Sari',0,'Yogyakarta','1987-06-30 00:00:00','True','Yogyakarta'),
	('user11@mail.com','password11','Firman Wijaya',1,'Jakarta','1991-02-18 00:00:00','True','Jakarta'),
	('user12@mail.com','password12','Ratna Sari',0,'Bandung','1986-10-12 00:00:00','True','Bandung'),
	('user13@mail.com','password13','Ani Fitriani',1,'Surabaya','1994-09-05 00:00:00','True','Surabaya'),
	('user14@mail.com','password14','Hendra Saputra',0,'Medan','1989-03-28 00:00:00','True','Medan'),
	('user15@mail.com','password15','Rina Dewi',1,'Yogyakarta','1996-07-15 00:00:00','True','Yogyakarta'),
	('user16@mail.com','password16','Agus Suryanto',0,'Surabaya','1990-11-03 00:00:00','True','Surabaya'),
	('user17@mail.com','password17','Sari Wulandari',1,'Bandung','1984-05-20 00:00:00','True','Bandung'),
	('user18@mail.com','password18','Budiarto',0,'Jakarta','1992-01-08 00:00:00','True','Jakarta'),
	('user19@mail.com','password19','Eka Putra',1,'Surabaya','1997-04-17 00:00:00','True','Surabaya'),
	('user20@mail.com','password20','Lina Susanti',0,'Bandung','1988-08-22 00:00:00','True','Bandung'),
	('user21@mail.com','password21','Wahyu Kurniawan',1,'Surabaya','1993-02-13 00:00:00','True','Surabaya'),
	('user22@mail.com','password22','Siti Nurhayati',0,'Medan','1985-06-10 00:00:00','True','Medan'),
	('user23@mail.com','password23','Budi Santoso',1,'Jakarta','1996-09-07 00:00:00','True','Jakarta'),
	('user24@mail.com','password24','Dewi Lestari',0,'Bandung','1989-03-02 00:00:00','True','Bandung'),
	('user25@mail.com','password25','Rudi Hidayat',1,'Surabaya','1994-12-19 00:00:00','True','Surabaya'),
	('user26@mail.com','password26','Nurul Hidayah',0,'Yogyakarta','1987-04-14 00:00:00','True','Yogyakarta'),
	('user27@mail.com','password27','Dwi Susanto',1,'Surabaya','1991-10-09 00:00:00','True','Surabaya'),
	('user28@mail.com','password28','Dian Suryani',0,'Jakarta','1986-02-27 00:00:00','True','Jakarta'),
	('user29@mail.com','password29','Ratna Puspitasari',1,'Bandung','1995-05-24 00:00:00','True','Bandung'),
	('user30@mail.com','password30','Wahyu Setiawan',0,'Surabaya','1983-08-07 00:00:00','True','Surabaya'),
	('user31@mail.com','password31','Ani Susilowati',1,'Surabaya','1990-11-14 00:00:00','True','Surabaya'),
	('user32@mail.com','password32','Surya Wijaya',0,'Bandung','1984-07-01 00:00:00','True','Bandung'),
	('user33@mail.com','password33','Dewi Handayani',1,'Jakarta','1997-01-28 00:00:00','True','Jakarta'),
	('user34@mail.com','password34','Budi Susanto',0,'Surabaya','1988-04-05 00:00:00','True','Surabaya'),
	('user35@mail.com','password35','Rini Astuti',1,'Bandung','1993-09-22 00:00:00','True','Bandung'),
	('user36@mail.com','password36','Rani Cahyani',0,'Bandung','1989-06-15 00:00:00','False','Bandung'),
	('user37@mail.com','password37','Ahmad Hidayat',1,'Surabaya','1992-12-30 00:00:00','False','Surabaya'),
	('user38@mail.com','password38','Ratna Dewi',0,'Jakarta','1995-05-17 00:00:00','False','Jakarta'),
	('user39@mail.com','password39','Surya Wijaya',1,'Bandung','1986-08-03 00:00:00','False','Bandung'),
	('user40@mail.com','password40','Rina Novianti',0,'Surabaya','1991-01-20 00:00:00','False','Surabaya'),
	('user41@mail.com','password41','Dewi Lestari',1,'Jakarta','1994-04-10 00:00:00','False','Jakarta'),
	('user42@mail.com','password42','Budi Santoso',0,'Surabaya','1988-07-27 00:00:00','False','Surabaya'),
	('user43@mail.com','password43','Ratna Sari',1,'Bandung','1993-11-14 00:00:00','False','Bandung'),
	('user44@mail.com','password44','Yuni Susanti',0,'Jakarta','1985-03-01 00:00:00','False','Jakarta'),
	('user45@mail.com','password45','Surya Wijaya',1,'Surabaya','1998-06-18 00:00:00','False','Surabaya'),
	('user46@mail.com','password46','Ani Wijaya',0,'Bandung','1987-09-05 00:00:00','False','Bandung'),
	('user47@mail.com','password47','Surya Nugraha',1,'Jakarta','1990-12-22 00:00:00','False','Jakarta'),
	('user48@mail.com','password48','Dewi Lestari',0,'Surabaya','1996-02-09 00:00:00','False','Surabaya'),
	('user49@mail.com','password49','Budi Santoso',1,'Bandung','1984-05-26 00:00:00','False','Bandung'),
	('user50@mail.com','password50','Siti Rahayu',0,'Jakarta','1997-08-13 00:00:00','False','Jakarta');


![Screen Shot 2024-04-26 at 20.42.10](https://hackmd.io/_uploads/r1ZrxVtW0.png)


## 2. PAKET
CREATE TABLE PAKET (
    jenis VARCHAR(50) PRIMARY KEY,
    harga INT NOT NULL
);


CREATE TABLE PAKET (
    "jenis" TEXT,
    "harga" INT
);
INSERT INTO PAKET VALUES ('1 BULAN',50000),
	('3 BULAN',140000),
	('6 BULAN',245000),
	('1 TAHUN',550000);
    

![Screen Shot 2024-04-26 at 20.47.52](https://hackmd.io/_uploads/BJUclVtb0.png)



## 3. TRANSACTION
CREATE TABLE TRANSACTION (
    id UUID PRIMARY KEY,
    jenis_paket VARCHAR(50),
    email VARCHAR(50),
    timestamp_dimulai TIMESTAMP NOT NULL,
    timestamp_berakhir TIMESTAMP NOT NULL,
    metode_bayar VARCHAR(50) NOT NULL,
    nominal INT NOT NULL,
    FOREIGN KEY (jenis_paket) REFERENCES paket(jenis),
    FOREIGN KEY (email) REFERENCES akun(email)
);


CREATE TABLE TRANSACTION (
    "id" TEXT,
    "jenis_paket" TEXT,
    "email" TEXT,
    "timestamp_dimulai" TIMESTAMP,
    "timestamp_berakhir" TIMESTAMP,
    "metode_bayar" TEXT,
    "nominal" INT
);

INSERT INTO TRANSACTION VALUES ('169a2a89-0272-40fe-8967-e73a4135a8ad','1 BULAN','user36@mail.com','2024-04-25 00:00:00','2024-05-25 00:00:00','Transfer Bank',50000),
	('0605d077-6adf-4e20-bac6-d6cbf6498804','3 BULAN','user37@mail.com','2024-04-25 00:00:00','2024-07-25 00:00:00','Kartu Kredit',140000),
	('53d56bb5-cd05-4601-9269-b9db58d439d3','6 BULAN','user38@mail.com','2024-04-25 00:00:00','2024-10-25 00:00:00','Transfer Bank',245000),
	('d6bd5e93-320d-4f7c-a991-92cf07d71304','1 TAHUN','user39@mail.com','2024-04-25 00:00:00','2025-04-25 00:00:00','Kartu Kredit',550000),
	('f97fe920-1db4-455d-b84f-134a7cb56f51','3 BULAN','user1@mail.com','2024-04-25 00:00:00','2024-05-25 00:00:00','Transfer Bank',50000);

![Screen Shot 2024-04-26 at 20.48.31](https://hackmd.io/_uploads/rkC2xEKZR.png)


## 4. PREMIUM
ALTER TABLE AKUN
ADD COLUMN email VARCHAR(50) PRIMARY KEY,
ADD CONSTRAINT fk_akun_email FOREIGN KEY (email) REFERENCES akun(email);


CREATE TABLE PREMIUM (
    "email" TEXT
);
INSERT INTO PREMIUM VALUES ('user36@mail.com'),
	('user37@mail.com'),
	('user38@mail.com'),
	('user39@mail.com'),
	('user1@mail.com');
    
    ![Screen Shot 2024-04-26 at 20.49.00](https://hackmd.io/_uploads/HJ9Cg4tbR.png)


## 5. NON PREMIUM
CREATE TABLE NONPREMIUM (
    email VARCHAR(50) PRIMARY KEY,
    FOREIGN KEY (email) REFERENCES akun(email)
);

CREATE TABLE NONPREMIUM (
    "email" TEXT
);
INSERT INTO NONPREMIUM VALUES ('user40@mail.com'),
	('user41@mail.com'),
	('user42@mail.com'),
	('user43@mail.com'),
	('user44@mail.com'),
	('user45@mail.com'),
	('user46@mail.com'),
	('user47@mail.com'),
	('user48@mail.com'),
	('user49@mail.com'),
	('user50@mail.com'),
	('user2@mail.com'),
	('user3@mail.com'),
	('user4@mail.com'),
	('user5@mail.com'),
	('user6@mail.com'),
	('user7@mail.com'),
	('user8@mail.com'),
	('user9@mail.com'),
	('user10@mail.com'),
	('user11@mail.com'),
	('user12@mail.com'),
	('user13@mail.com'),
	('user14@mail.com'),
	('user15@mail.com');

![Screen Shot 2024-04-26 at 20.49.32](https://hackmd.io/_uploads/S1sx-NYb0.png)


## 6. KONTEN
CREATE TABLE KONTEN (
    id UUID PRIMARY KEY,
    judul VARCHAR(100) NOT NULL,
    tanggal_rilis DATE NOT NULL,
    tahun INT NOT NULL,
    durasi INT NOT NULL -- Menit
);

CREATE TABLE KONTEN (
    "id" TEXT,
    "judul" TEXT,
    "tanggal_rilis" TIMESTAMP,
    "tahun" INT,
    "durasi" INT
);
INSERT INTO KONTEN VALUES ('4cbb466d-6e94-443e-b1b2-0902c1264c24','LAGU-01','2002-08-17 00:00:00',2002,4),
	('dd90e93c-cb04-4094-88eb-318d01551cc6','LAGU-02','2005-11-29 00:00:00',2005,3),
	('2c509250-02dc-45aa-8172-ee5c7d437851','LAGU-03','2007-04-05 00:00:00',2007,2),
	('e037340a-c24a-4ea9-99f5-2311dd52416b','LAGU-04','2010-09-23 00:00:00',2010,1),
	('6538c0b5-4e16-4f9d-b08d-16d1e00557e4','LAGU-05','2001-06-11 00:00:00',2001,2),
	('7df11ce8-f4bc-4ba7-81ee-b43cead2f5f4','LAGU-06','2013-12-18 00:00:00',2013,2),
	('4f4c0e2c-23d0-45fc-a9a9-3477fe439451','LAGU-07','2017-08-31 00:00:00',2017,2),
	('b6d8e324-02ce-49dc-b0cf-2136d61b0572','LAGU-08','2008-03-20 00:00:00',2008,5),
	('1904beab-d05a-405b-81ca-b003a39e1187','LAGU-09','2011-02-07 00:00:00',2011,5),
	('dae2cda4-3858-42fc-aa01-4ec538a48c47','LAGU-10','2006-10-12 00:00:00',2006,5),
	('6b108d0e-a87f-40e5-9cac-807530412375','LAGU-11','2004-01-26 00:00:00',2004,3),
	('c752fab5-9d70-4ab1-ac0a-5d4502eccead','LAGU-12','2000-12-09 00:00:00',2000,1),
	('c62ba12d-f5d0-45ae-a899-efaef142a241','LAGU-13','2022-05-27 00:00:00',2022,5),
	('e714a288-ed4c-432c-9066-288c03cb58d1','LAGU-14','2018-06-02 00:00:00',2018,3),
	('423a0ff6-0abf-40b3-884e-16c0fe4cb5fc','LAGU-15','2003-09-14 00:00:00',2003,3),
	('1f99f099-c7a5-49ef-b71f-9507b55982a7','LAGU-16','2015-07-08 00:00:00',2015,3),
	('2c4d2903-8975-484b-b18f-283d46112985','LAGU-17','2016-04-16 00:00:00',2016,5),
	('749612cc-6271-4d47-ad73-70fb642068bb','LAGU-18','2012-11-03 00:00:00',2012,5),
	('d7d2eab3-ff4d-4e5a-9652-7b357090cddc','LAGU-19','2021-02-12 00:00:00',2021,1),
	('c48d873d-ccd4-4689-80db-5b451f8cf2a9','LAGU-20','2019-10-29 00:00:00',2019,5),
	('9770afea-4d1c-4713-93bd-4788353bd946','LAGU-21','2009-05-26 00:00:00',2009,3),
	('38b7edd7-7957-47e6-b02c-96c043e47cb5','LAGU-22','2000-02-25 00:00:00',2000,3),
	('513f1388-3cde-4607-9fb0-13016a5f2eb9','LAGU-23','2014-01-05 00:00:00',2014,3),
	('bdd646f2-dc41-4b81-8ed0-9faa26050b2a','LAGU-24','2023-08-09 00:00:00',2023,1),
	('c09ec1eb-8505-4a14-ae60-9a0eb05e5045','LAGU-25','2002-07-21 00:00:00',2002,2),
	('e8e85403-4be7-4b83-bc45-b62cf705ca44','LAGU-26','2008-12-13 00:00:00',2008,5),
	('3bc64cae-c842-4918-bb33-2b1c6cadc64b','LAGU-27','2011-09-04 00:00:00',2011,4),
	('8de5ca28-50e0-4500-8336-a0f3a6ceddcc','LAGU-28','2003-04-29 00:00:00',2003,2),
	('33a93943-73ec-49cc-ab7d-6830de79deb8','LAGU-29','2001-11-02 00:00:00',2001,4),
	('26c1e2b6-fe1f-4ddc-886b-2f3053f17648','LAGU-30','2006-06-17 00:00:00',2006,3),
	('39ce4ced-4018-41b6-b389-09b0dc74cd41','LAGU-31','2017-03-25 00:00:00',2017,1),
	('fe02f97a-76c8-473a-a3ac-953360810c3d','LAGU-32','2019-12-30 00:00:00',2019,1),
	('4c325519-9a63-48a9-8487-6ca011c6867b','LAGU-33','2004-08-03 00:00:00',2004,4),
	('e8a730a1-9eb8-4445-88a5-6ac8d398cda5','LAGU-34','2010-01-18 00:00:00',2010,4),
	('9ea0d6cc-3fe6-4ff2-8d4f-a21dccd8c313','LAGU-35','2016-10-21 00:00:00',2016,2),
	('597aef0b-91c9-4b5e-a4e3-22e9e0b10685','LAGU-36','2022-10-07 00:00:00',2022,4),
	('a35dab31-47fc-44e5-b09d-27173ca60079','LAGU-37','2012-05-02 00:00:00',2012,2),
	('06a8b33b-3810-4b52-ac7c-6bf913d53ed0','LAGU-38','2018-08-16 00:00:00',2018,3),
	('ade564b4-c21c-46c4-a250-d91aec1c22c1','LAGU-39','2005-03-01 00:00:00',2005,3),
	('be9f60ba-c106-4b2c-a096-75ca110bda7c','LAGU-40','2007-12-08 00:00:00',2007,2),
	('2647c396-cf8e-4985-bb4e-9400c9e97bda','LAGU-41','2009-09-11 00:00:00',2009,1),
	('4ff2421c-03a5-4ac0-b13b-cc3078c92162','LAGU-42','2015-02-23 00:00:00',2015,2),
	('201bfae6-92ce-4f4f-a448-33a04298a7f1','LAGU-43','2020-06-15 00:00:00',2020,4),
	('0408d119-7f5f-48c6-b4da-678fb1833abb','LAGU-44','2000-07-05 00:00:00',2000,3),
	('dc63fb96-9bab-4d6c-b933-95c9499982b0','LAGU-45','2013-10-07 00:00:00',2013,5),
	('188157ee-feee-48ac-a08a-6e2cd227f141','LAGU-46','2014-07-20 00:00:00',2014,3),
	('d2b24788-98c6-4374-9970-aefd083600e8','LAGU-47','2011-12-27 00:00:00',2011,4),
	('4db16b13-73bc-4614-8965-b7a25d560b48','LAGU-48','2002-04-11 00:00:00',2002,2),
	('6b355f6a-7c3c-4f0d-9ff9-b2cd962730bb','LAGU-49','2004-11-30 00:00:00',2004,2),
	('ff863281-1df8-400e-94b5-d165813293ee','LAGU-50','2016-01-14 00:00:00',2016,1),
	('0ce6025d-d24b-40e3-8e06-76bb28af0f41','PODCAST-01','2018-09-28 00:00:00',2018,99),
	('9f9bd544-2f98-4569-a27f-14a6e8f40e0a','PODCAST-02','2003-06-06 00:00:00',2003,60),
	('16bafb3d-35cf-4b27-88e9-17c30bde60c0','PODCAST-03','2008-02-19 00:00:00',2008,94),
	('a015f561-4d2a-4ba6-9586-718feaa3bcf3','PODCAST-04','2001-08-15 00:00:00',2001,92),
	('d4945698-38dd-46fa-a92b-444aefb304da','PODCAST-05','2010-04-04 00:00:00',2010,96);




![Screen Shot 2024-04-26 at 20.51.05](https://hackmd.io/_uploads/H1hO-4YZR.png)






# NABIEL
## 7. Membuat table genre
CREATE TABLE GENRE (
    id_konten UUID,
    genre VARCHAR(50),
    FOREIGN KEY (id_konten) REFERENCES KONTEN(id),
    PRIMARY KEY (id_konten, genre)
);

INSERT INTO GENRE VALUES ('4cbb466d-6e94-443e-b1b2-0902c1264c24','Pop'),
	('4cbb466d-6e94-443e-b1b2-0902c1264c24','Rock'),
	('dd90e93c-cb04-4094-88eb-318d01551cc6','Rock'),
	('2c509250-02dc-45aa-8172-ee5c7d437851','Hip-Hop'),
	('e037340a-c24a-4ea9-99f5-2311dd52416b','Jazz'),
	('6538c0b5-4e16-4f9d-b08d-16d1e00557e4','Country'),
	('7df11ce8-f4bc-4ba7-81ee-b43cead2f5f4','Reggae'),
	('4f4c0e2c-23d0-45fc-a9a9-3477fe439451','R&B'),
	('0ce6025d-d24b-40e3-8e06-76bb28af0f41','Horror'),
	('9f9bd544-2f98-4569-a27f-14a6e8f40e0a','Comedy');


## 8. Podcaster
CREATE TABLE PODCASTER(
    email varchar(50) PRIMARY KEY,
    FOREIGN KEY (email) REFERENCES AKUN(email)
);

INSERT INTO PODCASTER VALUES ('user1@mail.com'),
	('user2@mail.com'),
	('user3@mail.com'),
	('user4@mail.com'),
	('user5@mail.com'),
	('user6@mail.com'),
	('user7@mail.com'),
	('user8@mail.com'),
	('user9@mail.com'),
	('user10@mail.com');

## 9. Podcast
CREATE TABLE PODCAST(
    id_konten UUID PRIMARY KEY,
    email_podcaster varchar(50),
    FOREIGN KEY (id_konten) REFERENCES KONTEN(id)
); 

INSERT INTO PODCAST VALUES ('0ce6025d-d24b-40e3-8e06-76bb28af0f41','user1@mail.com'),
	('9f9bd544-2f98-4569-a27f-14a6e8f40e0a','user2@mail.com'),
	('16bafb3d-35cf-4b27-88e9-17c30bde60c0','user3@mail.com'),
	('a015f561-4d2a-4ba6-9586-718feaa3bcf3','user4@mail.com'),
	('d4945698-38dd-46fa-a92b-444aefb304da','user5@mail.com');


## 10. Episode
CREATE TABLE EPISODE(
    id_episode UUID PRIMARY KEY,
    id_konten_podcast UUID,
    judul varchar(100) NOT NULL,
    deskripsi varchar(500) NOT NULL,
    durasi INT NOT NULL,
    tanggal_rilis DATE NOT NULL,
    FOREIGN KEY (id_konten_podcast) REFERENCES PODCAST(id_konten)
);

INSERT INTO EPISODE VALUES ('2253411a-19bd-4fcc-8f7f-a1b1b3720a26','0ce6025d-d24b-40e3-8e06-76bb28af0f41','EPISODE_01_1','Sebuah rumah tua yang konon dihantui di pinggiran kota. Ketika seorang keluarga baru pindah ke rumah tersebut, mereka mulai mengalami peristiwa mengerikan yang mengubah hidup mereka selamanya.',25,'2018-09-28 00:00:00'),
	('51ead705-e877-4234-b8f2-806a132f820d','0ce6025d-d24b-40e3-8e06-76bb28af0f41','EPISODE_01_2','Sekelompok teman yang memutuskan untuk berkemah di hutan terpencil. Namun, apa yang dimulai sebagai liburan yang menyenangkan berubah menjadi mimpi buruk ketika mereka menemukan sebuah kehadiran gelap yang mengintai di antara pepohonan.',25,'2018-09-30 00:00:00'),
	('e3c8393d-e93f-47d1-801a-c1b898a97159','0ce6025d-d24b-40e3-8e06-76bb28af0f41','EPISODE_01_3','Sebuah toko barang antik yang gelap dan misterius. Seorang kolektor antik menemukan sebuah boneka kuno yang dianggap berhantu. Ketika dia membawanya pulang, kejadian aneh mulai terjadi di sekitar rumahnya.',25,'2018-10-02 00:00:00'),
	('e5868d47-bb5f-4018-977d-bacf7e860afc','9f9bd544-2f98-4569-a27f-14a6e8f40e0a','EPISODE_02_1','Di tengah hutan belantara, seorang petualang menemukan reruntuhan kuno yang tersembunyi di balik pepohonan rimbun. Dia merasakan campuran antara kegembiraan dan ketegangan saat ia menyusuri lorong-lorong gelap yang dipenuhi oleh serpihan-serpihan zaman kuno.',82,'2003-06-06 00:00:00'),
	('27c63c0e-4a24-40b2-a9e9-19760f698430','16bafb3d-35cf-4b27-88e9-17c30bde60c0','EPISODE_03_1','Seorang seniman jalanan menghiasi trotoar dengan lukisan karya seninya yang memukau. Melalui goresan-goresan cat yang berwarna-warni, ia menyampaikan cerita tentang kehidupan kota yang sibuk dan warna-warni.',24,'2008-02-19 00:00:00'),
	('88adbf14-55c8-4616-a7bf-5009db26641c','16bafb3d-35cf-4b27-88e9-17c30bde60c0','EPISODE_03_2','Di pinggiran kota, sebuah kafe kecil yang beraroma harum kopi menyambut para pelanggan setianya dengan senyum hangat. Suasana ramai dengan percakapan dan tawa, seolah-olah menyiratkan bahwa di balik setiap cangkir kopi terdapat sepotong kebahagiaan.',24,'2008-02-27 00:00:00'),
	('90da7369-f6c7-4cb9-88ca-356cbd220e39','a015f561-4d2a-4ba6-9586-718feaa3bcf3','EPISODE_04_1','Seorang ilmuwan yang berdedikasi tengah meneliti tentang pola-pola cuaca yang tidak biasa di wilayah kutub. Dengan tekun, ia memeriksa data demi data, berusaha memahami fenomena alam yang misterius tersebut.',60,'2001-08-15 00:00:00'),
	('9d47bb52-74ab-48c7-80b0-c425d16ded2e','a015f561-4d2a-4ba6-9586-718feaa3bcf3','EPISODE_04_2','Sebuah konser musik rock di stadion besar memenuhi udara dengan dentuman keras dan energi yang meluap-luap. Ribuan penggemar bergoyang dan menyanyi bersama, menciptakan momen kebersamaan yang tak terlupakan.',35,'2001-08-23 00:00:00'),
	('0f7971ca-5414-4634-bf9b-5e3f92f9f2b3','d4945698-38dd-46fa-a92b-444aefb304da','EPISODE_05_1','Sebuah ayam melawan skibidi toilet untuk mendapatkan sigma-nya kembali. Namun, ayam terpeleset ketika berjalan yang membuat skibidi toilet melakukan Turkish Quandale Dingle.',30,'2010-04-04 00:00:00'),
	('86b607f3-67f0-4057-87f7-b597e3786afa','d4945698-38dd-46fa-a92b-444aefb304da','EPISODE_05_2','Ayam balas dendam kepada skibidi toilet untuk kekalahan kemarin. Tiba-tiba ada entitas gegagedigedagedao.',31,'2010-04-23 00:00:00');

## 11. Artist
CREATE TABLE ARTIST(
    id UUID PRIMARY KEY,
    email_akun varchar(50),
    id_pemilih_hak_cipta UUID,
    FOREIGN KEY (email_akun) REFERENCES AKUN(email),
    FOREIGN KEY (id_pemilih_hak_cipta) REFERENCES PEMILIK_HAK_CIPTA(id)
);

INSERT INTO ARTIST VALUES ('a6b2611c-acad-45a3-8d5c-4062ce0feabc','user11@mail.com','17097350-46f8-4bad-b606-efcf046103b3'),
	('2745eaf3-7ab5-494b-8c0c-e726755c06c6','user12@mail.com','088b97dd-2aff-49e0-8124-d1b3590769e9'),
	('1c774b4c-d627-41f7-aea2-be1f8e49c4d9','user13@mail.com','83399eb3-410b-4899-a5dc-f980b776131c'),
	('2b46ce1a-2393-4fc0-8bbf-2cb33de04e22','user14@mail.com','02d5461e-f609-4f86-a42e-f08dd4576665'),
	('6fe18771-4fcb-4cf6-8d75-d3c1beb758e4','user15@mail.com','6b69de31-f9f3-4c25-ae7b-c4e5a36c949c'),
	('aa134aad-a6fb-4d02-9e34-4072085feef1','user16@mail.com','c265fe3b-0f3b-4af0-aa66-7350339b445a'),
	('f62de51b-3dbc-4947-8d8e-d552af3ef4f6','user17@mail.com','e56fb0df-5bd1-46f4-a280-8f1a9dc0252e'),
	('17767530-21fc-4439-8cb0-988421e3e198','user18@mail.com','937d95f9-a41c-4afc-a2bc-1b8a2fa33284'),
	('fac71e21-3846-4729-8c8e-0c0ed8676b07','user19@mail.com','6c63330b-0d53-4957-801a-c6d89c695e8a'),
	('c5ab10ad-2c18-40bc-b1ee-94141c5939d3','user20@mail.com','291b0e1e-9da9-4cef-9b53-5b99ee39b92d');

## 12. Songwriter
CREATE TABLE SONGWRITER(
    id UUID PRIMARY KEY,
    email_akun varchar(50),
    id_pemilik_hak_cipta UUID),
    FOREIGN KEY (email_akun) REFERENCES AKUN(email),
    FOREIGN KEY (id_pemilih_hak_cipta) REFERENCES PEMILIK_HAK_CIPTA(id)
);

INSERT INTO SONGWRITER VALUES ('de3095b6-473f-4692-8dfc-11ab5cb71319','user21@mail.com','68d58d22-4b23-44a2-a0f6-1b4a05ce571a'),
	('cf16ec6d-b6d4-4380-a203-7160c2ed679d','user22@mail.com','04f59991-5951-41da-b0da-ebcd9222c8c4'),
	('c6a4effc-972a-41ff-89a2-743811405c34','user23@mail.com','aecf5b55-9dd3-4671-8610-78467e646156'),
	('9fb296fb-89b7-49e3-a6be-852c6a4672e1','user24@mail.com','74bdaeb3-bb9e-4e29-9186-5adb47ea82b6'),
	('a0ece523-e873-403c-b306-8af886054304','user25@mail.com','d052bb76-a66d-4389-8d67-3aa47cc6b30e'),
	('603c7b10-800b-4800-91b1-1fd8eb483a44','user26@mail.com','7d90a49b-a2b5-494b-9a22-b30f58feb1f9'),
	('d3fae1ad-5aec-4a41-b0c7-ca361cc3877b','user27@mail.com','51dc7d9e-c56d-4aed-9618-0d139a21288c'),
	('b2615ca6-a649-4eff-88b3-48e905d8695c','user28@mail.com','b5f7431f-ec3e-47d5-9c55-b483f16e1621'),
	('e229a0e5-7b40-49e8-8c69-873959c3127a','user29@mail.com','daa85a2c-dd9d-4404-a56e-4a0f662d4650'),
	('c702da49-0814-4840-89b2-e13b4d4fda17','user30@mail.com','845f71d1-340d-4c0b-a21d-cec660433381');

# Gilbert
## 13. SONG
CREATE TABLE SONG (
    id_konten UUID,
    id_artist UUID,
    id_album UUID,
    total_play INT NOT NULL DEFAULT 0,
    total_download INT NOT NULL DEFAULT 0,
    PRIMARY KEY (id_konten),
    FOREIGN KEY (id_artist) REFERENCES ARTIST(id),
    FOREIGN KEY (id_album) REFERENCES ALBUM(id)
);
INSERT INTO SONG VALUES ('4cbb466d-6e94-443e-b1b2-0902c1264c24','a6b2611c-acad-45a3-8d5c-4062ce0feabc','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('dd90e93c-cb04-4094-88eb-318d01551cc6','a6b2611c-acad-45a3-8d5c-4062ce0feabc','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('2c509250-02dc-45aa-8172-ee5c7d437851','a6b2611c-acad-45a3-8d5c-4062ce0feabc','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('e037340a-c24a-4ea9-99f5-2311dd52416b','a6b2611c-acad-45a3-8d5c-4062ce0feabc','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('6538c0b5-4e16-4f9d-b08d-16d1e00557e4','a6b2611c-acad-45a3-8d5c-4062ce0feabc','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('7df11ce8-f4bc-4ba7-81ee-b43cead2f5f4','2745eaf3-7ab5-494b-8c0c-e726755c06c6','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('4f4c0e2c-23d0-45fc-a9a9-3477fe439451','2745eaf3-7ab5-494b-8c0c-e726755c06c6','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('b6d8e324-02ce-49dc-b0cf-2136d61b0572','2745eaf3-7ab5-494b-8c0c-e726755c06c6','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('1904beab-d05a-405b-81ca-b003a39e1187','2745eaf3-7ab5-494b-8c0c-e726755c06c6','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('dae2cda4-3858-42fc-aa01-4ec538a48c47','2745eaf3-7ab5-494b-8c0c-e726755c06c6','acd7dfa6-dc1c-4919-b410-04a72f19611b',0,0),
	('6b108d0e-a87f-40e5-9cac-807530412375','1c774b4c-d627-41f7-aea2-be1f8e49c4d9','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('c752fab5-9d70-4ab1-ac0a-5d4502eccead','1c774b4c-d627-41f7-aea2-be1f8e49c4d9','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('c62ba12d-f5d0-45ae-a899-efaef142a241','1c774b4c-d627-41f7-aea2-be1f8e49c4d9','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('e714a288-ed4c-432c-9066-288c03cb58d1','1c774b4c-d627-41f7-aea2-be1f8e49c4d9','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('423a0ff6-0abf-40b3-884e-16c0fe4cb5fc','1c774b4c-d627-41f7-aea2-be1f8e49c4d9','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('1f99f099-c7a5-49ef-b71f-9507b55982a7','2b46ce1a-2393-4fc0-8bbf-2cb33de04e22','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('2c4d2903-8975-484b-b18f-283d46112985','2b46ce1a-2393-4fc0-8bbf-2cb33de04e22','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('749612cc-6271-4d47-ad73-70fb642068bb','2b46ce1a-2393-4fc0-8bbf-2cb33de04e22','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('d7d2eab3-ff4d-4e5a-9652-7b357090cddc','2b46ce1a-2393-4fc0-8bbf-2cb33de04e22','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('c48d873d-ccd4-4689-80db-5b451f8cf2a9','2b46ce1a-2393-4fc0-8bbf-2cb33de04e22','b9238a40-60f5-4a7a-9fed-c94b0aa50ff2',0,0),
	('9770afea-4d1c-4713-93bd-4788353bd946','6fe18771-4fcb-4cf6-8d75-d3c1beb758e4','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('38b7edd7-7957-47e6-b02c-96c043e47cb5','6fe18771-4fcb-4cf6-8d75-d3c1beb758e4','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('513f1388-3cde-4607-9fb0-13016a5f2eb9','6fe18771-4fcb-4cf6-8d75-d3c1beb758e4','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('bdd646f2-dc41-4b81-8ed0-9faa26050b2a','6fe18771-4fcb-4cf6-8d75-d3c1beb758e4','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('c09ec1eb-8505-4a14-ae60-9a0eb05e5045','6fe18771-4fcb-4cf6-8d75-d3c1beb758e4','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('e8e85403-4be7-4b83-bc45-b62cf705ca44','aa134aad-a6fb-4d02-9e34-4072085feef1','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('3bc64cae-c842-4918-bb33-2b1c6cadc64b','aa134aad-a6fb-4d02-9e34-4072085feef1','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('8de5ca28-50e0-4500-8336-a0f3a6ceddcc','aa134aad-a6fb-4d02-9e34-4072085feef1','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('33a93943-73ec-49cc-ab7d-6830de79deb8','aa134aad-a6fb-4d02-9e34-4072085feef1','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('26c1e2b6-fe1f-4ddc-886b-2f3053f17648','aa134aad-a6fb-4d02-9e34-4072085feef1','9e6bbd09-5cc4-497c-becd-ed4302c5981f',0,0),
	('39ce4ced-4018-41b6-b389-09b0dc74cd41','f62de51b-3dbc-4947-8d8e-d552af3ef4f6','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('fe02f97a-76c8-473a-a3ac-953360810c3d','f62de51b-3dbc-4947-8d8e-d552af3ef4f6','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('4c325519-9a63-48a9-8487-6ca011c6867b','f62de51b-3dbc-4947-8d8e-d552af3ef4f6','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('e8a730a1-9eb8-4445-88a5-6ac8d398cda5','f62de51b-3dbc-4947-8d8e-d552af3ef4f6','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('9ea0d6cc-3fe6-4ff2-8d4f-a21dccd8c313','f62de51b-3dbc-4947-8d8e-d552af3ef4f6','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('597aef0b-91c9-4b5e-a4e3-22e9e0b10685','17767530-21fc-4439-8cb0-988421e3e198','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('a35dab31-47fc-44e5-b09d-27173ca60079','17767530-21fc-4439-8cb0-988421e3e198','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('06a8b33b-3810-4b52-ac7c-6bf913d53ed0','17767530-21fc-4439-8cb0-988421e3e198','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('ade564b4-c21c-46c4-a250-d91aec1c22c1','17767530-21fc-4439-8cb0-988421e3e198','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('be9f60ba-c106-4b2c-a096-75ca110bda7c','17767530-21fc-4439-8cb0-988421e3e198','67a1a29c-c9b5-425e-a028-940fd5173592',0,0),
	('2647c396-cf8e-4985-bb4e-9400c9e97bda','fac71e21-3846-4729-8c8e-0c0ed8676b07','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('4ff2421c-03a5-4ac0-b13b-cc3078c92162','fac71e21-3846-4729-8c8e-0c0ed8676b07','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('201bfae6-92ce-4f4f-a448-33a04298a7f1','fac71e21-3846-4729-8c8e-0c0ed8676b07','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('0408d119-7f5f-48c6-b4da-678fb1833abb','fac71e21-3846-4729-8c8e-0c0ed8676b07','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('dc63fb96-9bab-4d6c-b933-95c9499982b0','fac71e21-3846-4729-8c8e-0c0ed8676b07','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('188157ee-feee-48ac-a08a-6e2cd227f141','c5ab10ad-2c18-40bc-b1ee-94141c5939d3','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('d2b24788-98c6-4374-9970-aefd083600e8','c5ab10ad-2c18-40bc-b1ee-94141c5939d3','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('4db16b13-73bc-4614-8965-b7a25d560b48','c5ab10ad-2c18-40bc-b1ee-94141c5939d3','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('6b355f6a-7c3c-4f0d-9ff9-b2cd962730bb','c5ab10ad-2c18-40bc-b1ee-94141c5939d3','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0),
	('ff863281-1df8-400e-94b5-d165813293ee','c5ab10ad-2c18-40bc-b1ee-94141c5939d3','e39928ef-d7ae-4990-9a41-9a18ea2d09fe',0,0);

## 14. SONGWRITER_WRITE_SONG
CREATE TABLE SONGWRITER_WRITE_SONG (
    id_songwriter UUID,
    id_song UUID,
    PRIMARY KEY (id_songwriter, id_song),
    FOREIGN KEY (id_songwriter) REFERENCES SONGWRITER(id),
    FOREIGN KEY (id_song) REFERENCES SONG(id_konten)
);
INSERT INTO SONGWRITER_WRITE_SONG VALUES ('603c7b10-800b-4800-91b1-1fd8eb483a44','4cbb466d-6e94-443e-b1b2-0902c1264c24'),
	('603c7b10-800b-4800-91b1-1fd8eb483a44','dd90e93c-cb04-4094-88eb-318d01551cc6'),
	('603c7b10-800b-4800-91b1-1fd8eb483a44','2c509250-02dc-45aa-8172-ee5c7d437851'),
	('603c7b10-800b-4800-91b1-1fd8eb483a44','e037340a-c24a-4ea9-99f5-2311dd52416b'),
	('603c7b10-800b-4800-91b1-1fd8eb483a44','6538c0b5-4e16-4f9d-b08d-16d1e00557e4'),
	('603c7b10-800b-4800-91b1-1fd8eb483a44','7df11ce8-f4bc-4ba7-81ee-b43cead2f5f4'),
	('9fb296fb-89b7-49e3-a6be-852c6a4672e1','4f4c0e2c-23d0-45fc-a9a9-3477fe439451'),
	('9fb296fb-89b7-49e3-a6be-852c6a4672e1','b6d8e324-02ce-49dc-b0cf-2136d61b0572'),
	('9fb296fb-89b7-49e3-a6be-852c6a4672e1','1904beab-d05a-405b-81ca-b003a39e1187'),
	('9fb296fb-89b7-49e3-a6be-852c6a4672e1','dae2cda4-3858-42fc-aa01-4ec538a48c47'),
	('9fb296fb-89b7-49e3-a6be-852c6a4672e1','6b108d0e-a87f-40e5-9cac-807530412375'),
	('9fb296fb-89b7-49e3-a6be-852c6a4672e1','c752fab5-9d70-4ab1-ac0a-5d4502eccead'),
	('a0ece523-e873-403c-b306-8af886054304','c62ba12d-f5d0-45ae-a899-efaef142a241'),
	('a0ece523-e873-403c-b306-8af886054304','e714a288-ed4c-432c-9066-288c03cb58d1'),
	('a0ece523-e873-403c-b306-8af886054304','423a0ff6-0abf-40b3-884e-16c0fe4cb5fc'),
	('a0ece523-e873-403c-b306-8af886054304','1f99f099-c7a5-49ef-b71f-9507b55982a7'),
	('a0ece523-e873-403c-b306-8af886054304','2c4d2903-8975-484b-b18f-283d46112985'),
	('a0ece523-e873-403c-b306-8af886054304','749612cc-6271-4d47-ad73-70fb642068bb'),
	('b2615ca6-a649-4eff-88b3-48e905d8695c','d7d2eab3-ff4d-4e5a-9652-7b357090cddc'),
	('b2615ca6-a649-4eff-88b3-48e905d8695c','c48d873d-ccd4-4689-80db-5b451f8cf2a9'),
	('b2615ca6-a649-4eff-88b3-48e905d8695c','9770afea-4d1c-4713-93bd-4788353bd946'),
	('b2615ca6-a649-4eff-88b3-48e905d8695c','38b7edd7-7957-47e6-b02c-96c043e47cb5'),
	('b2615ca6-a649-4eff-88b3-48e905d8695c','513f1388-3cde-4607-9fb0-13016a5f2eb9'),
	('b2615ca6-a649-4eff-88b3-48e905d8695c','bdd646f2-dc41-4b81-8ed0-9faa26050b2a'),
	('c6a4effc-972a-41ff-89a2-743811405c34','c09ec1eb-8505-4a14-ae60-9a0eb05e5045'),
	('c6a4effc-972a-41ff-89a2-743811405c34','e8e85403-4be7-4b83-bc45-b62cf705ca44'),
	('c6a4effc-972a-41ff-89a2-743811405c34','3bc64cae-c842-4918-bb33-2b1c6cadc64b'),
	('c6a4effc-972a-41ff-89a2-743811405c34','8de5ca28-50e0-4500-8336-a0f3a6ceddcc'),
	('c6a4effc-972a-41ff-89a2-743811405c34','33a93943-73ec-49cc-ab7d-6830de79deb8'),
	('c6a4effc-972a-41ff-89a2-743811405c34','26c1e2b6-fe1f-4ddc-886b-2f3053f17648'),
	('c702da49-0814-4840-89b2-e13b4d4fda17','39ce4ced-4018-41b6-b389-09b0dc74cd41'),
	('c702da49-0814-4840-89b2-e13b4d4fda17','fe02f97a-76c8-473a-a3ac-953360810c3d'),
	('c702da49-0814-4840-89b2-e13b4d4fda17','4c325519-9a63-48a9-8487-6ca011c6867b'),
	('c702da49-0814-4840-89b2-e13b4d4fda17','e8a730a1-9eb8-4445-88a5-6ac8d398cda5'),
	('c702da49-0814-4840-89b2-e13b4d4fda17','9ea0d6cc-3fe6-4ff2-8d4f-a21dccd8c313'),
	('cf16ec6d-b6d4-4380-a203-7160c2ed679d','597aef0b-91c9-4b5e-a4e3-22e9e0b10685'),
	('cf16ec6d-b6d4-4380-a203-7160c2ed679d','a35dab31-47fc-44e5-b09d-27173ca60079'),
	('cf16ec6d-b6d4-4380-a203-7160c2ed679d','06a8b33b-3810-4b52-ac7c-6bf913d53ed0'),
	('cf16ec6d-b6d4-4380-a203-7160c2ed679d','ade564b4-c21c-46c4-a250-d91aec1c22c1'),
	('cf16ec6d-b6d4-4380-a203-7160c2ed679d','be9f60ba-c106-4b2c-a096-75ca110bda7c'),
	('cf16ec6d-b6d4-4380-a203-7160c2ed679d','2647c396-cf8e-4985-bb4e-9400c9e97bda'),
	('d3fae1ad-5aec-4a41-b0c7-ca361cc3877b','4ff2421c-03a5-4ac0-b13b-cc3078c92162'),
	('d3fae1ad-5aec-4a41-b0c7-ca361cc3877b','201bfae6-92ce-4f4f-a448-33a04298a7f1'),
	('d3fae1ad-5aec-4a41-b0c7-ca361cc3877b','0408d119-7f5f-48c6-b4da-678fb1833abb'),
	('d3fae1ad-5aec-4a41-b0c7-ca361cc3877b','dc63fb96-9bab-4d6c-b933-95c9499982b0'),
	('d3fae1ad-5aec-4a41-b0c7-ca361cc3877b','188157ee-feee-48ac-a08a-6e2cd227f141'),
	('d3fae1ad-5aec-4a41-b0c7-ca361cc3877b','d2b24788-98c6-4374-9970-aefd083600e8'),
	('de3095b6-473f-4692-8dfc-11ab5cb71319','4db16b13-73bc-4614-8965-b7a25d560b48'),
	('de3095b6-473f-4692-8dfc-11ab5cb71319','6b355f6a-7c3c-4f0d-9ff9-b2cd962730bb'),
	('de3095b6-473f-4692-8dfc-11ab5cb71319','ff863281-1df8-400e-94b5-d165813293ee'),
	('de3095b6-473f-4692-8dfc-11ab5cb71319','ff863281-1df8-400e-94b5-d165813293ee'),
	('de3095b6-473f-4692-8dfc-11ab5cb71319','4cbb466d-6e94-443e-b1b2-0902c1264c24'),
	('de3095b6-473f-4692-8dfc-11ab5cb71319','dd90e93c-cb04-4094-88eb-318d01551cc6'),
	('e229a0e5-7b40-49e8-8c69-873959c3127a','2c509250-02dc-45aa-8172-ee5c7d437851'),
	('e229a0e5-7b40-49e8-8c69-873959c3127a','e037340a-c24a-4ea9-99f5-2311dd52416b'),
	('e229a0e5-7b40-49e8-8c69-873959c3127a','6538c0b5-4e16-4f9d-b08d-16d1e00557e4'),
	('e229a0e5-7b40-49e8-8c69-873959c3127a','7df11ce8-f4bc-4ba7-81ee-b43cead2f5f4'),
	('e229a0e5-7b40-49e8-8c69-873959c3127a','4f4c0e2c-23d0-45fc-a9a9-3477fe439451'),
	('e229a0e5-7b40-49e8-8c69-873959c3127a','b6d8e324-02ce-49dc-b0cf-2136d61b0572');

## 15. DOWNLOADED_SONG
CREATE TABLE DOWNLOADED_SONG (
    id_song UUID,
    email_downloader VARCHAR(50),
    PRIMARY KEY (id_song, email_downloader),
    FOREIGN KEY (id_song) REFERENCES SONG(id_konten),
    FOREIGN KEY (email_downloader) REFERENCES PREMIUM(email)
);
INSERT INTO DOWNLOADED_SONG VALUES ('4cbb466d-6e94-443e-b1b2-0902c1264c24','user36@mail.com'),
	('dd90e93c-cb04-4094-88eb-318d01551cc6','user37@mail.com'),
	('2c509250-02dc-45aa-8172-ee5c7d437851','user38@mail.com'),
	('e037340a-c24a-4ea9-99f5-2311dd52416b','user39@mail.com'),
	('6538c0b5-4e16-4f9d-b08d-16d1e00557e4','user1@mail.com'),
	('7df11ce8-f4bc-4ba7-81ee-b43cead2f5f4','user36@mail.com'),
	('4f4c0e2c-23d0-45fc-a9a9-3477fe439451','user37@mail.com'),
	('b6d8e324-02ce-49dc-b0cf-2136d61b0572','user38@mail.com'),
	('1904beab-d05a-405b-81ca-b003a39e1187','user39@mail.com'),
	('dae2cda4-3858-42fc-aa01-4ec538a48c47','user1@mail.com');

## 16. ALBUM
CREATE TABLE ALBUM (
    id UUID PRIMARY KEY,
    judul VARCHAR(100) NOT NULL,
    jumlah_lagu INT NOT NULL DEFAULT 0,
    id_label UUID,
    total_durasi INT NOT NULL DEFAULT 0,
    FOREIGN KEY (id_label) REFERENCES LABEL(id)
);
INSERT INTO ALBUM VALUES ('acd7dfa6-dc1c-4919-b410-04a72f19611b','ALBUM-01',10,'b593f4b8-2c1e-4df9-8c96-2238c6024b38',38),
	('b9238a40-60f5-4a7a-9fed-c94b0aa50ff2','ALBUM-02',10,'11a47a45-b713-4c14-bda0-3becaf038dca',25),
	('9e6bbd09-5cc4-497c-becd-ed4302c5981f','ALBUM-03',10,'fd76b786-6178-4aef-b59a-875e6806f1d1',27),
	('67a1a29c-c9b5-425e-a028-940fd5173592','ALBUM-04',10,'828e6e57-58f3-4a21-b2fd-49464e64f016',35),
	('e39928ef-d7ae-4990-9a41-9a18ea2d09fe','ALBUM-05',10,'2a6c5ef1-bec3-4165-bbde-2c43bf71785f',28);

## 17. LABEL
CREATE TABLE LABEL (
    id UUID PRIMARY KEY,
    nama VARCHAR(100) NOT NULL,
    email VARCHAR(50),
    kontak VARCHAR(50) NOT NULL,
    id_pemilik_hak_cipta UUID,
    FOREIGN KEY (email) REFERENCES AKUN(email),
    FOREIGN KEY (id_pemilik_hak_cipta) REFERENCES PEMILIK_HAK_CIPTA(id)
);
INSERT INTO LABEL VALUES ('b593f4b8-2c1e-4df9-8c96-2238c6024b38','LABEL-01','label1@mail.com',081201938132,'2a0e85c7-403e-4f8a-89c2-48349748cbf0'),
	('11a47a45-b713-4c14-bda0-3becaf038dca','LABEL-02','label2@mail.com',081201293823,'be4d0d7a-e571-47d1-b8e2-ed36159c5f13'),
	('fd76b786-6178-4aef-b59a-875e6806f1d1','LABEL-03','label3@mail.com',087801394329,'2e0cd1ca-4d53-425f-9c75-47c4583161b0'),
	('828e6e57-58f3-4a21-b2fd-49464e64f016','LABEL-04','label4@mail.com',087873891827,'1f9624df-eff6-4e32-b27c-8a8432053888'),
	('2a6c5ef1-bec3-4165-bbde-2c43bf71785f','LABEL-05','label5@mail.com',0213781238,'c1b9285d-4de0-4fcd-b504-b656c57754c6');


## 18. PLAYLIST
CREATE TABLE PLAYLIST (
    id UUID PRIMARY KEY
);
INSERT INTO PLAYLIST VALUES ('0f5a5177-4adf-49d5-a8d5-8f3bd4ce1acd'),
	('ad0d3209-71d2-4643-9658-b9b21d9eb152'),
	('2aec8880-9e06-4d09-a479-533b7dc07e8a'),
	('21da21d3-963b-4f38-8bc3-a31e75ec7e62'),
	('5e5c7e8a-80f5-48c5-947f-af26e7876a7c'),
	('51270142-7e4f-4c8e-bf68-a334004bc92a'),
	('19ae19a4-e475-43b9-bba6-81483caf97ab'),
	('db0fdc71-9ecc-45d1-a00e-f93a3c631669'),
	('b6ad611a-0a16-4133-92b8-709d16228c4e'),
	('561a95bd-3f6c-4dd8-b234-73a7d05b6415');    
    
## 19. CHART
CREATE TABLE CHART (
    tipe VARCHAR(50) PRIMARY KEY,
    id_playlist UUID,
    FOREIGN KEY (id_playlist) REFERENCES PLAYLIST(id)
);
INSERT INTO CHART VALUES ('Daily Top 20','0f5a5177-4adf-49d5-a8d5-8f3bd4ce1acd'),
	('Weekly Top 20','ad0d3209-71d2-4643-9658-b9b21d9eb152'),
	('Monthly Top 20','2aec8880-9e06-4d09-a479-533b7dc07e8a'),
	('Yearly Top 20','21da21d3-963b-4f38-8bc3-a31e75ec7e62');

# Akmal
## 20. USER_PLAYLIST
CREATE TABLE USER_PLAYLIST (
    email_pembuat VARCHAR(50),
    id_user_playlist UUID,
    judul VARCHAR(100) NOT NULL,
    deskripsi VARCHAR(500) NOT NULL,
    jumlah_lagu INT NOT NULL,
    tanggal_dibuat DATE NOT NULL,
    id_playlist UUID,
    total_durasi INT NOT NULL DEFAULT 0,
    PRIMARY KEY (email_pembuat, id_user_playlist),
    FOREIGN KEY (email_pembuat) REFERENCES AKUN(email),
    FOREIGN KEY (id_playlist) REFERENCES PLAYLIST(id)
);

## 21. PEMILIK_HAK_CIPTA
CREATE TABLE PEMILIK_HAK_CIPTA (
    id UUID PRIMARY KEY,
    rate_royalti INT NOT NULL
);

## 22. ROYALTI
CREATE TABLE ROYALTI (
    id_pemilik_hak_cipta UUID,
    id_song UUID,
    jumlah INT NOT NULL,
    PRIMARY KEY (id_pemilik_hak_cipta, id_song),
    FOREIGN KEY (id_pemilik_hak_cipta) REFERENCES PEMILIK_HAK_CIPTA(id),
    FOREIGN KEY (id_song) REFERENCES SONG(id_konten)
);

## 23. AKUN_PLAY_USER_PLAYLIST
CREATE TABLE AKUN_PLAY_USER_PLAYLIST (
    email_pemain VARCHAR(50),
    id_user_playlist UUID,
    email_pembuat VARCHAR(50),
    waktu TIMESTAMP,
    PRIMARY KEY (email_pemain, id_user_playlist, waktu),
    FOREIGN KEY (email_pemain) REFERENCES AKUN(email),
    FOREIGN KEY (id_user_playlist, email_pembuat) REFERENCES USER_PLAYLIST(id_user_playlist, email_pembuat)
);

## 24. AKUN_PLAY_SONG
CREATE TABLE AKUN_PLAY_SONG (
    email_pemain VARCHAR(50),
    id_song UUID,
    waktu TIMESTAMP,
    PRIMARY KEY (email_pemain, id_song, waktu),
    FOREIGN KEY (email_pemain) REFERENCES AKUN(email),
    FOREIGN KEY (id_song) REFERENCES SONG(id_konten)
);

## 25. PLAYLIST_SONG
CREATE TABLE PLAYLIST_SONG (
    id_playlist UUID,
    id_song UUID,
    PRIMARY KEY (id_playlist, id_song),
    FOREIGN KEY (id_playlist) REFERENCES PLAYLIST(id),
    FOREIGN KEY (id_song) REFERENCES SONG(id_konten)
);




