MEMBER: create table member( memberId integer unsigned not null, memname varchar(100) not null, address varchar(100) not null, owes decimal(5,2) not null, primary key(memberId) ); insert into member(memberId,memname,address,owes) values (5001,"Green,S","8 Bells Plc",60.50), (5002,"Cross,P","67 Guy St",25.00), (5010,"Fitzgerald,F","19 Kenrich Plc",0), (5011,"Hutchin,Q","10 Boronia Ln",20.90), (5016,"McEwan,E","17a Grafton Rd",0), (5017,"Miller,R","3 DeRyan Crt",200.00), (5020,"O'Donnel,I","39 Forde Av",23.00), (5021,"Quinn,J","56 Gordon Av",89.50), (5022,"Todd,M","35 College Rd",0), (5024,"Reis,E","8 Kummerangi St",0), (5026,"Nielson,T","3/14 Mocatta Grv",57.80), (5029,"Lennon,S","2 Cherry Ln",90.20), (5030,"Issacs,A","89 Rowbottom St",0), (5031,"Fox,W","160 Draton Rd",0), (5032,"French,P","21 Hamilton Tce",32.00), (5033,"Dean,D","92 Barawell Rd",65.00), (5034,"Fuller,O","24 Elwood St",0), (5036,"Delaney,L","94 Weewonda Ln",35.60), (5039,"Austin,L","40 Jones St",0), (5045,"Ash,W","188 Hume St",50.10), (5051,"Holland,O","32 Matthews Rd",123.80), (5062,"Killen,R","14a Elizabeth St",42.00), (5063,"Offord,D","51 Hillview Rd",0), (5064,"Pickard,N","3 Evon St",0) DIRECTOR: create table director( dirId integer unsigned not null, dirname varchar(100) not null, country varchar(100) not null, primary key(dirId)); insert into director(dirId, dirname, country) values (100,"Peckinpah, Sam","US"), (101,"Russell, David O","US"), (102,"Curtiz, Michael","Hungary"), (104,"Ford, John","US"), (105,"Stone, Oliver","US"), (106,"Spielberg, Steven","US"), (107,"Cameron, James","Canada"), (109,"McTiernan, John","US"), (110,"Davis, Andrew","US"), (111,"De Palma, Brian","US"), (112,"Demme, Jonathan","US"), (113,"Lucas, George","US"), (114,"Kerschner, Irvin","US"), (116,"Wachowski, Andy","US"), (117,"Tarantino, Quentin","US"), (118,"Gibson, Mel","Australia"), (120,"Coppola, Francis","US"), (121,"Zwick, Edward","US"), (122,"Marquand, Richard","Wales"), (123,"Wyler, William","France"), (124,"Kubrick, Stanley","US"), (125,"Mann, Michael","US"), (127,"Endfield, Cy","US"), (128,"Hamilton, Guy","England"), (129,"Miyazaki, Hayao","Japan"), (130,"Petersen, Wolfgang","Germany"), (131,"Lean, David","England"), (132,"Huston, John","US"), (133,"Sturges, John","US"), (134,"Miller, George","Australia"), (135,"Weir, Peter","Australia"), (136,"Kurosawa, Akira","Japan"); MOVIE: create table movie( movieId integer unsigned not null, movname varchar(100) not null, minutes integer not null, yr integer not null, dirId integer unsigned not null, primary key(movieId), foreign key (dirId) references director(dirId)) insert into movie(movieId,movname,length,year,dirId) values (1000,"Heat",171,1995,125), (1001,"Terminator, The",108,1984,107), (1002,"Zulu",135,1964,127), (1003,"Goldfinger",112,1964,128), (1004,"Mononoke Hime",150,1997,129), (1005,"Das Boot",210,1981,130), (1006,"Lawrence of Arabia",202,1962,131), (1007,"Treasure of the Sierra Madre, The",124,1948,132), (1008,"Great Escape, The",169,1963,133), (1009,"Godfather, The",175,1972,120), (1010,"Godfather: Part II, The",200,1974,120), (1011,"Wild Bunch, The",134,1969,100), (1012,"Three Kings",115,1999,101), (1013,"Adventures of Robin Hood, The",102,1938,102), (1014,"Stagecoach",96,1939,104), (1015,"Platoon",111,1986,105), (1016,"Indiana Jones and the Last Crusade",127,1989,106), (1017,"Terminator 2: Judgement Day",137,1991,107), (1018,"Die Hard",131,1988,109), (1019,"Fugitive, The",127,1993,110), (1020,"Untouchables, The",195,1987,111), (1021,"Star Wars",121,1977,113), (1024,"Empire Strikes Back, The",124,1980,114), (1025,"Matrix, The",136,1999,116), (1026,"Raiders of the Lost Ark",115,1981,106), (1027,"Pulp Fiction",154,1994,117), (1029,"Braveheart",177,1995,118), (1030,"Apocalypse Now",155,1979,120), (1032,"Glory",122,1989,121), (1033,"Aliens",137,1986,107), (1034,"Return of the Jedi",134,1983,122), (1035,"Ben Hur",212,1959,123), (1036,"Full Metal Jacket",116,1987,124), (1037,"Silence of the Lambs, The",118,1991,112), (1038,"Casablanca",102,1942,102), (1039,"Saving Private Ryan",170,1998,106), (1040,"Bridge on the River Kwai, The",155,1957,131), (1042,"Mad Max",91,1979,134), (1043,"Mad Max 2",91,1981,134), (1044,"Gallipoli",110,1981,135), (1045,"Fearless",122,1993,135), (1046,"Schichinin no Samuri",160,1954,136) ONHIRE: create table onhire( movieId integer unsigned not null, memberId integer unsigned not null, duedate date not null, primary key(movieId,memberId), foreign key(movieId) references movie(movieId), foreign key(memberId) references member(memberId)) insert into onhire(movieId,memberId,duedate) values (1002,5064,"2017-09-12"), (1008,5031,"2017-09-12"), (1009,5017,"2017-09-05"), (1010,5017,"2017-09-05"), (1012,5002,"2017-09-14"), (1013,5039,"2017-09-10"), (1014,5063,"2017-09-14"), (1015,5017,"2017-09-13"), (1017,5034,"2017-09-08"), (1021,5034,"2017-09-14"), (1027,5017,"2017-09-14"), (1030,5034,"2017-09-08"), (1035,5051,"2017-09-13"), (1036,5034,"2017-09-08"), (1038,5062,"2017-09-12"), (1039,5020,"2017-09-06")