АвтоАвтоматизацияАрхитектураАстрономияАудитБиологияБухгалтерияВоенное делоГенетикаГеографияГеологияГосударствоДомДругоеЖурналистика и СМИИзобретательствоИностранные языкиИнформатикаИскусствоИсторияКомпьютерыКулинарияКультураЛексикологияЛитератураЛогикаМаркетингМатематикаМашиностроениеМедицинаМенеджментМеталлы и СваркаМеханикаМузыкаНаселениеОбразованиеОхрана безопасности жизниОхрана ТрудаПедагогикаПолитикаПравоПриборостроениеПрограммированиеПроизводствоПромышленностьПсихологияРадиоРегилияСвязьСоциологияСпортСтандартизацияСтроительствоТехнологииТорговляТуризмФизикаФизиологияФилософияФинансыХимияХозяйствоЦеннообразованиеЧерчениеЭкологияЭконометрикаЭкономикаЭлектроникаЮриспунденкция

ПРИЛОЖЕНИЕ В. ЛИСТИНГ СЕРВЕРНОЙ ЧАСТИ (ЯЗЫК SQL)

Читайте также:
  1. Aufgabe 4. Везде ли нужна частица “zu”?
  2. I частина (5 балів)
  3. I частина (5 балів)
  4. I. Необходимые документы для участия в Конкурсе
  5. I. Размер базовой части трудовой пенсии по старости.
  6. I. Расчет накопительной части трудовой пенсии.
  7. I. Расчет размера страховой части трудовой пенсии.
  8. II частина (4 бала)
  9. II частина (4 бала)
  10. II частина (4 бали)
  11. II частина (4 бали)
  12. II частина. Проблема спеціальних здібностей у сучасній диференційній психології

 

SET SQL DIALECT 3;

 

/* CREATE DATABASE '127.0.0.1/gds_db:C:\Users\Ddos\Desktop\Курсовой БД\SHIPPING.GDB' USER 'SYSDBA' PASSWORD 'Enter Password here' PAGE_SIZE 8192

DEFAULT CHARACTER SET WIN1251 */

COMMIT;

/* CONNECT '127.0.0.1/gds_db:C:\Users\Ddos\Desktop\Курсовой БД\SHIPPING.GDB' USER 'SYSDBA' PASSWORD 'Enter Password here'*/

/* Domain definitions */

CREATE DOMAIN "DNDB" AS DATE

CHECK (Value <= 'TODAY');

CREATE DOMAIN "DNNUM" AS INTEGER

CHECK (VALUE > 0) NOT NULL;

CREATE DOMAIN "DNTITLE" AS VARCHAR(100)

check (value is not null);

 

/* Table: CITIES, Owner: SYSDBA */

 

CREATE TABLE "CITIES"

(

"CITYID" "DNNUM",

"TITLE_CT" "DNTITLE",

PRIMARY KEY ("CITYID")

);

 

/* Table: PORT, Owner: SYSDBA */

 

CREATE TABLE "PORT"

(

"PORTID" "DNNUM",

"TITLE_PRT" "DNTITLE",

"CITYCODE" "DNNUM",

PRIMARY KEY ("PORTID")

);

 

/* Table: PROPERTY_TYPE, Owner: SYSDBA */

 

CREATE TABLE "PROPERTY_TYPE"

(

"TYPE_PRPRTID" "DNNUM",

"TITLE_PRPT" "DNTITLE",

PRIMARY KEY ("TYPE_PRPRTID")

);

 

/* Table: SHIPPING, Owner: SYSDBA */

 

CREATE TABLE "SHIPPING"

(

"SHIPPINGID" "DNNUM",

"TITLE_SHPNG" "DNTITLE",

"DATE_BD" "DNDB",

"PROPERTY_TYPECODE" "DNNUM",

"SHIPPING_TYPECODE" "DNNUM",

PRIMARY KEY ("SHIPPINGID")

);

 

/* Table: SHIPPING_TYPE, Owner: SYSDBA */

 

