CREATE TABLE DEPARTEMENT(
   ID     INTEGER PRIMARY KEY,
   NOM    VARCHAR(255),
   VILLE  VARCHAR(255)
);

CREATE TABLE EMPLOYE(
   ID       INTEGER NOT NULL PRIMARY KEY, 
   PRENOM   VARCHAR(255),
   NOM      VARCHAR(255),
   EMBAUCHE DATE,
   TITRE    VARCHAR(255),
   ID_DEPT  INTEGER NOT NULL,
   SALAIRE  FLOAT,
   TX_COMMISSION FLOAT,
   FOREIGN KEY (ID_DEPT) REFERENCES DEPARTEMENT(ID)
);

CREATE TABLE SUPERIEUR(
   ID_EMPLOYE INTEGER NOT NULL PRIMARY KEY,
   ID_SUPERIEUR INTEGER,
   FOREIGN KEY (ID_EMPLOYE) REFERENCES EMPLOYE(ID),
   FOREIGN KEY (ID_SUPERIEUR) REFERENCES EMPLOYE(ID)
);

INSERT INTO DEPARTEMENT VALUES(10,'Finance','Paris');
INSERT INTO DEPARTEMENT VALUES(20,'Atelier','Grenoble');
INSERT INTO DEPARTEMENT VALUES(30,'Atelier','Lille');
INSERT INTO DEPARTEMENT VALUES(31,'Vente','Paris');
INSERT INTO DEPARTEMENT VALUES(32,'Vente','Grenoble');
INSERT INTO DEPARTEMENT VALUES(33,'Vente','Lille');
INSERT INTO DEPARTEMENT VALUES(34,'Vente','Marseille');
INSERT INTO DEPARTEMENT VALUES(35,'Vente','Lyon');
INSERT INTO DEPARTEMENT VALUES(41,'Distribution','Paris');
INSERT INTO DEPARTEMENT VALUES(42,'Distribution','Grenoble');
INSERT INTO DEPARTEMENT VALUES(43,'Distribution','Lille');
INSERT INTO DEPARTEMENT VALUES(44,'Distribution','Marseille');
INSERT INTO DEPARTEMENT VALUES(45,'Distribution','Lyon');
INSERT INTO DEPARTEMENT VALUES(50,'Administration','Paris');

INSERT INTO EMPLOYE VALUES(1,'Patamob','Adhemar','26-03-2000','President',50,50000,NULL);
INSERT INTO EMPLOYE VALUES(2,'Zeublouze','Agathe','15-04-2000','Dir. Distrib',41,35000,NULL);
INSERT INTO EMPLOYE VALUES(3,'Kuzbidon','Alex','05-05-2000','Dir. Vente',31,34000,NULL);
INSERT INTO EMPLOYE VALUES(4,'Locale','Anasthasie','25-05-2000','Dir. Finance',10,36000,NULL);
INSERT INTO EMPLOYE VALUES(5,'Teutmaronne','Armand','14-06-2000','Dir. Administr',50,36000,NULL);
INSERT INTO EMPLOYE VALUES(6,'Zoudanlkou','Debbie','04-07-2000','Chef Entrepot',41,25000,NULL);
INSERT INTO EMPLOYE VALUES(7,'Rivenbusse','Elsa','24-07-2000','Chef Entrepot',42,24000,NULL);
INSERT INTO EMPLOYE VALUES(8,'Ardelpic','Helmut','13-08-2000','Chef Entrepot',43,23000,NULL);
INSERT INTO EMPLOYE VALUES(9,'Peursconla','Humphrey','02-09-2000','Chef Entrepot',44,22000,NULL);
INSERT INTO EMPLOYE VALUES(10,'Vrante','Helena','22-09-2000','Chef Entrepot',45,21000,NULL);
INSERT INTO EMPLOYE VALUES(11,'Enfaillite','Melusine','12-10-2000','Representant',31,25000,10);
INSERT INTO EMPLOYE VALUES(12,'Eurktumeme','Odile','01-11-2000','Representant',32,26000,12.5);
INSERT INTO EMPLOYE VALUES(13,'Hotdeugou','Olaf','21-11-2000','Representant',33,27000,10);
INSERT INTO EMPLOYE VALUES(14,'Odlavieille','Pacome','11-12-2000','Representant',34,25500,15);
INSERT INTO EMPLOYE VALUES(15,'Amartakaldire','Quentin','31-12-2000','Representant',35,23000,17.5);
INSERT INTO EMPLOYE VALUES(16,'Traibien','Samira','10-01-2001','Secretaire',41,15000,NULL);
INSERT INTO EMPLOYE VALUES(17,'Fonfec','Sophie','20-01-2001','Secretaire',41,14000,NULL);
INSERT INTO EMPLOYE VALUES(18,'Fairant','Teddy','09-02-2001','Secretaire',42,13000,NULL);
INSERT INTO EMPLOYE VALUES(19,'Blaireur','Terry','09-02-2001','Secretaire',42,13000,NULL);
INSERT INTO EMPLOYE VALUES(20,'Ajerre','Tex','19-02-2001','Secretaire',43,13000,NULL);
INSERT INTO EMPLOYE VALUES(21,'Chmonfisse','Thierry','19-02-2001','Secretaire',43,12000,NULL);
INSERT INTO EMPLOYE VALUES(22,'Phototetedemort','Thomas','01-03-2001','Secretaire',44,22500,NULL);
INSERT INTO EMPLOYE VALUES(23,'Kaecoute','Xavier','11-03-2001','Secretaire',34,11500,NULL);
INSERT INTO EMPLOYE VALUES(24,'Adrouille-Toultan','Yves','21-03-2001','Secretaire',45,11000,NULL);
INSERT INTO EMPLOYE VALUES(25,'Anchier','Yvon','31-12-2000','Secretaire',45,10000,NULL);

INSERT INTO SUPERIEUR VALUES (1,NULL);
INSERT INTO SUPERIEUR VALUES (2,1);
INSERT INTO SUPERIEUR VALUES (3,1);
INSERT INTO SUPERIEUR VALUES (4,1);
INSERT INTO SUPERIEUR VALUES (5,1);
INSERT INTO SUPERIEUR VALUES (6,2);
INSERT INTO SUPERIEUR VALUES (7,2);
INSERT INTO SUPERIEUR VALUES (8,2);
INSERT INTO SUPERIEUR VALUES (9,2);
INSERT INTO SUPERIEUR VALUES (10,2);
INSERT INTO SUPERIEUR VALUES (11,3);
INSERT INTO SUPERIEUR VALUES (12,3);
INSERT INTO SUPERIEUR VALUES (13,3);
INSERT INTO SUPERIEUR VALUES (14,3);
INSERT INTO SUPERIEUR VALUES (15,3);
INSERT INTO SUPERIEUR VALUES (16,6);
INSERT INTO SUPERIEUR VALUES (17,6);
INSERT INTO SUPERIEUR VALUES (18,7);
INSERT INTO SUPERIEUR VALUES (19,7);
INSERT INTO SUPERIEUR VALUES (20,8);
INSERT INTO SUPERIEUR VALUES (21,8);
INSERT INTO SUPERIEUR VALUES (22,9);
INSERT INTO SUPERIEUR VALUES (23,9);
INSERT INTO SUPERIEUR VALUES (24,10);
INSERT INTO SUPERIEUR VALUES (25,10);
