CREATE TABLE vasarlok
(
	VasarloID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
	nev CHAR(50) NOT NULL,
	lakcim CHAR(100) NOT NULL,
	varos CHAR(30) NOT NULL
);

CREATE TABLE megrendelesek
(
	rendelesID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
	vasarloID INT UNSIGNED NOT NULL,
	osszeg FLOAT(6,2),
	datum DATE NOT NULL
);

CREATE TABLE konyvek
(
	isbn CHAR(13) NOT NULL PRIMARY KEY,
	szerzo CHAR(50),
	cim CHAR(100),
	ar FLOAT(4,2)
);

CREATE TABLE rendelesi_tetelek
(
	rendelesID INT UNSIGNED NOT NULL,
	isbn char(13) NOT NULL,
	darabszam TINYINT UNSIGNED, PRIMARY KEY (rendelesID, isbn)
);

CREATE TABLE konyv_ertekelesek
(
	isbn CHAR(13) NOT NULL PRIMARY KEY,
	ertekeles TEXT
);