CREATE TABLE "SHIPPING_TYPE"

(

"TYPE_SHPNGID" "DNNUM",

"TITLE_ST" "DNTITLE",

PRIMARY KEY ("TYPE_SHPNGID")

);

 

/* Table: SHIPS, Owner: SYSDBA */

 

CREATE TABLE "SHIPS"

(

"SHIPID" "DNNUM",

"TITLE_SHP" "DNTITLE",

"DATE_BD" "DNDB",

"SHIP_TYPECODE" "DNNUM",

"PORTCODE" "DNNUM",

PRIMARY KEY ("SHIPID")

);

 

/* Table: SHIP_TYPE, Owner: SYSDBA */

 

CREATE TABLE "SHIP_TYPE"

(

"TYPE_SHPID" "DNNUM",

"TITLE_SHPT" "DNTITLE",

PRIMARY KEY ("TYPE_SHPID")

);

 

/* Table: TRANSPORTATION, Owner: SYSDBA */

 

CREATE TABLE "TRANSPORTATION"

(

"TRANSPORTATIONID" "DNNUM",

"TYPE_TPCODE" "DNNUM",

"DATE_TD" "DNDB",

"PASSENGERS_CNT" "DNNUM",

"TICKET_PRICE" "DNNUM",

"SHIPPINGCODE" "DNNUM",

"SHIPCODE" "DNNUM",

PRIMARY KEY ("TRANSPORTATIONID")

);

 

/* Table: TRANSPORTATION_TYPE, Owner: SYSDBA */

 

CREATE TABLE "TRANSPORTATION_TYPE"

(

"TYPE_TPID" "DNNUM",

"TITLE_TT" "DNTITLE",

PRIMARY KEY ("TYPE_TPID")

);

ALTER TABLE "PORT" ADD FOREIGN KEY ("CITYCODE") REFERENCES "CITIES" ("CITYID");

ALTER TABLE "SHIPPING" ADD FOREIGN KEY ("SHIPPING_TYPECODE") REFERENCES "SHIPPING_TYPE" ("TYPE_SHPNGID");

ALTER TABLE "SHIPPING" ADD FOREIGN KEY ("PROPERTY_TYPECODE") REFERENCES "PROPERTY_TYPE" ("TYPE_PRPRTID");

ALTER TABLE "SHIPS" ADD FOREIGN KEY ("PORTCODE") REFERENCES "PORT" ("PORTID");

ALTER TABLE "SHIPS" ADD FOREIGN KEY ("SHIP_TYPECODE") REFERENCES "SHIP_TYPE" ("TYPE_SHPID");

ALTER TABLE "TRANSPORTATION" ADD FOREIGN KEY ("TYPE_TPCODE") REFERENCES "TRANSPORTATION_TYPE" ("TYPE_TPID");

ALTER TABLE "TRANSPORTATION" ADD FOREIGN KEY ("SHIPPINGCODE") REFERENCES "SHIPPING" ("SHIPPINGID");

ALTER TABLE "TRANSPORTATION" ADD FOREIGN KEY ("SHIPCODE") REFERENCES "SHIPS" ("SHIPID");

 

CREATE GENERATOR "GEN_CITIES";

CREATE GENERATOR "GEN_PORT";

CREATE GENERATOR "GEN_PROPERTY_TYPE";

CREATE GENERATOR "GEN_SHIPPING";

CREATE GENERATOR "GEN_SHIPPING_TYPE";

CREATE GENERATOR "GEN_SHIPS";

CREATE GENERATOR "GEN_SHIP_TYPE";

CREATE GENERATOR "GEN_TRANSPORTATION";

CREATE GENERATOR "GEN_TRANSPORTATION_TYPE";

 

/* View: SQL_DISTINCT, Owner: SYSDBA */

 

CREATE VIEW "SQL_DISTINCT" (

"TITLE_SHP",

"TITLE_TT"

) AS

 

SELECT DISTINCT SHIPS.TITLE_SHP, TRANSPORTATION_TYPE.TITLE_TT

