/* vizsgazo tábla létrehozása */
create table vizsgazo (
	vizsgazoid int auto_increment not null primary key,
    nev varchar(30) not null,
    osztaly char(4),
    szuldat date not null
);
/* vizsgatargy tábla létrehozása */
create table vizsgatargy (
 vizsgatargyid int auto_increment not null primary key,
 tantargy varchar(30) not null,
 maxszobeli	 int(3) not null,
 maxirasbeli int(3) not null
);
/* eredmeny tábla létrehozása */
create table eredmeny (
	eredmenyid int auto_increment not null primary key,
	vizsgazoid int not null,
	vizsgatargyid int not null,
	szobeli int(3) not null,
	irasbeli int(3) not null,
    foreign key (vizsgazoid) references vizsgazo(vizsgazoid),
    foreign key (vizsgatargyid) references  vizsgatargy(vizsgatargyid)
);

/* vizsgazo tábla feltöltése */
insert into vizsgazo (nev,osztaly,szuldat) values
("Borbás Ferenc","11/B","2008.04.23"),
("Sima Dezső","11/C","2008.05.10"),
("Lajos Lajos","11/C","2009.01.23"),
("Lant János","12/D","2007.12.23"),
("Fogó Róbert","11/C","2008.08.06"),
("Pisty Mihály","12/D","2006.01.23"),
("Dóri Béla","11/B","2008.10.10"),
("Nikk Gábor","12/B","2006.11.20"),
("Budai Tamás","12/A","2007.04.01"),
("Bog Aladár","12/A","2007.09.07"),
("Bálint Gábor","11/B","2008.12.12"),
("Fekete Zsolt","12/A","2006.11.07"),
("Kis Ábel","12/A","2007.05.23"),
("Hámori Frigyes","11/C","2008.10.08"),
("Kosztolányi András","11/B","2008.07.20"),
("Sebes Vilmos","11/A","2008.07.04"),
("Pallos Ágoston","12/A","2006.10.17"),
("Szűcs Lázár","12/D","2007.03.30"),
("Weisz Richárd","11/B","2008.02.12"),
("Tóth Zoltán","12/B","2006.09.29"),
("Pók Réka","12/C","2007.02.11"),
("Szabó Ottó","12/A","2006.12.01"),
("Füst Szabolcs","12/C","2006.12.06"),
("Budai Ferenc","11/A","2008.06.23"),
("Szász György","12/A","2007.08.23"),
("Fenyves Attila","12/B","2006.05.05"),
("Ilkei Gyula","11/B","2008.10.07"),
("Eszes Győző","12/C","2007.03.26"),
("Izsók Gusztáv","12/C","2006.06.06"),
("Mind Ákos","12/C","2007.10.16"),
("Dunai Konrád","12/A","2006.12.12"),
("Kovács István","12/D","2007.06.12"),
("Halmos István","12/C","2007.01.11"),
("Hrisztov Temir","11/B","2009.02.13"),
("Holzi Ervin","12/D","2006.12.11"),
("Éger Imre","12/C","2007.04.04"),
("Budavári Bence","12/D","2007.05.18"),
("Korcsok Lajos","12/B","2007.11.02"),
("Vass István","12/D","2007.04.08"),
("Zerk Endre","11/C","2009.05.03"),
("Widek Zsolt","12/B","2006.12.30"),
("Jag Antal","12/D","2007.09.23"),
("Pusztai Tamás","12/C","2007.03.08"),
("Tóth József","12/C","2006.01.23"),
("Rím Elek","12/A","2007.02.11"),
("Orosz Pál","11/C","2008.06.13"),
("Varga József","12/B","2007.04.16"),
("Duma Árpád","12/A","2007.03.23"),
("Fazekas Tamás","12/C","2006.07.23"),
("Minek Endre","12/A","2007.07.07"),
("Szalma Sándor","12/D","2006.12.12"),
("Geréb Tamás","11/B","2008.07.01"),
("Zombori Ákos","12/D","2007.01.18"),
("Szőke Mátyás","12/C","2007.09.13"),
("Juhász Zsolt","12/A","2007.05.30"),
("Som Lajos","12/A","2006.02.22"),
("Kecskés László","12/B","2007.01.22"),
("Korády Tamás","12/C","2007.06.26"),
("Vlad Igor","12/B","2007.09.20"),
("Károly Gusztáv","12/B","2007.05.30"),
("Kertész Noémi","12/D","2006.11.30"),
("Pintér Zoltán","12/B","2007.05.10"),
("Koch Péter","12/C","2007.11.17"),
("Sár Gábor","11/A","2008.07.18"),
("Berger Péter","12/C","2007.04.11"),
("Karlsen Ottó","12/C","2007.09.13"),
("Domonkos Zsolt","12/A","2007.03.28"),
("Szónok Balázs","12/C","2007.07.18"),
("Szőke Petra","12/C","2007.05.01"),
("Molnár Gergely","11/B","2008.04.08"),
("Kiss Sándor","12/D","2006.10.10"),
("Fehér Zoltán","12/C","2007.09.11"),
("Csordás Kálmán","12/B","2007.02.20"),
("Madár Mónika","12/C","2007.05.28"),
("Mike János","12/B","2007.08.03"),
("Mészáros Tibor","11/A","2008.09.13"),
("Bodnár Zoltán","12/C","2007.08.19"),
("Démon Endre","12/A","2007.06.28"),
("Farkas Béla","12/D","2007.02.11"),
("Kovács Pál","12/C","2007.01.10"),
("Sípos Tamara","12/A","2007.12.27"),
("Hires Zsolt","11/B","2008.06.01"),
("Sebő Tamás","12/D","2007.07.04"),
("Dobos Olívia","12/C","2007.09.06"),
("Kremp Gusztáv","12/A","2007.01.01"),
("Kovács Gyöngyvér","12/A","2007.04.04"),
("Lovas Lujza","12/D","2006.12.12"),
("Nyúl Péter","12/B","2007.11.11"),
("Presszer Helga","11/B","2008.08.28"),
("Monostori Petra","12/A","2007.04.24"),
("Piros Gábor","12/A","2007.12.21"),
("Gémes Vilmos","12/D","2007.05.15"),
("Bertoli Róbert","12/C","2007.04.14"),
("Szilágyi István","12/C","2007.04.24"),
("Hajas Attila","12/A","2007.02.22"),
("Szőke Márta","11/A","2008.09.19"),
("Szendrei Igor","12/B","2007.03.13"),
("Józan Gábor","12/A","2007.07.27"),
("Nagy László","12/C","2007.07.17"),
("Novák Tamás","12/A","2007.08.18"),
("Horváth Ferenc","12/D","2007.08.28"),
("Dudás Krisztián","12/A","2007.08.08"),
("Kockás Tamás","12/C","2007.07.03"),
("Retkes Flórián","12/B","2007.04.25"),
("Fekete Zoltán","11/A","2008.07.03"),
("Petz Imre","12/D","2007.02.16"),
("Tahi Albert","12/D","2007.06.03"),
("Zsák Zsigmond","12/C","2007.09.15"),
("Tóth István","12/A","2007.09.27"),
("Vincze Tibor","11/C","2008.02.08"),
("Lipót Odett","12/B","2007.07.14"),
("Sós Imre","12/D","2006.12.28"),
("Kovács Zoltán","12/A","2007.05.09"),
("Müller Péter","12/A","2007.01.21"),
("Egyed Oszkár","12/C","2007.06.04"),
("Polgár István","11/D","2008.01.29"),
("Kállai István","12/A","2007.02.18"),
("Bognár Imre","12/D","2007.06.19"),
("Palotai Márk","12/C","2007.04.27"),
("Guttmann Gabriella","12/C","2007.08.01"),
("Alsó Endre","12/C","2007.06.13"),
("Borisz Norbert","12/B","2007.03.08"),
("Tar József","12/D","2007.05.10"),
("Váci Kamilla","12/A","2007.05.19"),
("Kiss Lajos","12/B","2007.05.10"),
("Kontár Róbert","12/C","2007.06.02"),
("Dobó István","12/C","2007.01.26"),
("Saras Mihály","12/D","2007.09.15"),
("Miklósi Imola","12/C","2007.02.07"),
("Dombi Ákos","12/B","2007.05.14");

