--------------------------------------------------------
--  File created - Neděle-listopad-15-2009   
--------------------------------------------------------
SET AUTOCOMMIT ON;
--------------------------------------------------------
--  DDL for Table LINKA
--------------------------------------------------------
drop table LINKA cascade constraints PURGE;
  CREATE TABLE "LINKA" 
   (	"LID" NUMBER(*,0), 
	"STRT" VARCHAR2(20), 
	"CIL" VARCHAR2(20)
   ) ;
--------------------------------------------------------
--  DDL for Table LOD
--------------------------------------------------------
drop table LOD cascade constraints PURGE;
  CREATE TABLE "LOD" 
   (	"LODID" NUMBER(*,0), 
	"JMENOL" VARCHAR2(20), 
	"LTYP" VARCHAR2(20), 
	"BARVA" VARCHAR2(20), 
	"POCET_MIST" NUMBER(*,0)
   ) ;
--------------------------------------------------------
--  DDL for Table NAMORNIK
--------------------------------------------------------
drop table NAMORNIK cascade constraints PURGE;
  CREATE TABLE "NAMORNIK" 
   (	"NID" NUMBER(*,0), 
	"JMENON" VARCHAR2(20), 
	"VEK" NUMBER(*,0), 
	"HODNOST" NUMBER(2,0), 
	"PLAT" NUMBER
   ) ;