FROM SHIPS INNER JOIN (TRANSPORTATION_TYPE

INNER JOIN TRANSPORTATION

ON TRANSPORTATION_TYPE.TYPE_TPID = TRANSPORTATION.TYPE_TPCODE)

ON SHIPS.SHIPID = TRANSPORTATION.SHIPCODE

;

 

/* View: TWO_STATES, Owner: SYSDBA */

 

CREATE VIEW "TWO_STATES" (

"SHIPS",

"TRANSPORTATION_TYPE"

) AS

 

SELECT SQL_DISTINCT.TITLE_SHP,

COUNT(SQL_DISTINCT.TITLE_TT)

FROM SQL_DISTINCT

GROUP BY SQL_DISTINCT.TITLE_SHP

;

 

/* View: TRANSPORTATIONCOUNT, Owner: SYSDBA */

 

CREATE VIEW "TRANSPORTATIONCOUNT" (

"TRANSPORTATION_TYPE",

"HOW_TRANSPORTATIONS"

) AS

select TITLE_TT, COUNT(TRANSPORTATIONID)

from TRANSPORTATION_TYPE, TRANSPORTATION

 

where (TRANSPORTATION_TYPE.TYPE_TPID = TRANSPORTATION.TYPE_TPCODE)

GROUP BY TRANSPORTATION_TYPE.TITLE_TT

;

 

/* View: SQL_WHERE, Owner: SYSDBA */

 

CREATE VIEW "SQL_WHERE" (

"TRANSPORTATIONID",

"TYPE_TPCODE",

"DATE_TD",

"PASSENGERS_CNT",

"TICKET_PRICE",

"SHIPPINGCODE",

"SHIPCODE"

) AS

 

SELECT * FROM TRANSPORTATION

WHERE TICKET_PRICE > 300

;

 

/* Triggers only will work for SQL triggers */

 

CREATE TRIGGER "BEF_INS_CITIES" FOR "CITIES"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.CITYID = GEN_ID(GEN_CITIES,1);

END

;

 

CREATE TRIGGER "BEF_DEL_CITIES" FOR "CITIES"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "PORT" WHERE PORT.CITYCODE=CITIES.CITYID;

END

;

 

CREATE TRIGGER "BEF_INS_PORT" FOR "PORT"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.PORTID = GEN_ID(GEN_PORT,1);

END

;

 

CREATE TRIGGER "BEF_DEL_PORT" FOR "PORT"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "SHIPS" WHERE SHIPS.PORTCODE=PORT.PORTID;

END

;

 

CREATE TRIGGER "BEF_INS_PROPERTY_TYPE" FOR "PROPERTY_TYPE"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.TYPE_PRPRTID = GEN_ID(GEN_PROPERTY_TYPE,1);

END

;

 

CREATE TRIGGER "BEF_DEL_PROPERTY_TYPE" FOR "PROPERTY_TYPE"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "SHIPPING" WHERE SHIPPING.PROPERTY_TYPECODE=PROPERTY_TYPE.TYPE_PRPRTID;

END

;

 

CREATE TRIGGER "BEF_INS_SHIPPING" FOR "SHIPPING"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.SHIPPINGID = GEN_ID(GEN_SHIPPING,1);

END

;

 

CREATE TRIGGER "BEF_DEL_SHIPPING" FOR "SHIPPING"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "TRANSPORTATION" WHERE TRANSPORTATION.SHIPPINGCODE=SHIPPING.SHIPPINGID;

END

;

 

CREATE TRIGGER "BEF_INS_SHIPPING_TYPE" FOR "SHIPPING_TYPE"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.TYPE_SHPNGID = GEN_ID(GEN_SHIPPING_TYPE,1);

END

;

 

CREATE TRIGGER "BEF_DEL_SHIPPING_TYPE" FOR "SHIPPING_TYPE"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "SHIPPING" WHERE SHIPPING.SHIPPING_TYPECODE=SHIPPING_TYPE.TYPE_SHPNGID;

END

;

 

