use mysql; insert into user (Host, User, Password, Select_priv, Create_priv ) Values ('localhost', 'php', password('geheim'), 'Y', 'Y'); flush privileges; create database klassik; use klassik; create table Komponist (vorname varchar(40), name varchar(40), geburtsjahr integer, comp_id integer NOT NULL, PRIMARY KEY(comp_id) ); insert into Komponist (name, vorname, geburtsjahr, comp_id) VALUES("Brahms", "Johannes", 1833, 1); insert into Komponist (name, vorname, geburtsjahr, comp_id) VALUES("Bach", "Johann Sebastian", 1685, 2); insert into Komponist (name, vorname, geburtsjahr, comp_id) VALUES("Haydn", "Joseph", 1732, 3); insert into Komponist (name, vorname, geburtsjahr, comp_id) VALUES("Mozart", "Wolfgang Amadeus", 1759, 4); insert into Komponist (name, vorname, geburtsjahr, comp_id) VALUES("Beethoven", "Ludwig van", 1770, 5); insert into Komponist (name, vorname, geburtsjahr, comp_id) VALUES("Vivaldi", "Antonio", 1678, 6); create table Werk (bezeichnung varchar(80), satzzahl integer, comp_id integer NOT NULL, werk_id integer NOT NULL, PRIMARY KEY(werk_id) ); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Symphonie Nr. 3", 4, 5, 1); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Symphonie Nr. 6", 5, 5, 2); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Symphonie Nr. 102", 4, 3, 3); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Symphonie Nr. 103", 4, 3, 4); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Symphonie Nr. 41", 4, 4, 5); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Symphonie Nr. 40", 4, 4, 6); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Jagd-Quartett", 4, 4, 7); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Violinkonzert", 3, 5, 8); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Goldberg-Variationen", 32, 2, 9); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Klavierkonzert Nr. 1", 3, 2, 10); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Klavierkonzert Nr. 2", 3, 2, 11); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Klavierkonzert Nr. 3", 3, 2, 12); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Sonate für Klavier und Violoncello e-moll", 3, 1, 13); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Sonate für Klavier und Violoncello F-Dur", 3, 1, 14); insert into Werk (bezeichnung, satzzahl, comp_id, werk_id) VALUES("Doppelkonzert", 3, 1, 15); create table Interpret (vorname varchar(40), name varchar(40), instrument varchar(40), int_id integer NOT NULL, PRIMARY KEY(int_id) ); insert into Interpret (name, vorname, instrument, int_id) VALUES("Karajan", "Herbert von", "Dirigent", 1); insert into Interpret (name, instrument, int_id) VALUES("Berliner Philharmoniker", "Orchester", 2); insert into Interpret (name, vorname, instrument, int_id) VALUES("Solti", "Georg", "Dirigent", 3); insert into Interpret (name, instrument, int_id) VALUES("London Philharmonic Orchestra", "Orchester", 4); insert into Interpret (name, vorname, instrument, int_id) VALUES("Bernstein", "Leonard", "Dirigent", 5); insert into Interpret (name, instrument, int_id) VALUES("Wiener Philharmoniker", "Orchester", 6); insert into Interpret (name, instrument, int_id) VALUES("Melos-Quartett", "Streich-Quartett", 7); insert into Interpret (name, vorname, instrument, int_id) VALUES("Chung", "Kyung-Wha", "Violine", 8); insert into Interpret (name, vorname, instrument, int_id) VALUES("Kondrashin", "Kirill", "Dirigent", 9); insert into Interpret (name, vorname, instrument, int_id) VALUES("Gould", "Glenn", "Klavier", 10); insert into Interpret (name, instrument, int_id) VALUES("Columbia Symphonie Orchestra", "Orchester", 11); insert into Interpret (name, vorname, instrument, int_id) VALUES("Golschmann", "Vladimir", "Dirigent", 12); insert into Interpret (name, vorname, instrument, int_id) VALUES("Rostropovich", "Mstislav", "Violoncello", 13); insert into Interpret (name, vorname, instrument, int_id) VALUES("Serkin", "Rudolf", "Klavier", 14); insert into Interpret (name, vorname, instrument, int_id) VALUES("Perlman", "Itzhak", "Violine", 15); insert into Interpret (name, instrument, int_id) VALUES("Concertgebouw Orchestra", "Orchester", 16); insert into Interpret (name, vorname, instrument, int_id) VALUES("Haitink", "Bernard", "Dirigent", 17); create table InterpretWerk ( int_id integer NOT NULL, werk_id integer NOT NULL, PRIMARY KEY(int_id, werk_id) ); insert into InterpretWerk (werk_id, int_id) VALUES(1, 1); insert into InterpretWerk (werk_id, int_id) VALUES(1, 2); insert into InterpretWerk (werk_id, int_id) VALUES(2, 1); insert into InterpretWerk (werk_id, int_id) VALUES(2, 2); insert into InterpretWerk (werk_id, int_id) VALUES(3, 3); insert into InterpretWerk (werk_id, int_id) VALUES(3, 4); insert into InterpretWerk (werk_id, int_id) VALUES(4, 3); insert into InterpretWerk (werk_id, int_id) VALUES(4, 4); insert into InterpretWerk (werk_id, int_id) VALUES(5, 5); insert into InterpretWerk (werk_id, int_id) VALUES(5, 6); insert into InterpretWerk (werk_id, int_id) VALUES(6, 5); insert into InterpretWerk (werk_id, int_id) VALUES(6, 6); insert into InterpretWerk (werk_id, int_id) VALUES(7, 7); insert into InterpretWerk (werk_id, int_id) VALUES(8, 8); insert into InterpretWerk (werk_id, int_id) VALUES(8, 6); insert into InterpretWerk (werk_id, int_id) VALUES(8, 9); insert into InterpretWerk (werk_id, int_id) VALUES(9, 10); insert into InterpretWerk (werk_id, int_id) VALUES(10, 10); insert into InterpretWerk (werk_id, int_id) VALUES(10, 5); insert into InterpretWerk (werk_id, int_id) VALUES(10, 11); insert into InterpretWerk (werk_id, int_id) VALUES(11, 10); insert into InterpretWerk (werk_id, int_id) VALUES(11, 12); insert into InterpretWerk (werk_id, int_id) VALUES(11, 11); insert into InterpretWerk (werk_id, int_id) VALUES(12, 10); insert into InterpretWerk (werk_id, int_id) VALUES(12, 12); insert into InterpretWerk (werk_id, int_id) VALUES(12, 11); insert into InterpretWerk (werk_id, int_id) VALUES(13, 13); insert into InterpretWerk (werk_id, int_id) VALUES(13, 14); insert into InterpretWerk (werk_id, int_id) VALUES(14, 13); insert into InterpretWerk (werk_id, int_id) VALUES(14, 14); insert into InterpretWerk (werk_id, int_id) VALUES(15, 13); insert into InterpretWerk (werk_id, int_id) VALUES(15, 15); insert into InterpretWerk (werk_id, int_id) VALUES(15, 16); insert into InterpretWerk (werk_id, int_id) VALUES(15, 17); create database multiple_choice; use multiple_choice; create table Pruefling (vorname varchar(40), name varchar(40) NOT NULL, user varchar(40) NOT NULL, passwort varchar(100), PRIMARY KEY(user) ); insert into Pruefling (vorname, name, user, passwort) VALUES("Antonia", "Adler", "webkurs01", PASSWORD("aaaa")); insert into Pruefling (vorname, name, user, passwort) VALUES("Bernd", "Biber", "webkurs02", PASSWORD("bbbb")); insert into Pruefling (vorname, name, user, passwort) VALUES("Christa", "Chamaeleon", "webkurs03", PASSWORD("cccc")); insert into Pruefling (vorname, name, user, passwort) VALUES("Dieter", "Dorsch", "webkurs04", PASSWORD("dddd")); create table Ergebnis (user varchar(40) NOT NULL, nr1 integer, nr2 integer, nr3 integer, PRIMARY KEY(user) ); insert into Ergebnis (user) VALUES("webkurs01"); insert into Ergebnis (user) VALUES("webkurs02"); insert into Ergebnis (user) VALUES("webkurs03"); insert into Ergebnis (user) VALUES("webkurs04"); insert into Ergebnis (user) VALUES("webkurs05"); insert into Ergebnis (user) VALUES("webkurs06"); insert into Ergebnis (user) VALUES("webkurs07"); insert into Ergebnis (user) VALUES("webkurs08"); grant update on multiple_choice.Ergebnis to php@localhost; flush privileges;