
/* Delete the tables if they already exist */
drop table if exists Movie;
drop table if exists Reviewer;
drop table if exists Rating;

/* Create the schema for our tables */
create table Reviewer(raterID int UNIQUE, name text);
create table Movie(movieID int UNIQUE, title text, year int, director text);
create table Rating(raterID int, movieID int, stars int, ratingDate date);

/* Populate the tables with data */

/* Add yourself to the Reviewer table */
insert into Reviewer values(184,'Jennifer');
insert into Reviewer values(100,'Jenna');
insert into Reviewer values(419,'Ted');
insert into Reviewer values(101,'Doug');
Insert into Reviewer values(132,'Batman');
insert into Reviewer values(024,'Sasha');
insert into Reviewer values(542, 'Sandra');
insert into Reviewer values(013,'Mia');
insert into Reviewer values(999,'Raj');
insert into Reviewer values(666,'Frederico');
insert into Reviewer values(3,'Saray');
insert into Reviewer values(199,'Juan');
insert into Reviewer values(020,'Anna');
insert into Reviewer values(2,'Anthony');
Insert into Reviewer values(155,'Sakar');
Insert into Reviewer values(425,'Maggie');
insert into Reviewer values(067,'Aishani');
insert into Reviewer values(029,'Heidi');
insert into Reviewer values(536,'Mia');
insert into Reviewer values(17, 'John');
insert into Reviewer values(164,'Megan');
insert into Reviewer values(496,'Yiqing');
insert into Reviewer values(097,'Danny');
insert into Reviewer values(444,'Prashant');
insert into Reviewer values(466,'Mr. Ed');
insert into Reviewer values(115,'Lee');
insert into Reviewer values(410,'Bobby');
Insert into Reviewer values(120,'Eddie');
insert into Reviewer values(555,'Rosanna');


/* Add the movie(s) you want to rate to the Movie table */
insert into Movie values(56,'Captain America-The First Avenger',2011,'Joe Johnson');
insert into Movie values(1,'Birdman',2014,'Alejandro González Iñárritu');
Insert into Movie values (2,'Pulp Fiction', 1994,'Quentin Tarantino');
insert into Movie values(3000,'Bee Movie',2007,'Steve Hickner');
insert into Movie values(4,'Jurassic Park' ,1993,'Steven Spielberg');
insert into Movie values(5, 'The Lost World: Jurassic Park' ,1997,'Steven Spielberg');
insert into Movie values(39,'Jurassic Park III' ,2001,'Joe Johnston');
insert into Movie values(41,'Jurassic World' ,2015,'Colin Trevorrow');
insert into Movie values(6,'Frozen',2013,'Chris Buck Jennifer Lee');
insert into Movie values(7,'Lion',2016,'Garth Davis');
Insert into Movie values (70,'The Shining', 1980,'Stanley Kubrick');
Insert into Movie values (60,'Zombieland', 2009,'Ruben Fleischer');
Insert into Movie values(745,'Cars',2006,'John Lasseter');
insert into Movie values(71,'2001: A Space Odyssey',1968,'Stanley Kubrick');
Insert into Movie values(746,'Slumdog Millionaire',2008,'Danny Boyle');
insert into Movie values(96,'Hidden Figures',2016,'Theodore Melfi');
insert into Movie values(97,'Batman: The Movie',1966,'Tim Burton');
insert into Movie values(12,'Get Out',2017,'Jordan Peele');
insert into Movie values(98,'Spotlight',2016,'Tom McCarthy');
insert into Movie values(23,'Amelie',2001,'Jean-Pierre Jeunet');
insert into Movie values(42,'Star Wars: Episode IV - A New Hope',1977,'George Lucas');
insert into Movie values(900,'Harry Potter and Sorcerers Stone', 2001,'Chris Columbus');
insert into Movie values(901,'Harry Potter and Chamber of Secrets', 2002,'Chris Columbus');
insert into Movie values(902,'Harry Potter and The Prisoner of Azkaban', 2004,'Alfonso Cuaron');
insert into Movie values(903,'Harry Potter and The Goblet of Fire', 2005,'Mike Newell');
insert into Movie values(904,'Harry Potter and The Order of the Phoenix', 2007,'David Yates');
insert into Movie values(905,'Harry Potter and The Half-Blood Prince', 2009,'David Yates');
insert into Movie values(906,'Harry Potter and The Deathly Hallows - Part 1', 2010,'David Yates');
insert into Movie values(907,'Harry Potter and The Deathly Hallows - Part 2', 2011,'David Yates');
insert into Movie values(410,'Mulan',1998,'Barry Cook');
insert into Movie values(232,'Moon',2009,'Duncan Jones');
insert into Movie values(888,'Twilight',2008,'Catherine Hardwicke');
insert into Movie values(1199,'Lala Land',2017,'Damien Chazelle');
insert into Movie values (43,'Star Wars: Episode V - The Empire Strikes Back',1980,'George Lucas');
insert into Movie values(100,'The Godfather',1974,'Francis Ford Coppola');
insert into Movie values(133,'Batman: Mask of the Phantasm',1993,'Bruce Timm');
insert into Movie values(134,'Teenage Mutant Ninja Turtles',1990,'Steve Barron');
insert into Movie values(777,'The Ant Bully',1980,'John A. Davis');
insert into Movie values(222,'Transformerz',2007,'Michael Bay');
insert into Movie values(422,'Transformers:Revenge of the Fallen',2009,'Michael Bay');
insert into Movie values(233,'Jungle Book','2016','Jon Favreau');
insert into Movie values(17,'Fight Club',1999,'David Fincher');
Insert into Movie values(3003, 'Red Cliff', 2008,'John Woo');
insert into Movie values(466,'The legend of 1900',1998,'Giuseppe Tornatore');
Insert into Movie values(72,'The Village','2004','M. Night Shyamalan');
insert into Movie values(555,'Gattaca',1997,'Andrew Niccol');
     