CREATE TRIGGER "BEF_INS_SHIPS" FOR "SHIPS"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.SHIPID = GEN_ID(GEN_SHIPS,1);

END

;

 

CREATE TRIGGER "BEF_DEL_SHIPS" FOR "SHIPS"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "TRANSPORTATION" WHERE TRANSPORTATION.SHIPCODE=SHIPS.SHIPID;

END

;

 

CREATE TRIGGER "BEF_INS_SHIP_TYPE" FOR "SHIP_TYPE"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.TYPE_SHPID = GEN_ID(GEN_SHIP_TYPE,1);

END

;

 

CREATE TRIGGER "BEF_DEL_SHIP_TYPE" FOR "SHIP_TYPE"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "SHIPS" WHERE SHIPS.SHIP_TYPECODE=SHIP_TYPE.TYPE_SHPID;

END

;

 

CREATE TRIGGER "BEF_INS_TRANSPORTATION" FOR "TRANSPORTATION"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.TRANSPORTATIONID = GEN_ID(GEN_TRANSPORTATION,1);

END

;

 

CREATE TRIGGER "BEF_INS_TRANSPORTATION_TYPE" FOR "TRANSPORTATION_TYPE"

ACTIVE BEFORE INSERT POSITION 0

AS

BEGIN

NEW.TYPE_TPID = GEN_ID(GEN_TRANSPORTATION_TYPE,1);

END

;

 

CREATE TRIGGER "BEF_DEL_TRANSPORTATION_TYPE" FOR "TRANSPORTATION_TYPE"

ACTIVE BEFORE DELETE POSITION 0

AS

BEGIN

DELETE FROM "TRANSPORTATION" WHERE TRANSPORTATION.TYPE_TPCODE=TRANSPORTATION_TYPE.TYPE_TPID;

END

;

 

COMMIT WORK;

 

 

/*

--------------- SHIPPING_TYPE ---------------

*/

INSERT INTO SHIPPING_TYPE (TITLE_ST)

VALUES ('Речное');

commit;

 

INSERT INTO SHIPPING_TYPE (TITLE_ST)

VALUES ('Морское');

commit;

 

/*

--------------- PROPERTY_TYPE ---------------

*/

INSERT INTO PROPERTY_TYPE (TITLE_PRPT)

VALUES ('Государственное');

commit;

 

INSERT INTO PROPERTY_TYPE (TITLE_PRPT)

VALUES ('Частное');

commit;

 

/*

--------------- TRANSPORTATION_TYPE ---------------

*/

INSERT INTO TRANSPORTATION_TYPE (TITLE_TT)

VALUES ('Пассажирская');

commit;

 

INSERT INTO TRANSPORTATION_TYPE (TITLE_TT)

VALUES ('Коммерческая');

commit;

 

/*

--------------- SHIP_TYPE ---------------

*/

INSERT INTO SHIP_TYPE (TITLE_SHPT)

VALUES ('Лайнер');

commit;

 

INSERT INTO SHIP_TYPE (TITLE_SHPT)

VALUES ('Катер');

commit;

 

INSERT INTO SHIP_TYPE (TITLE_SHPT)

VALUES ('Пароход');

commit;

 

/*

--------------- CITIES ---------------

*/

INSERT INTO CITIES (TITLE_CT)

VALUES ('Белгород-Днестров');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Бердянск');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Измаил');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Илльичевск');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Керчь');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Киев');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Мариуполь');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Николаев');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Одесса');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Октябрськ');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Рени');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Скадовск');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Уст-Дунайск');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Херсон');

commit;

 

INSERT INTO CITIES (TITLE_CT)

VALUES ('Южный');

commit;

 

/*

--------------- PORT ---------------

*/

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Белгород-Днестров', '1');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Бердянск', '2');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Измаил', '3');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Илльичевск', '4');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Керчь', '5');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Киев', '6');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Мариуполь', '7');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Николаев', '8');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Одесса', '9');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Октябрськ', '10');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Рени', '11');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Скадовск', '12');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Уст-Дунайск', '13');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Херсон', '14');

