added content files

This commit is contained in:
Sven Vogel 2023-12-01 16:32:24 +01:00
parent 4e73beb3f2
commit 21a5632656
2 changed files with 309 additions and 0 deletions

235
res/content.sql Normal file
View File

@ -0,0 +1,235 @@
/* Clear tables first */
-- TRUNCATE does not work here because of existing
-- foreign key references. Use DELETE with WHERE condition
-- for the primary key instead.
DELETE FROM tutorial.Employee WHERE id <> 0; -- mutual dependency with Department (departmentId)
DELETE FROM tutorial.AcademicTitle WHERE id <> 0;
DELETE FROM tutorial.PostalLocation WHERE id <> 0;
DELETE FROM tutorial.JobPosition WHERE id <> 0;
DELETE FROM tutorial.Department WHERE id <> 0; -- mutual dependency with Employee (headId)
DELETE FROM tutorial.Room WHERE id <> 0;
DELETE FROM tutorial.AcademicTitle WHERE id <> 0;
/* reset automatically generated id counter */
ALTER TABLE tutorial.AcademicTitle AUTO_INCREMENT=1;
ALTER TABLE tutorial.Employee AUTO_INCREMENT=1;
ALTER TABLE tutorial.AcademicTitle AUTO_INCREMENT=1;
ALTER TABLE tutorial.PostalLocation AUTO_INCREMENT=1;
ALTER TABLE tutorial.JobPosition AUTO_INCREMENT=1;
ALTER TABLE tutorial.Department AUTO_INCREMENT=1;
ALTER TABLE tutorial.Room AUTO_INCREMENT=1;
ALTER TABLE tutorial.AcademicTitle AUTO_INCREMENT=1;
/* TABLE PostalLocation */
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('09243','Niederfrohna','');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('13509','Berlin','');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('13509','Berlin','Borsigwalde');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('13509','Berlin','Kol. Frühauf');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('13509','Berlin','Kol. Humboldt');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('13509','Berlin','Reinickendorf');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('13509','Berlin','Tegel');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('13509','Berlin','Wittenau');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('60435','Frankfurt am Main','');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('60435','Frankfurt am Main','Berkersheim');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('60435','Frankfurt am Main','Bornheim');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('60435','Frankfurt am Main','Dornbusch');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('60435','Frankfurt am Main','Eckenheim');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('60435','Frankfurt am Main','Nordend-West');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('60435','Frankfurt am Main','Preungesheim');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('66123','Saarbrücken','');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('66123','Saarbrücken','Jägersfreude');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('66123','Saarbrücken','St Johann');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Bühlingen');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Eitersberg');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Enslingen');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Hausen');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Herblingen');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Hochaltingen');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Hochstadt');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Raustetten');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Schopflohe');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('86742','Fremdingen','Seglohe');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','Arndorf');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','Asenhof');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','Eisenstorf');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','Haunersdorf');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','Kleinweichs');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','Lailling');
INSERT INTO tutorial.PostalLocation (code, cityName, cityDistrictName) VALUES ('94563','Otzing','Reit');
/* TABLE AcademicTitle */
INSERT INTO tutorial.AcademicTitle (name) VALUES ('none');
INSERT INTO tutorial.AcademicTitle (name) VALUES ('Dr.');
INSERT INTO tutorial.AcademicTitle (name) VALUES ('Prof.');
INSERT INTO tutorial.AcademicTitle (name) VALUES ('Prof. Dr.');
INSERT INTO tutorial.AcademicTitle (name) VALUES ('PHD');
SELECT * FROM tutorial.AcademicTitle;
/* TABLE JobPosition */
INSERT INTO tutorial.JobPosition (name) VALUES ('Assitent');
INSERT INTO tutorial.JobPosition (name) VALUES ('Developper');
INSERT INTO tutorial.JobPosition (name) VALUES ('Senior Developper');
INSERT INTO tutorial.JobPosition (name) VALUES ('Architect');
INSERT INTO tutorial.JobPosition (name) VALUES ('Senior Architect');
INSERT INTO tutorial.JobPosition (name) VALUES ('Consultant');
/* TABLE Department */
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('Big Customers','Großkunden');
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('Smaller Customers','Kleinkunden');
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('DEV 1','Entwicklung 1');
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('DEV 2','Entwicklung 2');
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('DEV 3','Entwicklung 3');
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('Quality 1','Qualitätsabteilgung 1');
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('Quality 2','Qualitätsabteilgung 2');
INSERT INTO tutorial.Department(name, responsibilityDescription) VALUES ('Quality 3','Qualitätsabteilgung 3');
/* TABLE ROOM */
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('A-EG.1','Building A',20, 4, 4, 600);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('A-EG.2','Building A',21, 5, 4, 600);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('A-1.1','Building A',20, 4, 4, 550);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('A-1.2','Building A',25.5, 6, 5, 700);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('A-2.1','Building A',20,4, 4, 600);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('A.2.2','Building A',21,4, 4, 400);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('B-EG.1','Building B',30.5,8, 6, 1000);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('B-EG.2','Building B',21.5,4, 4, 650);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('B-1.1','Building B',34,4, 5, 966);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('B.1.2','Building B',22,4,6, 600);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('B-2.1','Building B',25.07,6,6, 780);
INSERT INTO tutorial.Room (name,buildingName, M2_area, seatCount, computerCount, EUR_rentalAmount)
VALUES ('B-2.2','Building B', 21,4,4, 600 );
/* TABLE Employee */
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Aiden','Bancroft',2,1,5,'1992-08-16','2009-01-01',29,'1','HIstraße',50000,'49175317080' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Alessio','Kennedy',5,6,5,'1986-01-28','2004-01-01',15,'55','EFstraße',44000,'49180536973' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Alisa','Ross',3,7,1,'1984-10-11','2003-09-01',11,'25','DEstraße',46000,'49176996940' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Amilia','Ghiretti',2,1,1,'1998-01-02','2018-04-01',1,'55','IJstraße',42000,'49174073993' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Anita','Cooper',4,5,3,'1982-01-11','1999-08-01',11,'49','ABstraße',56000,'49172248753' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Ansgar','Mitchell',5,1,3,'1992-07-11','2011-09-01',22,'55','IJstraße',50000,'49171118893' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Armin','Thomas',2,1,7,'1990-12-05','2008-04-01',26,'25','JKstraße',52000,'49173549065' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Aylin','Merz',1,8,10,'1996-02-08','2013-03-01',22,'49','JKstraße',48000,'49174934384' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Benno','Gray',4,5,2,'1998-03-16','2017-02-01',19,'7','CDstraße',40000,'49172760184' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Adelina','vanBeethoven',4,6,10,'1992-08-08','2009-07-01',26,'49','CDstraße',50000,'49171246983' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Alen','Harris',2,3,10,'1990-08-25','2010-04-01',29,'13','FGstraße',58000,'49173481938' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Ali','Phillips',1,1,1,'1984-10-14','2001-03-01',4,'43','GHstraße',52000,'49175976398' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Alva','Anfang',6,4,4,'1988-06-28','2006-01-01',4,'13','JKstraße',40000,'49174541849' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Andre','Bell',1,5,4,'1982-09-16','2000-04-01',1,'1','DEstraße',46000,'49176889165' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Anneke','Khan',2,4,5,'1982-07-28','1999-08-01',8,'1','HIstraße',52000,'49178154292' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Ardian','Roy',4,1,3,'1996-06-16','2016-01-01',8,'7','CDstraße',54000,'49178944960' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Asya','Gomez',5,2,10,'1984-08-11','2003-11-01',22,'31','HIstraße',58000,'49178609810' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Bela','Cox',5,5,9,'1990-07-25','2009-03-01',8,'31','BCstraße',54000,'49177291795' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Betty','Moore',6,4,4,'1986-08-19','2004-03-01',26,'7','FGstraße',48000,'49175157592' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Carlo','Thompson',4,2,9,'1992-02-11','2009-02-01',15,'55','BCstraße',42000,'49173165393' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Cem','Musk',3,4,10,'1988-04-05','2007-04-01',19,'25','HIstraße',48000,'49179663537' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Christian','Green',4,1,2,'1996-08-16','2016-10-01',19,'1','JKstraße',46000,'49171467357' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Cornelius','Palmer',4,1,2,'1990-09-25','2008-07-01',22,'43','FGstraße',50000,'49180422494' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Darian','Wright',1,6,7,'1986-09-25','2004-08-01',26,'1','ABstraße',56000,'49173858148' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Denis','Bailey',2,6,1,'2001-01-05','2021-02-01',4,'25','HIstraße',48000,'49178708283' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Domenik','Jones',5,3,4,'1990-10-11','2009-04-01',26,'31','FGstraße',58000,'49174617250' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Eduard','Rogers',1,3,3,'1998-07-16','2016-09-01',33,'13','DEstraße',44000,'49172980934' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Eleni','Ferber',2,6,1,'1988-10-19','2007-10-01',26,'13','ABstraße',54000,'49173492677' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Ella','Collins',5,8,11,'2001-08-05','2018-05-01',33,'19','BCstraße',48000,'49179174646' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Emin','Matthews',4,1,4,'1984-10-22','2001-07-01',22,'19','ABstraße',42000,'49174800196' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Enzo','Stewart',4,6,10,'1998-06-08','2017-02-01',29,'25','JKstraße',42000,'49180655072' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Evelyn','Lemke',1,5,3,'1984-07-25','2003-01-01',22,'1','BCstraße',56000,'49179162321' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Felina','Gelbero',5,6,2,'1994-03-05','2013-03-01',22,'37','BCstraße',56000,'49179612307' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Flora','O`Ryan',6,5,2,'1986-12-16','2003-09-01',26,'31','EFstraße',50000,'49173315587' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Frieda','Wilson',3,3,5,'2001-07-08','2018-08-01',15,'31','CDstraße',50000,'49172112154' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Gioia','Abernathy',1,5,10,'1998-08-02','2015-01-01',8,'7','JKstraße',50000,'49178521414' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Halil','Jackson',2,2,3,'1996-08-08','2015-09-01',22,'7','EFstraße',42000,'49173150887' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Hayley','Robertson',4,1,11,'1982-07-16','1999-09-01',15,'49','IJstraße',52000,'49179963682' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Henrik','Cixin',4,8,9,'1994-02-19','2013-08-01',4,'43','BCstraße',48000,'49171429589' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Ilaria','Chapman',4,7,7,'1982-04-25','1999-07-01',22,'25','EFstraße',40000,'49177828426' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Ivan','Marshall',4,8,1,'1998-08-05','2017-04-01',4,'43','BCstraße',46000,'49176843275' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Janina','Smith',1,5,7,'1982-09-08','2002-05-01',22,'1','DEstraße',52000,'49171898711' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Jaron','Kubicki',2,2,1,'2001-09-28','2019-10-01',4,'13','GHstraße',48000,'49173408894' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Jeremias','Fox',1,4,11,'1994-08-16','2012-03-01',33,'1','DEstraße',50000,'49178748172' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Jody','O`Connor',5,1,1,'1992-01-05','2012-11-01',19,'1','EFstraße',42000,'49174112354' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Joline','White',1,4,4,'1986-09-28','2003-10-01',33,'1','FGstraße',50000,'49171481797' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Josef','Weiss',5,5,7,'2001-10-19','2021-01-01',15,'1','IJstraße',58000,'49174093840' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Juliana','Hughes',4,8,11,'1990-02-14','2009-09-01',19,'37','GHstraße',40000,'49175824586' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Kai','Richards',4,5,4,'1992-07-28','2011-11-01',33,'55','JKstraße',52000,'49177080603' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Keanu','Bek',3,8,7,'1982-09-08','2001-02-01',22,'43','GHstraße',40000,'49173751273' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Kirill','Campbell',3,5,7,'1990-02-02','2009-05-01',29,'49','GHstraße',56000,'49171974916' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Lars','Lewis',5,3,1,'1990-10-19','2007-02-01',15,'55','CDstraße',50000,'49180705248' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Leia','Shaw',1,6,9,'1982-01-19','2000-07-01',19,'19','BCstraße',46000,'49177369520' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Leo','Hoffmeister-Kraut',1,6,3,'1992-01-08','2009-07-01',11,'19','HIstraße',48000,'49173940537' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Levin','Ellis',1,4,11,'2001-08-14','2020-11-01',29,'37','FGstraße',58000,'49172830466' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Lilly','Murphy',2,1,4,'1984-09-28','2001-09-01',11,'31','HIstraße',42000,'49177042107' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Livia','Wang',2,4,2,'1984-09-08','2003-04-01',4,'49','EFstraße',54000,'49173984510' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Lou','vonderLeyen',5,1,5,'1984-08-14','2003-09-01',26,'37','BCstraße',52000,'49179027233' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Luiz','Hathaway',6,5,1,'1986-10-19','2004-02-01',15,'37','BCstraße',52000,'49180996944' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Magnus','Price',4,2,8,'1990-06-19','2007-01-01',29,'1','EFstraße',48000,'49177726484' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Malina','Atreides',2,5,11,'2001-08-22','2018-05-01',4,'25','FGstraße',44000,'49180717879' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Marian','Brown',6,6,1,'1992-07-19','2009-04-01',15,'19','CDstraße',40001,'49179171636' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Marlena','Knight',3,1,1,'1982-07-08','1999-03-01',29,'37','HIstraße',50000,'49175934128' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Matteo','Rutherford',1,5,5,'1998-08-22','2017-07-01',33,'55','BCstraße',56000,'49176955492' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Mayra','Habeck',1,4,4,'1984-07-08','2001-08-01',4,'25','IJstraße',56000,'49179789295' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Melody','Davies',2,6,11,'1998-10-02','2017-11-01',8,'25','EFstraße',52000,'49171762255' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Mieke','Morningstar',5,7,10,'1996-07-02','2016-04-01',15,'19','BCstraße',50000,'49176567496' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Mina','Tremblay',4,8,1,'1990-12-25','2008-11-01',11,'55','FGstraße',40001,'49177414258' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Mustafa','Seldon',1,5,3,'1996-04-11','2015-07-01',26,'7','EFstraße',54000,'49175104168' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Nayla','Hall',6,1,10,'2001-08-25','2018-09-01',11,'43','EFstraße',44000,'49178608714' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Nika','Patel',1,2,2,'1996-09-22','2015-03-01',33,'7','HIstraße',48000,'49178803486' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Noel','Allen',1,1,3,'1982-06-11','1999-05-01',11,'1','FGstraße',48000,'49177803400' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Pascal','Bancroft',6,6,1,'2001-09-05','2020-09-01',19,'13','JKstraße',54000,'49178819786' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Philine','Kennedy',4,5,5,'1988-03-19','2006-11-01',4,'49','ABstraße',46000,'49180297677' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Ramon','Ross',4,7,1,'1994-08-28','2014-08-01',11,'55','FGstraße',40001,'49175366756' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Rico','Ghiretti',1,2,2,'1996-07-11','2015-07-01',8,'37','EFstraße',44000,'49179001074' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Ruben','Cooper',3,1,5,'1986-09-08','2005-05-01',1,'49','JKstraße',48000,'49174718956' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Sammy','Mitchell',1,4,10,'1982-03-22','2002-01-01',22,'55','IJstraße',50000,'49172314056' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Selim','Thomas',3,3,3,'1982-10-11','1999-05-01',22,'37','DEstraße',40001,'49172538325' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Silas','Merz',2,8,9,'1986-09-16','2003-08-01',15,'19','BCstraße',56000,'49179350530' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Stefan','Gray',2,1,4,'1996-02-28','2014-08-01',8,'7','CDstraße',54000,'49172741736' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Svenja','Owen',5,1,5,'1992-08-05','2012-07-01',1,'37','JKstraße',56000,'49176409730' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 1,'Taylan','Wood',4,8,9,'1998-08-02','2018-07-01',33,'1','FGstraße',46000,'49174634101' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 4,'Tia','Anderson',1,8,4,'1994-02-11','2013-05-01',1,'55','IJstraße',42000,'49174656317' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Tizian','Johnson',3,3,5,'1998-10-22','2016-04-01',15,'19','DEstraße',56000,'49174195776' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Ursula','Rodriguez',4,1,10,'2001-01-19','2020-03-01',33,'7','IJstraße',54000,'49174294798' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Vincent','Faeser',4,3,7,'1994-06-25','2013-04-01',15,'55','HIstraße',52000,'49173616100' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Wolfgang','Clarke',2,1,1,'2001-09-28','2018-01-01',11,'19','IJstraße',44000,'49177330750' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 3,'Yunus','Mason',2,7,5,'1998-04-19','2018-09-01',8,'49','EFstraße',40000,'49176814111' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 5,'Bethany','Stevens',4,3,10,'1996-07-02','2013-08-01',null,'37','JKstraße',52000,'49177861087' );
INSERT INTO tutorial.Employee (`academicTitleId`,`forename`,`surname`,`positionId`,`departmentId`,`roomId`,`dateOfBirth`,`dateOfRecruitment`,`postalLocationId`,`houseNumber`,`streetName`,`EUR_GrossSalary`,`telephoneNumber`) VALUES ( 2,'Lauren','Künast',5,8,3,'1998-12-08','2016-08-01',22,'25','BCstraße',52000,'49176734008' );
UPDATE tutorial.Department SET headId = 4 WHERE id = 1;
UPDATE tutorial.Department SET headId = 17 WHERE id = 2;
UPDATE tutorial.Department SET headId = 11 WHERE id = 3;
UPDATE tutorial.Department SET headId = 13 WHERE id = 4;
UPDATE tutorial.Department SET headId = 5 WHERE id = 5;
UPDATE tutorial.Department SET headId = 2 WHERE id = 6;
UPDATE tutorial.Department SET headId = 3 WHERE id = 7;
UPDATE tutorial.Department SET headId = 8 WHERE id = 8;
SELECT first_value(emp.departmentId) over (partition by emp.departmentId,emp.id ORDER BY emp.departmentId) AS departmentId,
emp.id AS employeeId
FROM tutorial.Employee AS emp;
SELECT
emp.departmentId AS departmentId,
emp.id AS employeeId
FROM tutorial.Employee AS emp
ORDER BY departmentId,employeeId;
/* Check entries */
SELECT * FROM tutorial.Employee;
SELECT * FROM tutorial.AcademicTitle;
SELECT * FROM tutorial.PostalLocation;
SELECT * FROM tutorial.JobPosition;
SELECT * FROM tutorial.Department;
SELECT * FROM tutorial.Room;
SELECT * FROM tutorial.AcademicTitle;

74
res/model.sql Normal file
View File

@ -0,0 +1,74 @@
-- DROP SCHEMA tutorial;
-- ALTER TABLE tutorial.Department DROP FOREIGN KEY Department_FK_headId;
DROP TABLE IF EXISTS tutorial.Employee;
DROP TABLE IF EXISTS tutorial.PostalLocation;
DROP TABLE IF EXISTS tutorial.JobPosition;
DROP TABLE IF EXISTS tutorial.Department;
DROP TABLE IF EXISTS tutorial.Room;
DROP TABLE IF EXISTS tutorial.AcademicTitle;
CREATE SCHEMA IF NOT EXISTS tutorial;
USE tutorial;
CREATE TABLE PostalLocation (
id SERIAL PRIMARY KEY, -- SERIAL: BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE
code CHAR(5) NOT NULL,
cityName VARCHAR(20) NOT NULL,
cityDistrictName VARCHAR(100)
);
CREATE TABLE AcademicTitle (
id SERIAL PRIMARY KEY, -- SERIAL: BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE
name CHAR(10) NOT NULL UNIQUE
);
CREATE TABLE JobPosition (
id SERIAL PRIMARY KEY, -- SERIAL: BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE
name VARCHAR(40) NOT NULL UNIQUE,
description TEXT
);
CREATE TABLE Room (
id SERIAL PRIMARY KEY, -- SERIAL: BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE
name VARCHAR(15) NOT NULL UNIQUE,
buildingName VARCHAR(40) NOT NULL,
M2_area NUMERIC(5,2) NOT NULL,
seatCount INTEGER NOT NULL,
computerCount INTEGER NOT NULL,
EUR_rentalAmount NUMERIC(10,2)
);
CREATE TABLE Department (
id SERIAL PRIMARY KEY, -- SERIAL: BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE
name VARCHAR(40) NOT NULL UNIQUE,
headId BIGINT UNSIGNED,
responsibilityDescription TEXT
);
CREATE TABLE Employee (
id SERIAL PRIMARY KEY, -- SERIAL: BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE
academicTitleId BIGINT UNSIGNED NOT NULL,
forename VARCHAR(40),
surname VARCHAR(50),
positionId BIGINT UNSIGNED,
departmentId BIGINT UNSIGNED,
roomId BIGINT UNSIGNED,
dateOfBirth DATE NOT NULL,
dateOfRecruitment DATE NOT NULL,
postalLocationId BIGINT UNSIGNED,
houseNumber CHAR(10),
streetName VARCHAR(100),
EUR_GrossSalary NUMERIC(12,2),
telephoneNumber CHAR(20),
FOREIGN KEY(AcademicTitleId) REFERENCES AcademicTitle(id),
FOREIGN KEY(positionId) REFERENCES JobPosition(id),
FOREIGN KEY(departmentId) REFERENCES Department(id),
FOREIGN KEY(roomId) REFERENCES Room(id),
FOREIGN KEY(postalLocationId) REFERENCES PostalLocation(id)
);
-- Achtung: schlechtes Design: Employee und Department sind wechselseitig abhängig
-- Der Fremdschlüssel headId auf Employee muss nachträglich ergänzt werden.
ALTER TABLE Department ADD
CONSTRAINT Department_FK_headId
FOREIGN KEY(headId) REFERENCES Employee(id);