diff --git a/modules/fbs-core/web/src/app/page-components/sql-playground/db-control-panel/db-control-templates/db-control-templates.component.ts b/modules/fbs-core/web/src/app/page-components/sql-playground/db-control-panel/db-control-templates/db-control-templates.component.ts index ba95fc03e..651a2f479 100644 --- a/modules/fbs-core/web/src/app/page-components/sql-playground/db-control-panel/db-control-templates/db-control-templates.component.ts +++ b/modules/fbs-core/web/src/app/page-components/sql-playground/db-control-panel/db-control-templates/db-control-templates.component.ts @@ -95,6 +95,20 @@ export class DbControlTemplatesComponent implements OnInit { templateQuery: "CREATE TABLE hotel ( HoNr INTEGER NOT NULL, HName CHAR(40), Ort CHAR(40), Straße CHAR(40), HausNr CHAR(5), PLZ CHAR(5), CONSTRAINT pk_hotel PRIMARY KEY(HoNr)); CREATE TABLE zimmer ( HoNr INTEGER NOT NULL, ZNr INTEGER NOT NULL, ZName CHAR(40), Kapazitaet INTEGER, Preis DECIMAL(8,2), CONSTRAINT pk_zimmer PRIMARY KEY(HoNr,ZNr), CONSTRAINT fk_zimmer FOREIGN KEY(HoNr) REFERENCES hotel(HoNr)); CREATE TABLE ausstattung ( ANr INTEGER NOT NULL, Bezeichnung CHAR(40), Zusatzkosten DECIMAL(8,2), CONSTRAINT pk_ausstattung PRIMARY KEY(ANr)); CREATE TABLE normal ( HoNr INTEGER NOT NULL, ZNr INTEGER NOT NULL, ANr INTEGER NOT NULL, anzahl INTEGER DEFAULT 1, CONSTRAINT pk_normal PRIMARY KEY(HoNr,ZNr,ANr), CONSTRAINT fk_normal_1 FOREIGN KEY(ANr) REFERENCES ausstattung(ANr), CONSTRAINT fk_normal_2 FOREIGN KEY(HoNr,ZNr) REFERENCES zimmer(HoNr,ZNr)); CREATE TABLE gast ( GNr INTEGER NOT NULL, Name CHAR(30), Vorname CHAR(40), Ort CHAR(50), PLZ CHAR(5), Strasse CHAR(50), HausNr CHAR(5), CONSTRAINT pk_gast PRIMARY KEY(GNr)); CREATE TABLE reservierung ( RNr INTEGER NOT NULL, Datum DATE, HoNr INTEGER, GNr INTEGER, CONSTRAINT pk_reservierung PRIMARY KEY(RNr), CONSTRAINT fk_reservierung_1 FOREIGN KEY(HoNr) REFERENCES hotel(HoNr), CONSTRAINT fk_reservierung_2 FOREIGN KEY(GNr) REFERENCES gast(GNr)); CREATE TABLE rposition ( RNr INTEGER NOT NULL, RPos INTEGER NOT NULL, von DATE, bis DATE, HoNr INTEGER, ZNr INTEGER, CONSTRAINT pk_position PRIMARY KEY(RNr,RPos), CONSTRAINT fk_position_1 FOREIGN KEY(RNr) REFERENCES reservierung(RNr), CONSTRAINT fk_position_2 FOREIGN KEY(HoNr,ZNr) REFERENCES zimmer(HoNr,ZNr), CONSTRAINT check_date CHECK (von <= bis)); CREATE TABLE zusatz ( RNr INTEGER NOT NULL, RPos INTEGER NOT NULL, ANr INTEGER NOT NULL, von DATE, bis DATE, anzahl INTEGER DEFAULT 1, CONSTRAINT pk_zusatz PRIMARY KEY(RNr,RPos,ANr), CONSTRAINT fk_zusatz_1 FOREIGN KEY(RNr,RPos) REFERENCES rposition(RNr,RPos), CONSTRAINT fk_zusatz_2 FOREIGN KEY(ANr) REFERENCES ausstattung(ANr), CONSTRAINT check_date CHECK (von <= bis)); INSERT INTO hotel VALUES(1036,'Ringhotel','Luenen','Kurt-Schumacher-Strasse','1','44534'); INSERT INTO hotel VALUES(34 ,'Haus Schmuelling','Bergkamen','Landwehrstrasse','54','59192'); INSERT INTO hotel VALUES(135,'City Hotel','Dortmund','Auf dem Wall','62','44147'); INSERT INTO hotel VALUES(843,'Maritim','Stralsund','Strandgasse','37','18435'); INSERT INTO hotel VALUES(428,'Riss','Chemnitz','An der Erzkuhle','23','09008'); INSERT INTO hotel VALUES(522,'Bohne','Kakau b. Bitterfeld','Zur Plantage','14','06785'); INSERT INTO hotel VALUES(132,'Gruene Bogenschuetze','Geseke','An der Abtei','3','59590'); INSERT INTO hotel VALUES(625,'Hotel Adlon','Dortmund','Lilienthalstrasse','68a','44369'); INSERT INTO hotel VALUES(392,'Hotel Kempinski','Muenchen','Terminalstrasse','20-22','85356'); INSERT INTO hotel VALUES(736,'Gasthof Sybille','Bad Lippspringe','An der Jordanquelle','1','33188'); INSERT INTO hotel VALUES(758,'Kastens Hotel','Duesseldorf','Lorettostr','5','40219'); INSERT INTO hotel VALUES(761,'Am Glockenturm','Arnsberg','Soesterstr','1','59821'); INSERT INTO ausstattung VALUES(23,'Telefon',5.67); INSERT INTO ausstattung VALUES(35,'Goldene Wascharmaturen',45.16); INSERT INTO ausstattung VALUES(47,'Extragroße Badetuecher',9.99); INSERT INTO ausstattung VALUES(59,'Bettwaesche',10.32); INSERT INTO ausstattung VALUES(61,'Haekelkissenbezuege',13.57); INSERT INTO ausstattung VALUES(73,'Kabelfernsehen',15.66); INSERT INTO ausstattung VALUES(84,'Satellitenfernsehen',16.55); INSERT INTO ausstattung VALUES(96,'Beamer',23.79); INSERT INTO ausstattung VALUES(108,'Overheadprojektor',17.43); INSERT INTO ausstattung VALUES(111,'Videorekorder',16.89); INSERT INTO ausstattung VALUES(123,'DVD-Player',18.52); INSERT INTO ausstattung VALUES(130,'HiFi-Multifunktionsanlage',25.91); INSERT INTO ausstattung VALUES(142,'Stuhl',4.31); INSERT INTO ausstattung VALUES(154,'Tisch',5.76); INSERT INTO ausstattung VALUES(166,'Kopfkissen',15.69); INSERT INTO ausstattung VALUES(178,'Gummibettlaken',17.83); INSERT INTO ausstattung VALUES(62,'gehaekelte Toilettenrollendeckchen',11.46); INSERT INTO ausstattung VALUES(46,'Bademantel','5.50'); INSERT INTO ausstattung VALUES(45,'Hausschuhe','2.35'); INSERT INTO ausstattung VALUES(50,'Kinderbett','0.0'); INSERT INTO ausstattung VALUES(51,'Hochstuhl','0.0'); INSERT INTO ausstattung VALUES(52,'Safe','2.45'); INSERT INTO ausstattung VALUES(53,'Heizdecke','16.85'); INSERT INTO ausstattung VALUES(54,'Duftkerzen','12.15'); INSERT INTO ausstattung VALUES(24,'W-LAN Zugang','5.95'); INSERT INTO ausstattung VALUES(25,'DSL-Anschluss','7.69'); INSERT INTO zimmer VALUES(34,3,'No3',1,19.99); INSERT INTO zimmer VALUES(135,312,'Praesidentensuite',6,399.99); INSERT INTO zimmer VALUES(135,313,'Bernsteinzimmer',6,600.00); INSERT INTO zimmer VALUES(428,222,'Stollen Sued',2,24.99); INSERT INTO zimmer VALUES(843,145,'Seeblick',3,89.67); INSERT INTO zimmer VALUES(1036,217,'Waldblick',2,45.99); INSERT INTO zimmer VALUES(428,111,'Stollen Nord',1,23.99); INSERT INTO zimmer VALUES(843,732,'Krabbenkutter',5,485.00); INSERT INTO zimmer VALUES(135,521,'Westfalenzimmer',4,167.55); INSERT INTO zimmer VALUES(34,4,'No4',2,21.99); INSERT INTO zimmer VALUES(1036,1214,'Schwanenteich',3,76.99); INSERT INTO zimmer VALUES(522,113,'Onkel Toms Huette',2,54.99); INSERT INTO zimmer VALUES(522,124,'Singendes Zuckerrohr',3,65.35); INSERT INTO zimmer VALUES(132,115,'Waldruh',2,55.34); INSERT INTO zimmer VALUES(132,134,'Hochsitz',4,89.47); INSERT INTO zimmer VALUES(625,257,'Metropolian',2,76.21); INSERT INTO zimmer VALUES(625,412,'Blickpunkt',3,87.25); INSERT INTO zimmer VALUES(392,233,'Waldfried',1,32.46); INSERT INTO zimmer VALUES(392,513,'Flugplatz',2,43.62); INSERT INTO zimmer VALUES(34,5,'No5',2,'21.99'); INSERT INTO zimmer VALUES(132,122,'Strecke',2,'60.45'); INSERT INTO zimmer VALUES(135,412,'Rosa Raum',2,'90.35'); INSERT INTO zimmer VALUES(392,414,'Schlafwohl',2,'59.95'); INSERT INTO zimmer VALUES(428,333,'Stollen West',2,'24.99'); INSERT INTO zimmer VALUES(522,135,'Missippi',2,'52.89'); INSERT INTO zimmer VALUES(625,333,'Schoene Aussicht',2,'74.25'); INSERT INTO zimmer VALUES(843,363,'Morgenroete',2,'195.25'); INSERT INTO zimmer VALUES(1036,512,'Angeraue',2,'50.12'); INSERT INTO zimmer VALUES(736,11,'Arminiusquelle',2,'45.40'); INSERT INTO zimmer VALUES(736,12,'Jordanquelle',2,'45.40'); INSERT INTO zimmer VALUES(736,14,'Lippequelle',2,50.50); INSERT INTO zimmer VALUES(758,25,'Rheinturm',2,78.99); INSERT INTO zimmer VALUES(758,26,'Stadttor',2,78.99); INSERT INTO zimmer VALUES(758,27,'Kniebruecke',2,74.99); INSERT INTO zimmer VALUES(761,31,'Schlossberg',2,25.85); INSERT INTO zimmer VALUES(761,32,'Gambrinus',2,19.99); INSERT INTO zimmer VALUES(761,33,'Muffrika',4,48.55); INSERT INTO normal VALUES(1036,217,23); INSERT INTO normal VALUES(843,145,73); INSERT INTO normal VALUES(34,3,23); INSERT INTO normal VALUES(428,222,61); INSERT INTO normal VALUES(135,312,166); INSERT INTO normal VALUES(428,111,142); INSERT INTO normal VALUES(34,4,59); INSERT INTO normal VALUES(1036,1214,84); INSERT INTO normal VALUES(135,521,178); INSERT INTO normal VALUES(843,732,130); INSERT INTO normal VALUES(522,113,62); INSERT INTO normal VALUES(522,124,59); INSERT INTO normal VALUES(132,115,73); INSERT INTO normal VALUES(132,134,84); INSERT INTO normal VALUES(625,257,23); INSERT INTO normal VALUES(625,412,166); INSERT INTO normal VALUES(392,233,35); INSERT INTO normal VALUES(392,513,130); INSERT INTO normal VALUES(522,113,59); INSERT INTO normal VALUES(34,5,59,2); INSERT INTO normal VALUES(132,122,59,2); INSERT INTO normal VALUES(135,412,59,2); INSERT INTO normal VALUES(392,414,59,2); INSERT INTO normal VALUES(428,333,59,2); INSERT INTO normal VALUES(522,135,59,2); INSERT INTO normal VALUES(625,333,59,2); INSERT INTO normal VALUES(843,363,59,2); INSERT INTO normal VALUES(1036,512,59,2); INSERT INTO normal VALUES(736,11,59,2); INSERT INTO normal VALUES(736,12,59,2); INSERT INTO normal VALUES(736,14,59,2); INSERT INTO normal VALUES(758,25,59,2); INSERT INTO normal VALUES(758,26,59,2); INSERT INTO normal VALUES(758,27,59,2); INSERT INTO normal VALUES(761,31,59,2); INSERT INTO normal VALUES(761,32,59,2); INSERT INTO normal VALUES(761,33,59,4); INSERT INTO normal VALUES(34,5,62,1); INSERT INTO normal VALUES(132,122,62,1); INSERT INTO normal VALUES(135,412,62,1); INSERT INTO normal VALUES(392,414,62,1); INSERT INTO normal VALUES(428,333,62,1); INSERT INTO normal VALUES(522,135,62,1); INSERT INTO normal VALUES(625,333,62,1); INSERT INTO normal VALUES(843,363,62,1); INSERT INTO normal VALUES(1036,512,62,1); INSERT INTO normal VALUES(736,11,53,1); INSERT INTO normal VALUES(736,12,53,1); INSERT INTO normal VALUES(736,14,53,1); INSERT INTO normal VALUES(758,25,142,1); INSERT INTO normal VALUES(758,26,142,1); INSERT INTO normal VALUES(758,27,142,1); INSERT INTO normal VALUES(761,31,178,2); INSERT INTO normal VALUES(761,32,178,2); INSERT INTO normal VALUES(761,33,178,4); INSERT INTO gast VALUES(453,'Muller','Jean-Paul','Havixbeck','48329','Willi-Richter-Platz','2b'); INSERT INTO gast VALUES(14753,'Richter','Trude','Buxtehude','21614','Zwischen den Bruecken','6'); INSERT INTO gast VALUES(795,'Stein','Flut','Herten','46599','Stan-Libuda-Strasse','1'); INSERT INTO gast VALUES(8531,'Mustermann','Martin','Musterstadt','10000','Poststrasse','13-15'); INSERT INTO gast VALUES(7184,'Postmann','Elfriede','Chemnitz','09008','Erich-Honecker-Platz','23'); INSERT INTO gast VALUES(3417,'Randzio','Katharina','Aue','08280','Goethestrasse','101a'); INSERT INTO gast VALUES(59375,'Engelke-Meise','Silke','Herne','44625','Jaegerstrasse','13'); INSERT INTO gast VALUES(58,'Ebbingmann','Adalbert','Fuessen','87629','Froschseenstrasse','33'); INSERT INTO gast VALUES(4711,'Matzke','Muximilian','Waldshut','79761','Kaiserstrasse','27'); INSERT INTO gast VALUES(8624,'Rupprecht','Knecht','Himmelstadt','97267','Kirchplatz','5'); INSERT INTO gast VALUES(2738,'Schmitz','Klaus','Dortmund','44147','Linienstrasse','7b'); INSERT INTO gast VALUES(2631,'Biene','Maja','Blumenberg','50765','Auf der Blume','24'); INSERT INTO gast VALUES(25,'Binz','Gunnar','Duesseldorf','40549','Heerdter Sandberg','3'); INSERT INTO gast VALUES(26,'Haller','Karl-Heinz','Dortmund','44143','Breierspfad','134'); INSERT INTO gast VALUES(27,'Kloepping','Harald','Bamberg','96058','Eckeystr','15'); INSERT INTO gast VALUES(28,'Schlanstein','Christina','Dillenburg','35683','Carl-Schurz-Str','9'); INSERT INTO gast VALUES(29,'Gauss','Kerstin','Neuss','41453','Badstr','3'); INSERT INTO gast VALUES(30,'Hansen','Irmgard','Bamberg','96023','Neuer Weg','15'); INSERT INTO gast VALUES(31,'Rosenberg','Brigitte','Duisburg','41025','Rahmerstr','168'); INSERT INTO gast VALUES(32,'Lampe','Rosa','Vechta','49377','Schwichtelerstr','14'); INSERT INTO gast VALUES(33,'Mondo','Dolores','Hagen','58093','Dortmunder Str','15a'); INSERT INTO reservierung VALUES(86542,'2022-09-09',34,453); INSERT INTO reservierung VALUES(145863,'2022-01-02',135,14753); INSERT INTO reservierung VALUES(46357,'2023-04-01',843,795); INSERT INTO reservierung VALUES(43358,'2023-03-23',428,8531); INSERT INTO reservierung VALUES(135,'2015-09-19',1036,7184); INSERT INTO reservierung VALUES(6834,'2024-08-13',34,3417); INSERT INTO reservierung VALUES(115,'2023-05-27',428,59375); INSERT INTO reservierung VALUES(8673,'2023-05-03',135,58); INSERT INTO reservierung VALUES(24,'2019-08-31',843,4711); INSERT INTO reservierung VALUES(9999,'2023-12-12',1036,8624); INSERT INTO reservierung VALUES(735,'2023-03-13',132,4711); INSERT INTO reservierung VALUES(567,'2022-02-24',625,2738); INSERT INTO reservierung VALUES(568,'2023-02-24',135,2738); INSERT INTO reservierung VALUES(818,'2024-03-01',392,8624); INSERT INTO reservierung VALUES(361,'2018-12-21',34,59375); INSERT INTO reservierung VALUES(5294,'2021-10-10',392,3417); INSERT INTO reservierung VALUES(2732,'2016-04-13',132,7184); INSERT INTO reservierung VALUES(2432,'2021-07-16',522,453); INSERT INTO reservierung VALUES(1953,'2021-08-23',135,14753); INSERT INTO reservierung VALUES(356,'2024-01-01',1036,2631); INSERT INTO reservierung VALUES(5646,'2025-02-05',522,795); INSERT INTO reservierung VALUES(6748,'2025-03-22',522,795); INSERT INTO reservierung VALUES(2748,'2024-02-10',132,4711); INSERT INTO reservierung VALUES(2349,'2024-02-10',132,58); INSERT INTO reservierung VALUES(4241,'2025-02-10',132,58); INSERT INTO reservierung VALUES(6878,'2026-02-10',132,58); INSERT INTO reservierung VALUES(221,'2022-05-15',736,25); INSERT INTO reservierung VALUES(222,'2022-01-11',758,26); INSERT INTO reservierung VALUES(223,'2021-11-05',761,27); INSERT INTO reservierung VALUES(224,'2021-10-03',761,28); INSERT INTO reservierung VALUES(225,'2020-07-18',135,27); INSERT INTO reservierung VALUES(226,'2020-11-06',522,29); INSERT INTO reservierung VALUES(227,'2020-12-13',428,30); INSERT INTO reservierung VALUES(228,'2021-02-15',843,31); INSERT INTO reservierung VALUES(229,'2021-03-25',135,32); INSERT INTO reservierung VALUES(230,'2021-04-13',758,33); INSERT INTO reservierung VALUES(231,'2021-06-07',758,33); INSERT INTO reservierung VALUES(232,'2021-08-13',522,25); INSERT INTO reservierung VALUES(233,'2022-04-13',736,29); INSERT INTO reservierung VALUES(234,'2022-02-26',522,27); INSERT INTO reservierung VALUES(235,'2022-08-13',761,26); INSERT INTO reservierung VALUES(236,'2022-09-30',761,25); INSERT INTO reservierung VALUES(237,'2022-03-11',843,33); INSERT INTO reservierung VALUES(238,'2022-04-13',843,58); INSERT INTO reservierung VALUES(239,'2021-11-11',758,58); INSERT INTO reservierung VALUES(240,'2022-02-03',135,453); INSERT INTO reservierung VALUES(241,'2020-12-28',522,795); INSERT INTO rposition VALUES(86542,1,'2022-10-10','2023-10-10',34,3); INSERT INTO rposition VALUES(145863,1,'2023-04-11','2023-04-22',135,312); INSERT INTO rposition VALUES(145863,2,'2023-04-11','2023-04-22',135,313); INSERT INTO rposition VALUES(43358,1,'2023-05-05','2023-05-06',428,222); INSERT INTO rposition VALUES(46357,1,'2024-04-26','2024-05-07',843,145); INSERT INTO rposition VALUES(135,1,'2017-09-18','2017-09-22',1036,217); INSERT INTO rposition VALUES(115,1,'2024-05-28','2024-05-31',428,111); INSERT INTO rposition VALUES(24,1,'2021-04-08','2021-04-25',843,732); INSERT INTO rposition VALUES(24,2,'2021-04-08','2021-04-25',843,145); INSERT INTO rposition VALUES(24,3,'2021-07-31','2021-09-01',34,3); INSERT INTO rposition VALUES(24,4,'2021-07-31','2021-09-01',34,4); INSERT INTO rposition VALUES(8673,1,'2023-07-01','2023-07-15',135,521); INSERT INTO rposition VALUES(6834,1,'2024-08-15','2024-08-27',34,4); INSERT INTO rposition VALUES(9999,1,'2024-04-30','2024-06-30',1036,1214); INSERT INTO rposition VALUES(9999,2,'2024-07-01','2024-07-31',135,312); INSERT INTO rposition VALUES(9999,3,'2024-08-31','2024-10-01',843,145); INSERT INTO rposition VALUES(9999,4,'2024-07-01','2024-07-31',135,313); INSERT INTO rposition VALUES(735,1,'2023-03-20','2024-04-20',392,233); INSERT INTO rposition VALUES(567,1,'2023-04-23','2023-05-07',522,113); INSERT INTO rposition VALUES(568,1,'2023-02-23','2023-03-07',135,412); INSERT INTO rposition VALUES(818,1,'2024-03-24','2024-03-31',132,134); INSERT INTO rposition VALUES(361,1,'2019-12-23','2020-01-06',625,257); INSERT INTO rposition VALUES(5294,1,'2022-04-02','2022-04-16',428,111); INSERT INTO rposition VALUES(2732,1,'2016-08-17','2016-09-04',522,124); INSERT INTO rposition VALUES(2432,1,'2022-06-15','2022-07-16',132,115); INSERT INTO rposition VALUES(1953,1,'2024-08-07','2024-08-15',392,513); INSERT INTO rposition VALUES(818,2,'2024-04-01','2024-04-12',843,732); INSERT INTO rposition VALUES(356,1,'2024-01-02','2024-04-22',522,113); INSERT INTO rposition VALUES(5646,1,'2025-03-06','2025-03-22',843,145); INSERT INTO rposition VALUES(6748,1,'2026-01-01','2026-01-08',843,145); INSERT INTO rposition VALUES(2748,1,'2024-04-01','2024-04-08',392,233); INSERT INTO rposition VALUES(2349,1,'2024-07-16','2024-07-18',392,233); INSERT INTO rposition VALUES(4241,1,'2025-07-16','2025-07-18',392,233); INSERT INTO rposition VALUES(6878,1,'2026-07-16','2026-07-18',392,233); INSERT INTO rposition VALUES(221,1,'2022-05-25','2022-06-05',736,11); INSERT INTO rposition VALUES(222,1,'2022-04-15','2022-04-18',736,12); INSERT INTO rposition VALUES(223,1,'2022-01-11','2022-01-18',736,14); INSERT INTO rposition VALUES(223,2,'2022-02-11','2022-02-18',736,11); INSERT INTO rposition VALUES(223,3,'2022-03-11','2022-03-18',736,14); INSERT INTO rposition VALUES(224,1,'2021-11-11','2021-11-15',758,25); INSERT INTO rposition VALUES(225,1,'2020-07-31','2020-08-15',758,26); INSERT INTO rposition VALUES(226,1,'2020-11-11','2020-11-13',758,27); INSERT INTO rposition VALUES(227,1,'2021-01-12','2021-01-15',761,31); INSERT INTO rposition VALUES(228,1,'2021-03-02','2021-03-08',761,32); INSERT INTO rposition VALUES(228,2,'2021-04-02','2021-04-08',761,32); INSERT INTO rposition VALUES(228,3,'2021-05-02','2021-05-08',761,32); INSERT INTO rposition VALUES(229,1,'2021-03-28','2021-04-07',761,33); INSERT INTO rposition VALUES(230,1,'2021-05-02','2021-05-13',132,122); INSERT INTO rposition VALUES(231,1,'2021-07-01','2021-07-05',34,3); INSERT INTO rposition VALUES(231,2,'2021-07-01','2021-07-05',34,4); INSERT INTO rposition VALUES(231,3,'2021-07-01','2021-07-05',34,5); INSERT INTO rposition VALUES(232,1,'2021-09-19','2021-09-21',135,412); INSERT INTO rposition VALUES(233,1,'2022-05-01','2022-05-05',392,414); INSERT INTO rposition VALUES(234,1,'2022-03-01','2022-03-05',428,333); INSERT INTO rposition VALUES(235,1,'2021-09-01','2021-09-05',522,135); INSERT INTO rposition VALUES(236,1,'2021-12-01','2021-12-10',625,333); INSERT INTO rposition VALUES(237,1,'2022-03-18','2022-03-25',843,363); INSERT INTO rposition VALUES(238,1,'2021-07-01','2021-07-05',1036,512); INSERT INTO rposition VALUES(239,1,'2021-11-11','2021-11-15',758,26); INSERT INTO rposition VALUES(240,1,'2022-02-11','2022-02-15',135,412); INSERT INTO rposition VALUES(241,1,'2021-01-02','2021-01-09',522,135); INSERT INTO zusatz VALUES(735,1,84,'2023-03-21','2024-03-30'); INSERT INTO zusatz VALUES(567,1,61,'2023-04-23','2023-05-07'); INSERT INTO zusatz VALUES(818,1,111,'2024-03-24','2024-03-28'); INSERT INTO zusatz VALUES(361,1,142,'2019-12-26','2020-01-06'); INSERT INTO zusatz VALUES(43358,1,154,'2023-05-05','2023-05-06'); INSERT INTO zusatz VALUES(2732,1,47,'2016-08-17','2016-08-18'); INSERT INTO zusatz VALUES(2432,1,123,'2022-06-30','2022-07-01'); INSERT INTO zusatz VALUES(1953,1,178,'2024-08-07','2024-08-15'); INSERT INTO zusatz VALUES(818,2,96,'2024-04-04','2024-04-11'); INSERT INTO zusatz VALUES(818,2,108,'2024-04-03','2024-04-10'); INSERT INTO zusatz VALUES(818,2,111,'2024-04-03','2024-04-11'); INSERT INTO zusatz VALUES(735,1,130,'2023-03-22','2024-03-29'); INSERT INTO zusatz VALUES(145863,1,35,'2023-04-14','2023-04-19'); INSERT INTO zusatz VALUES(46357,1,61,'2024-04-26','2024-05-07'); INSERT INTO zusatz VALUES(46357,1,84,'2024-04-30','2024-05-03'); INSERT INTO zusatz VALUES(46357,1,111,'2024-05-01','2024-05-03'); INSERT INTO zusatz VALUES(46357,1,130,'2024-04-30','2024-05-02'); INSERT INTO zusatz VALUES(135,1,96,'2017-09-19','2017-09-20'); INSERT INTO zusatz VALUES(135,1,108,'2017-09-19','2017-09-19'); INSERT INTO zusatz VALUES(135,1,111,'2017-09-20','2017-09-20'); INSERT INTO zusatz VALUES(24,1,142,'2021-04-16','2021-04-19'); INSERT INTO zusatz VALUES(24,3,178,'2021-08-01','2021-08-27'); INSERT INTO zusatz VALUES(24,4,47,'2021-08-01','2021-08-27'); INSERT INTO zusatz VALUES(8673,1,47,'2023-07-03','2023-07-05'); INSERT INTO zusatz VALUES(9999,1,84,'2024-05-05','2024-05-05'); INSERT INTO zusatz VALUES(9999,1,130,'2024-06-06','2024-06-07'); INSERT INTO zusatz VALUES(9999,2,130,'2024-07-01','2024-07-31'); INSERT INTO zusatz VALUES(9999,3,130,'2024-09-01','2024-09-30'); INSERT INTO zusatz VALUES(9999,3,61,'2024-09-01','2024-09-30'); INSERT INTO zusatz Values(356,1,35,'2024-01-02','2024-04-22'); INSERT INTO zusatz Values(356,1,47,'2024-01-02','2024-04-22'); INSERT INTO zusatz VALUES(221,1,50,'2022-05-25','2022-06-05',2); INSERT INTO zusatz VALUES(221,1,51,'2022-05-25','2022-06-05',2); INSERT INTO zusatz VALUES(222,1,53,'2022-04-15','2022-04-18',2); INSERT INTO zusatz VALUES(224,1,53,'2021-11-11','2021-11-15',1); INSERT INTO zusatz VALUES(225,1,52,'2020-07-31','2020-08-15',1); INSERT INTO zusatz VALUES(226,1,52,'2020-11-11','2020-11-13',1); INSERT INTO zusatz VALUES(227,1,52,'2021-01-12','2021-01-15',2); INSERT INTO zusatz VALUES(229,1,45,'2021-03-29','2021-04-07',2); INSERT INTO zusatz VALUES(230,1,45,'2021-05-03','2021-05-13',1); INSERT INTO zusatz VALUES(230,1,46,'2021-05-03','2021-05-13',1); INSERT INTO zusatz VALUES(232,1,54,'2021-09-19','2021-09-21',1); INSERT INTO zusatz VALUES(233,1,24,'2022-05-01','2022-05-05',1); INSERT INTO zusatz VALUES(234,1,25,'2022-03-03','2022-03-05',1); INSERT INTO zusatz VALUES(235,1,142,'2021-09-03','2021-09-04',4); INSERT INTO zusatz VALUES(235,1,154,'2021-09-03','2021-09-04',1); INSERT INTO zusatz VALUES(239,1,84,'2021-11-11','2021-11-15',1); INSERT INTO zusatz VALUES(240,1,111,'2022-02-11','2022-02-15',1);", }, + { + id: 9, + name: "Use-Case Firma", + category: this.categories[0], + templateQuery: + "CREATE TABLE Abteilung (Abteilungsnr INT PRIMARY KEY,Abteilungsname VARCHAR(255)); CREATE TABLE Person (PersonalNr INT PRIMARY KEY,Name VARCHAR(255),Gehalt DECIMAL(10, 2),Ort VARCHAR(255),Abteilung INT,FOREIGN KEY (Abteilung) REFERENCES abteilung (abteilungsnr)); INSERT INTO Abteilung (Abteilungsnr, Abteilungsname) VALUES (1, 'EDV'),(2, 'Produktion'),(3, 'Vertrieb'),(4, 'Verwaltung'),(5, 'Entwicklung'); INSERT INTO Person (PersonalNr, Name, Gehalt, Ort, Abteilung) VALUES (100, 'Maier', 3800.00, 'Künzelsau', 1),(101, 'Müller', 4100.00, 'Künzelsau', 2),(102, 'Schmidt', 3500.00, 'Öhringen', 1),(103, 'Schulze', 4600.00, 'Heilbronn', 3),(104, 'Hinz', 4200.00, 'Heilbronn', 3),(105, 'Kunz', 4000.00, 'Schwäbisch Hall', 5);", + }, + { + id: 10, + name: "Use-Case Fussballverband", + category: this.categories[0], + templateQuery: + "CREATE TABLE Verein (V_Nr INT PRIMARY KEY,Name VARCHAR(255),Ort VARCHAR(255)); CREATE TABLE Spieler (Pass_Nr INT PRIMARY KEY,Name VARCHAR(255),Geburtsjahr INT,V_Nr INT,FOREIGN KEY (V_Nr) REFERENCES Verein(V_Nr)); CREATE TABLE Meldung (Spieler INT,Saison VARCHAR(5),Verein INT,Einsaetze INT,Tore INT,FOREIGN KEY (Spieler) REFERENCES Spieler(Pass_Nr),FOREIGN KEY (Verein) REFERENCES Verein(V_Nr)); INSERT INTO Verein (V_Nr,Name,Ort) VALUES (1,'Schlappen-Kicker 05','Heilbronn'),(2,'Knochen-Knacker 09','Künzelsau'),(3,'Ballermann 1955','Heilbronn'),(4,'Alte Herren 1880','Schwäbisch Hall'); INSERT INTO Spieler (Pass_Nr,Name,Geburtsjahr,V_Nr) VALUES (1,'Peter Maier',1960,1),(2,'Klaus Müller',1980,2),(3,'Karl Hinz',1987,3),(4,'Thomas Kunze',1975,4); INSERT INTO Meldung (Spieler,Saison,Verein,Einsaetze,Tore) VALUES (1,'00/01',1,6,3),(2,'00/01',3,12,1),(3,'00/01',2,1,0),(1,'99/00',2,6,4),(4,'00/01',1,2,1);", + }, ]; templatesByCategory: any[] = this.getTemplatesByCategory();