commit;

 

INSERT INTO PORT (TITLE_PRT, CITYCODE)

VALUES ('Южный', '15');

commit;

 

/*

------------------Shippings-------------------

*/

 

INSERT INTO SHIPPING (TITLE_SHPNG, DATE_BD, PROPERTY_TYPECODE, SHIPPING_TYPECODE)

VALUES ('Керченская паромная переправа', '07.10.1954', '1', '2');

commit;

 

INSERT INTO SHIPPING (TITLE_SHPNG, DATE_BD, PROPERTY_TYPECODE, SHIPPING_TYPECODE)

VALUES ('Торговый флот Донбасса', '11.07.1871', '1', '2');

commit;

 

INSERT INTO SHIPPING (TITLE_SHPNG, DATE_BD, PROPERTY_TYPECODE, SHIPPING_TYPECODE)

VALUES ('Украинское Дунайское пароходство', '21.05.1944', '1', '2');

commit;

 

INSERT INTO SHIPPING (TITLE_SHPNG, DATE_BD, PROPERTY_TYPECODE, SHIPPING_TYPECODE)

VALUES ('Укрречфлот', '15.08.1992', '2', '1');

commit;

 

INSERT INTO SHIPPING (TITLE_SHPNG, DATE_BD, PROPERTY_TYPECODE, SHIPPING_TYPECODE)

VALUES ('Укрферри', '12.09.1995', '2', '2');

commit;

 

/*

------------------Shipps-------------------

*/

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Константин Симонов-5', '07.10.1995', '3', '1');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Константин Симонов-4', '11.07.1994', '3', '2');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Константин Симонов-3', '07.05.1993', '3', '3');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Константин Симонов-2', '13.03.1992', '3', '4');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Константин Симонов-1', '07.10.1991', '3', '5');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Буковина-5', '15.05.1998', '3', '6');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Буковина-4', '07.06.1993', '3', '7');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Буковина-3', '17.07.1990', '3', '8');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Буковина-2', '16.08.1989', '3', '9');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Буковина-1', '18.06.1985', '3', '10');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Михаил Калинин-5', '20.04.1994', '3', '11');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Михаил Калинин-4', '01.03.1987', '3', '12');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Михаил Калинин-3', '02.05.1985', '3', '13');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Михаил Калинин-2', '05.06.1984', '3', '14');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Михаил Калинин-1', '14.08.1982', '3', '15');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Иокогама-2', '13.09.2004', '2', '1');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Иокогама-1', '09.09.1999', '2', '2');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Валенсия-2', '09.10.2000', '2', '3');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Валенсия-1', '23.09.1997', '2', '4');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Сплит-5', '25.11.2008', '2', '5');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Сплит-4', '30.04.2005', '2', '6');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Сплит-3', '01.03.2002', '2', '7');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Сплит-2', '03.03.1999', '2', '8');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Сплит-1', '01.10.1996', '2', '9');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Топаз-3', '05.10.1999', '2', '10');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Топаз-2', '11.07.1995', '2', '11');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Топаз-1', '13.08.1991', '2', '12');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Светлана', '12.07.2007', '2', '13');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Меркурий-2', '18.10.1997', '2', '14');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Меркурий-1', '20.10.1993', '2', '15');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Legend of the Seas', '21.05.2008', '1', '4');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('SEVEN SEAS MARINER', '11.12.2006', '1', '9');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Independence of the Seas', '15.11.2007', '1', '9');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('COSTA CONCORDIA', '26.05.2004', '1', '9');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Royal Princess', '28.04.2008', '1', '4');

commit;

 

INSERT INTO SHIPS (TITLE_SHP, DATE_BD, SHIP_TYPECODE, PORTCODE)

VALUES ('Celebrity Equinox', '05.08.2005', '1', '13');

commit;

 