/* vizsgatargy tábla feltöltése */
insert into vizsgatargy (tantargy,maxszobeli,maxirasbeli) values
("Magyar nyelv és irodalom",50,100),
("Történelem",60,100),
("Matematika",50,100),
("Informatika",30,120),
("Fizika",50,100),
("Kémia",50,100),
("Angol",30,120),
("Német",30,120),
("Földrajz",50,100),
("Biológia",50,100);

/* eredmeny tábla feltöltése */
insert into eredmeny (vizsgazoid,vizsgatargyid,szobeli,irasbeli) values
(1,10,26,87),
(2,6,20,23),
(3,2,27,29),
(4,3,4,15),
(5,2,8,78),
(6,1,18,8),
(7,2,53,49),
(8,5,24,57),
(9,9,5,51),
(10,8,14,21),
(11,5,6,32),
(12,6,16,70),
(13,4,4,55),
(14,1,7,62),
(15,8,17,56),
(16,9,5,79),
(17,6,18,32),
(18,2,28,39),
(19,5,39,56),
(20,7,25,12),
(21,3,22,35),
(22,2,27,82),
(23,6,41,60),
(24,6,18,34),
(25,1,19,70),
(25,7,12,92),
(26,4,17,92),
(26,8,5,8),
(27,7,25,28),
(27,10,41,93),
(28,9,33,6),
(28,3,17,54),
(29,7,16,99),
(29,6,14,13),
(30,10,34,42),
(30,9,20,7),
(31,1,49,23),
(31,9,47,84),
(32,7,6,33),
(32,2,5,58),
(33,9,23,5),
(33,3,19,67),
(34,2,53,56),
(34,3,27,59),
(35,7,4,27),
(35,4,3,104),
(36,2,33,36),
(36,8,12,32),
(37,1,44,65),
(37,10,22,70),
(38,4,21,6),
(39,6,38,64),
(40,1,6,25),
(41,3,25,95),
(42,8,28,85),
(43,8,4,67),
(44,10,34,17),
(45,3,23,81),
(46,2,26,81),
(47,10,31,90),
(48,4,20,59),
(49,8,21,98),
(50,8,3,16),
(51,8,4,43),
(52,8,28,95),
(53,6,39,6),
(54,10,44,80),
(55,8,20,69),
(56,9,15,21),
(57,8,19,76),
(58,6,46,55),
(59,2,33,31),
(60,4,25,23),
(61,3,32,97),
(62,9,18,63),
(63,2,19,85),
(64,9,15,57),
(65,5,43,91),
(66,1,40,55),
(67,2,51,96),
(68,6,7,13),
(69,4,28,42),
(70,1,47,8),
(71,1,33,30),
(72,10,9,54),
(73,4,28,54),
(74,10,18,32),
(75,2,34,54),
(76,7,17,23),
(77,6,34,94),
(77,6,18,72),
(78,4,9,76),
(78,1,4,24),
(79,1,17,82),
(79,4,27,8),
(80,8,29,62),
(80,2,9,10),
(81,10,43,33),
(81,5,5,49),
(82,2,44,60),
(82,1,31,81),
(83,3,10,59),
(83,3,33,79),
(84,8,20,34),
(84,6,20,12),
(85,7,19,24),
(85,6,36,93),
(86,7,12,27),
(86,5,11,36),
(87,4,23,72),
(87,7,16,25),
(88,1,8,39),
(88,2,18,95),
(89,7,17,88),
(90,10,38,57),
(91,5,32,6),
(92,9,11,92),
(93,5,34,39),
(94,2,36,79),
(95,7,7,60),
(96,6,22,16),
(97,8,3,20),
(98,8,16,88),
(99,9,31,41),
(100,5,26,18),
(101,2,20,93),
(102,10,31,65),
(103,2,52,23),
(104,7,8,59),
(105,9,36,24),
(106,1,29,21),
(107,9,46,23),
(108,2,59,99),
(109,2,48,74),
(110,10,44,39),
(111,4,6,5),
(112,2,41,32),
(113,7,7,46),
(114,6,19,61),
(115,9,8,88),
(116,8,19,98),
(117,3,10,42),
(118,5,12,70),
(119,2,10,30),
(120,1,24,73),
(121,7,4,32),
(122,10,35,64),
(122,4,22,36),
(123,9,42,31),
(123,10,16,33),
(124,10,5,72),
(124,10,49,96),
(125,6,13,75),
(125,1,15,72),
(126,1,23,21),
(126,4,11,93),
(127,1,31,78),
(127,7,27,29),
(128,3,4,62),
(128,9,33,96),
(129,3,24,15),
(129,10,35,63),
(130,1,26,86),
(130,7,15,79);