/* Add your rating(s) to the Rating table */
insert into Rating values(17,56,4.8,'2017-03-07'); 
insert into Rating values(100,1,5,'2017-03-07');
insert into Rating values(666,3003,5,'2017-03-07');
insert into Rating values(999,133,5,'2017-03-07');
insert into Rating values(999,134,5,'2017-03-07');
insert into Rating values(999,5,2,'2017-03-07');
insert into Rating values(999,422,1,'2017-03-07');
insert into Rating values(999,41,5,'2017-03-07');
Insert into Rating values(120,2,4,'2017-03-17');
insert into Rating values(2,4,5,'2017-03-07');
insert into Rating values(2,5,1,'2017-03-07');
insert into Rating values(2,39,3,'2017-03-07');
insert into Rating values(2,410,3,'2017-03-07');
insert into Rating values(020,888,5,'2017-03-07');
insert into Rating values(020,42,0,'2017-03-07');
Insert into Rating values(115,100,4,'2017-03-07');
insert into Rating values(536,232,4,'2017-03-07');
insert into Rating values(555,555,5,'2017-03-07');
insert into Rating values(555,42,5,'2017-03-07');
insert into Rating values(555,4,3,'2017-03-07');
insert into Rating values(555,2,5,'2017-03-07');
insert into Rating values(555,745,1,'2017-03-07');
insert into Rating values(555,134,5,'2017-03-07');
insert into Rating values(555,422,0,'2017-03-07');
insert into Rating values(097,41,5,'2017-03-07');
insert into Rating values(097,42,4,'2017-03-07');
Insert into Rating values(024,23,4,'2017-03-07');
insert into Rating values(164,72,5,'2017-03-07');
Insert into Rating values(496,900,4,'2017-03-17');
Insert into Rating values(419,56,1,'2017-03-17');
Insert into Rating values(425,745,3,'2017-03-07');
Insert into Rating values(425,746,5,'2017-03-07');
insert into Rating values(013,70,4,'2017-03-07');
insert into Rating values(013,60,4,'2017-03-07');
insert into Rating values(013,901,4,'2017-03-07');
insert into Rating values(419,3000,5,'2017-03-07');
insert into Rating values(666,43,4.3,'2017-03-07');
Insert into Rating values(410,71,5,'2017-03-07');
Insert into Rating values(410,42,5,'2017-03-07');
insert into Rating values(419,71,4,'2017-03-07');
insert into Rating values(3,97,1,'2017-03-07');
insert into Rating values(3,96,5,'2017-03-07');
Insert into Rating values(12,2,5,'2017-3-07');
insert into Rating values(199,98,5,'2017-03-07');
insert into Rating values(101,12,5,'2017-03-07');
insert into Rating values(542,70,5,'2017-03-07');
Insert into Rating values(466,12,5,'2017-03-07');
insert into Rating values(067,6,5,'2017-03-07');
insert into Rating values(17,17,5,'2017-03-07');
insert into Rating values(067,7,5,'2017-03-07');
insert into Rating values(067,96,5,'2017-03-07');
insert into Rating values(067,5,2,'2017-03-07');
insert into Rating values(444,466,5,'2017-03-07');