/*

------------------Transportation-------------------

*/

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.06.2008', '110', '200', '3', '2');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.07.2008', '114', '200', '3', '2');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2008', '100', '250', '2', '3');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '02.07.2008', '97', '250', '2', '3');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '05.07.2008', '99', '250', '5', '3');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.07.2008', '99', '170', '5', '4');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.05.2009', '100', '150', '1', '5');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2008', '120', '200', '1', '6');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '12.06.2008', '120', '200', '1', '6');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '15.06.2008', '125', '200', '4', '6');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '13.08.2009', '250', '300', '2', '7');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2008', '200', '300', '2', '8');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2009', '230', '300', '2', '8');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2010', '234', '300', '2', '8');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '13.08.2008', '170', '300', '5', '9');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2009', '180', '300', '5', '9');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '15.07.2010', '190', '300', '5', '9');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '30.07.2010', '190', '300', '5', '9');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '11.05.2008', '100', '150', '5', '10');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '11.06.2008', '50', '150', '5', '10');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '13.07.2009', '99', '150', '5', '10');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '20.08.2010', '131', '260', '5', '11');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '20.05.2008', '150', '235', '3', '12');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '13.07.2008', '150', '235', '3', '12');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '13.08.2009', '145', '235', '3', '12');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '05.07.2009', '147', '235', '3', '12');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '06.06.2010', '150', '235', '3', '12');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '08.08.2010', '120', '235', '3', '12');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '13.09.2010', '100', '225', '5', '13');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '09.09.2009', '250', '300', '3', '14');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.07.2010', '290', '300', '3', '14');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2008', '300', '100', '5', '15');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '15.06.2008', '300', '100', '5', '15');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '30.07.2010', '150', '150', '5', '16');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '30.08.2009', '15', '500', '3', '17');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '25.06.2008', '20', '600', '2', '18');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '11.06.2010', '17', '490', '3', '19');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '11.06.2010', '20', '600', '3', '20');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '10.06.2008', '18', '500', '1', '21');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '09.09.2009', '15', '500', '4', '22');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '09.09.2009', '30', '200', '2', '23');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '10.06.2008', '19', '400', '2', '23');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.09.2010', '30', '200', '2', '23');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '13.09.2010', '35', '200', '2', '23');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '09.09.2009', '24', '650', '5', '24');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '13.07.2010', '25', '650', '5', '24');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '08.08.2010', '45', '325', '5', '24');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.08.2010', '45', '325', '5', '24');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '15.09.2010', '17', '650', '5', '24');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '13.07.2008', '19', '700', '5', '25');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '13.08.2008', '20', '600', '5', '26');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '15.08.2009', '25', '400', '3', '27');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '07.07.2009', '49', '400', '5', '28');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '15.06.2008', '20', '170', '3', '29');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '11.07.2009', '20', '550', '5', '30');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '10.06.2008', '50', '525', '5', '31');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.07.2008', '23', '250', '5', '31');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('1', '10.06.2009', '23', '525', '5', '31');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.06.2008', '3000', '1500', '5', '32');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.07.2008', '3820', '1500', '5', '32');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.06.2009', '1700', '1800', '5', '33');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.07.2010', '2500', '1550', '5', '34');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.08.2010', '2350', '1550', '5', '34');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.06.2009', '2500', '3000', '5', '35');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.08.2010', '2700', '3000', '5', '35');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.09.2010', '2820', '3000', '5', '35');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.07.2009', '3600', '4500', '5', '36');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '01.09.2010', '3670', '4500', '5', '36');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '10.06.2010', '4000', '5000', '3', '37');

commit;

 

INSERT INTO TRANSPORTATION (TYPE_TPCODE, DATE_TD, PASSENGERS_CNT, TICKET_PRICE, SHIPPINGCODE, SHIPCODE)

VALUES ('2', '15.08.2010', '3990', '5000', '3', '37');

commit;

 


 

ПРИЛОЖЕНИЕ Д. ЛИСТИНГ КЛИЕНТСКОЙ ЧАСТИ (ЯЗЫК DELPHI)]

 

 


1 | 2 | 3 | 4 | 5 |

Поиск по сайту:



Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Студалл.Орг (0.136 сек.)