--------------------------------------------------------
--  DDL for Table PLAVBA_S_PRUVODCEM
--------------------------------------------------------
drop table PLAVBA_S_PRUVODCEM cascade constraints PURGE;
  CREATE TABLE "PLAVBA_S_PRUVODCEM" 
   (	"ZID" NUMBER(*,0), 
	"LODID" NUMBER(*,0), 
	"NID" NUMBER(*,0), 
	"DATUM_PL" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table SPOJ
--------------------------------------------------------
drop table SPOJ cascade constraints PURGE;
  CREATE TABLE "SPOJ" 
   (	"LID" NUMBER(*,0), 
	    "SPID" NUMBER(*,0), 
      "SCAS" INTERVAL DAY (0) TO SECOND (0)
   ) ;
--------------------------------------------------------
--  DDL for Table POKRYTI
--------------------------------------------------------
drop table POKRYTI cascade constraints PURGE;
  CREATE TABLE "POKRYTI" 
   (	"LID" NUMBER(*,0), 
	"NID" NUMBER(*,0), 
	"SPID" NUMBER(*,0), 
	"DATUM_POK" DATE, 
	"LODID" NUMBER(*,0), 
	 CONSTRAINT "POKRYTO_PK" PRIMARY KEY ("LID", "NID", "SPID", "DATUM_POK", "LODID") ENABLE
   ) ORGANIZATION INDEX NOCOMPRESS ;
--------------------------------------------------------
--  DDL for Table REZERVACE
--------------------------------------------------------
drop table REZERVACE cascade constraints PURGE;
  CREATE TABLE "REZERVACE" 
   (	"LODID" NUMBER(*,0), 
	"ZID" NUMBER(*,0), 
	"DATUM_RES" DATE, 
	 CONSTRAINT "REZERVACE2_PK" PRIMARY KEY ("LODID", "ZID", "DATUM_RES") ENABLE
   ) ORGANIZATION INDEX NOCOMPRESS ;
--------------------------------------------------------
--  DDL for Table ZAKAZNIK
--------------------------------------------------------
drop table ZAKAZNIK cascade constraints PURGE;
  CREATE TABLE "ZAKAZNIK" 
   (	"ZID" NUMBER(*,0), 
	"JMENOZ" VARCHAR2(20), 
	"ADRESA" VARCHAR2(20), 
	"PRIJMENI" VARCHAR2(20), 
	"CREDITLIMIT" NUMBER
   ) ;

---------------------------------------------------
--   DATA FOR TABLE POKRYTI
--   FILTER = none used
---------------------------------------------------
REM INSERTING into POKRYTI
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,2,3,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),2);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,3,4,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),5);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,4,5,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),6);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,8,1,to_timestamp('10.07.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),8);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,8,2,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),8);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,11,1,to_timestamp('08.09.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),1);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,11,1,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),1);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (1,11,1,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),1);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (2,9,1,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),9);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (2,10,2,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),10);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (2,11,3,to_timestamp('02.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),1);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (3,3,2,to_timestamp('02.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),2);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (3,8,1,to_timestamp('02.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),8);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (3,8,3,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),8);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (4,2,3,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),1);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (4,3,2,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),9);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (4,11,1,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),5);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (5,4,1,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),2);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (6,9,1,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),5);
Insert into POKRYTI (LID,NID,SPID,DATUM_POK,LODID) values (7,10,1,to_timestamp('24.12.00 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'),6);
Commit;
---------------------------------------------------
--   END DATA FOR TABLE POKRYTI
---------------------------------------------------

---------------------------------------------------
--   DATA FOR TABLE REZERVACE
--   FILTER = none used
---------------------------------------------------
REM INSERTING into REZERVACE
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (1,6,to_timestamp('24.12.00','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (1,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (2,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (2,9,to_timestamp('24.12.00','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (3,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (4,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (5,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (5,7,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (6,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (7,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (7,7,to_timestamp('24.12.00','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (8,1,to_timestamp('24.12.00','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (8,1,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (8,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (9,3,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (9,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Insert into REZERVACE (LODID,ZID,DATUM_RES) values (10,6,to_timestamp('01.01.01','DD.MM.RR HH24:MI:SSXFF'));
Commit;
---------------------------------------------------
--   END DATA FOR TABLE REZERVACE
---------------------------------------------------

---------------------------------------------------
--   DATA FOR TABLE ZAKAZNIK
--   FILTER = none used
---------------------------------------------------
REM INSERTING into ZAKAZNIK
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (1,'Ford','Fordovice 10','Ford',100);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (2,'Smith','Smithovice 10','Smith',110);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (3,'Blake','Blakeovice 10','Blake',120);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (4,'Allen','Allenovice 10','Allen',300);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (5,'Ward','Wardovice 10','Ward',310);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (6,'Martin','Martinovice 10','Martin',330);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (7,'Scott','Scottovice','Scott',400);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (8,'Turner','Turnerovice','Turner',440);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (9,'Adams','Adamsovice','Adams',550);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (10,'James','Jamesovice','James',1000);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (11,'Iásón','Iólkos','Syn Krétheův',1500);
Insert into ZAKAZNIK (ZID,JMENOZ,ADRESA,PRIJMENI,CREDITLIMIT) values (12,'Odysseus','Ithaka 1','Laertiadés ',1700);
Commit;
---------------------------------------------------
--   END DATA FOR TABLE ZAKAZNIK
---------------------------------------------------

---------------------------------------------------
--   DATA FOR TABLE LINKA
--   FILTER = none used
---------------------------------------------------
REM INSERTING into LINKA
Insert into LINKA (LID,STRT,CIL) values (1,'Horni Plana','Hurka');
Insert into LINKA (LID,STRT,CIL) values (2,'Hurka','Jestrabi');
Insert into LINKA (LID,STRT,CIL) values (3,'Karlovy Dvory','Radislav');
Insert into LINKA (LID,STRT,CIL) values (4,'Dolni Vlatavice','Kyselov');
Insert into LINKA (LID,STRT,CIL) values (5,'Hrustice','Vetrnik');
Insert into LINKA (LID,STRT,CIL) values (6,'Lipno','Nove Domky');
Insert into LINKA (LID,STRT,CIL) values (7,'Nova Pec','Hurka');
Insert into LINKA (LID,STRT,CIL) values (8,'Kyselov','Kovarov');
Insert into LINKA (LID,STRT,CIL) values (9,'Jenisov','Blizsi Lhota');
Insert into LINKA (LID,STRT,CIL) values (10,'Zadni Hamry','Olsina');
Commit;
---------------------------------------------------
--   END DATA FOR TABLE LINKA
---------------------------------------------------

---------------------------------------------------
--   DATA FOR TABLE SPOJ
--   FILTER = none used
---------------------------------------------------
REM INSERTING into SPOJ
Insert into SPOJ (LID,SPID,SCAS) values (1,1,'0 5:30:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (1,2,'0 7:50:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (1,3,'0 11:25:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (1,4,'0 15:50:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (1,5,'0 18:0:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (2,1,'0 12:0:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (2,2,'0 13:10:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (2,3,'0 22:20:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (3,1,'0 9:10:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (3,2,'0 18:45:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (3,3,'0 23:0:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (4,1,'0 2:10:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (4,2,'0 5:55:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (4,3,'0 19:35:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (5,1,'0 8:0:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (6,1,'0 9:20:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (7,1,'0 12:12:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (8,1,'0 19:35:0.0');
Insert into SPOJ (LID,SPID,SCAS) values (9,1,'0 23:59:0.0');
Commit;
---------------------------------------------------
--   END DATA FOR TABLE SPOJ
---------------------------------------------------

---------------------------------------------------
--   DATA FOR TABLE NAMORNIK
--   FILTER = none used
---------------------------------------------------
REM INSERTING into NAMORNIK
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (1,'Dustin',45,7,7000);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (2,'Lubber',55,8,3000);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (3,'Rusty',35,10,6000);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (4,'Yuppy',35,9,2000);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (5,'Guppy',35,5,4500);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (6,'Zorba',16,10,7500);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (7,'Horatio',35,7,2500);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (8,'Brutus',33,1,1350);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (9,'Marco',26,2,5200);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (10,'John',118,6,14000);
Insert into NAMORNIK (NID,JMENON,VEK,HODNOST,PLAT) values (11,'Charon',999,4,6800);
Commit;
---------------------------------------------------
--   END DATA FOR TABLE NAMORNIK
---------------------------------------------------

---------------------------------------------------
--   DATA FOR TABLE PLAVBA_S_PRUVODCEM
--   FILTER = none used
---------------------------------------------------
REM INSERTING into PLAVBA_S_PRUVODCEM
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (1,1,6,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (1,1,6,to_timestamp('02.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (1,1,6,to_timestamp('03.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (1,1,6,to_timestamp('04.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (1,1,6,to_timestamp('05.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (1,1,6,to_timestamp('06.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (1,1,6,to_timestamp('07.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (2,8,1,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (3,6,7,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (4,9,2,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (4,9,2,to_timestamp('02.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (4,9,2,to_timestamp('03.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (4,9,2,to_timestamp('04.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (5,10,9,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (5,10,9,to_timestamp('02.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (5,10,9,to_timestamp('03.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (5,10,9,to_timestamp('04.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (5,10,9,to_timestamp('05.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Insert into PLAVBA_S_PRUVODCEM (ZID,LODID,NID,DATUM_PL) values (6,2,3,to_timestamp('01.01.01 00:00:00,000000000','DD.MM.RR HH24:MI:SS,FF'));
Commit;
---------------------------------------------------
--   END DATA FOR TABLE PLAVBA_S_PRUVODCEM
---------------------------------------------------

---------------------------------------------------
--   DATA FOR TABLE LOD
--   FILTER = none used
---------------------------------------------------
REM INSERTING into LOD
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (1,'Chloe','ponorka','žlutá',100);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (2,'Mariane','klipr','modrá',50);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (3,'Skyla','ponorka','černá',30);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (4,'Pooh','plachetnice','hnědá',20);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (5,'Shark','ponorka','pink',22);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (6,'Carmen','klipr','zelená',100);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (7,'Yeanifer','parník','černá',110);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (8,'Charibda','parník','modrá',145);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (9,'Anne',null,'zelená',100);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (10,'Lilien','klipr','modrá',10);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (11,'Anička','plachetnice','růžová',10);
Insert into LOD (LODID,JMENOL,LTYP,BARVA,POCET_MIST) values (12,'Janička','priklad_7','khaki',10);
Commit;
---------------------------------------------------
--   END DATA FOR TABLE LOD
---------------------------------------------------
--------------------------------------------------------
--  Constraints for Table LINKA
--------------------------------------------------------

 ALTER TABLE "LINKA" ADD CONSTRAINT "LINKA_PK" PRIMARY KEY ("LID") ENABLE;
--------------------------------------------------------
--  Constraints for Table LOD
--------------------------------------------------------

  ALTER TABLE "LOD" ADD CONSTRAINT "LOD_PK" PRIMARY KEY ("LODID") ENABLE;
 
  ALTER TABLE "LOD" ADD CONSTRAINT "LOD_UK" UNIQUE ("JMENOL") ENABLE;
 
  ALTER TABLE "LOD" MODIFY ("JMENOL" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table NAMORNIK
--------------------------------------------------------

  ALTER TABLE "NAMORNIK" ADD CONSTRAINT "NAMORNIK_PK" PRIMARY KEY ("NID") ENABLE;
 
  ALTER TABLE "NAMORNIK" ADD CONSTRAINT "NAMORNIK_UK" UNIQUE ("JMENON") ENABLE;
 
  ALTER TABLE "NAMORNIK" MODIFY ("JMENON" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table PLAVBA_S_PRUVODCEM
--------------------------------------------------------

  ALTER TABLE "PLAVBA_S_PRUVODCEM" ADD CONSTRAINT "PLAVBA_VEDENA_PK" PRIMARY KEY ("ZID", "LODID", "NID", "DATUM_PL") ENABLE;
--------------------------------------------------------
--  Constraints for Table POKRYTI
--------------------------------------------------------

  ALTER TABLE "POKRYTI" MODIFY ("LID" NOT NULL ENABLE);
 
  ALTER TABLE "POKRYTI" MODIFY ("NID" NOT NULL ENABLE);
 
  ALTER TABLE "POKRYTI" MODIFY ("SPID" NOT NULL ENABLE);
 
  ALTER TABLE "POKRYTI" MODIFY ("DATUM_POK" NOT NULL ENABLE);
 
  ALTER TABLE "POKRYTI" MODIFY ("LODID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table REZERVACE
--------------------------------------------------------
-- ALTER TABLE "REZERVACE" ADD CONSTRAINT "REZERVACE2_PK" PRIMARY KEY ("LODID", "ZID", "DATUM_RES") ENABLE;

--------------------------------------------------------
--  Constraints for Table SPOJ
--------------------------------------------------------
  ALTER TABLE "SPOJ" ADD CONSTRAINT "SPOJ_LID_SPID_PK" PRIMARY KEY ("LID","SPID") ENABLE;

--------------------------------------------------------
--  Constraints for Table ZAKAZNIK
--------------------------------------------------------
  ALTER TABLE "ZAKAZNIK" ADD CONSTRAINT "ZAKAZNIK_PK" PRIMARY KEY ("ZID") ENABLE;
--------------------------------------------------------
--  Ref Constraints for Table SPOJ
--------------------------------------------------------
  ALTER TABLE "SPOJ" ADD CONSTRAINT "SPOJ_FK" FOREIGN KEY ("LID")
	  REFERENCES "LINKA" ("LID") ENABLE;
--------------------------------------------------------
--  Ref Constraints for Table PLAVBA_S_PRUVODCEM
--------------------------------------------------------

  ALTER TABLE "PLAVBA_S_PRUVODCEM" ADD CONSTRAINT "PLAVBA_VEDENA_FK1" FOREIGN KEY ("ZID")
	  REFERENCES "ZAKAZNIK" ("ZID") ENABLE;
 
  ALTER TABLE "PLAVBA_S_PRUVODCEM" ADD CONSTRAINT "PLAVBA_VEDENA_FK2" FOREIGN KEY ("LODID")
	  REFERENCES "LOD" ("LODID") ENABLE;
 
  ALTER TABLE "PLAVBA_S_PRUVODCEM" ADD CONSTRAINT "PLAVBA_VEDENA_FK3" FOREIGN KEY ("NID")
	  REFERENCES "NAMORNIK" ("NID") ENABLE;
--------------------------------------------------------
--  Ref Constraints for Table POKRYTI
--------------------------------------------------------

  ALTER TABLE "POKRYTI" ADD CONSTRAINT "POKRYTI_LID_FK1" FOREIGN KEY ("LODID")
	  REFERENCES "LOD" ("LODID") ENABLE;
 
  ALTER TABLE "POKRYTI" ADD CONSTRAINT "POKRYTI_NID_FK" FOREIGN KEY ("NID")
	  REFERENCES "NAMORNIK" ("NID") ENABLE;

  ALTER TABLE "POKRYTI" ADD CONSTRAINT "POKRYTI_LID_SPID_FK" FOREIGN KEY ("LID","SPID")
	 REFERENCES "SPOJ" ENABLE;

--------------------------------------------------------
--  Ref Constraints for Table REZERVACE
--------------------------------------------------------

  ALTER TABLE "REZERVACE" ADD CONSTRAINT "REZERVACE_LID_FK1" FOREIGN KEY ("LODID")
	  REFERENCES "LOD" ("LODID") ENABLE;
 
  ALTER TABLE "REZERVACE" ADD CONSTRAINT "REZERVACE_ZID_FK2" FOREIGN KEY ("ZID")
	  REFERENCES "ZAKAZNIK" ("ZID") ENABLE;

