lexflax
Гость
|
|
« Ответ #3 : Декабрь 15, 2013, 10:34 » |
|
скрипт базы CREATE TABLE GosSp ( kodG integer PRIMARY KEY NOT NULL, Namespg text NOT NULL UNIQUE ); CREATE TABLE VuzSp ( kodSV integer PRIMARY KEY NOT NULL, Namespv text NOT NULL UNIQUE, Namekrat text NOT NULL ); CREATE TABLE Kvalif ( kodK integer PRIMARY KEY NOT NULL, Namekvf text NOT NULL UNIQUE ); CREATE TABLE Speciliz ( kodS integer PRIMARY KEY NOT NULL, Namespiciliz text NOT NULL UNIQUE ); CREATE TABLE Specvuza ( kodSV integer PRIMARY KEY NOT NULL, kodS integer NOT NULL UNIQUE, FOREIGN KEY (kodSV) REFERENCES VuzSp(kodSV), FOREIGN KEY (kodS) REFERENCES Speciliz(kodS)); CREATE TABLE kod ( kodSV integer PRIMARY KEY, kodG integer NOT NULL, kodK integer NOT NULL, FOREIGN KEY (kodSV) REFERENCES VuzSp(kodSV), FOREIGN KEY (kodG) REFERENCES GosSp(kodG), FOREIGN KEY (kodK) REFERENCES Kvalif(kodK)); insert into GosSp values(150200,'Avtomobili i avtomobilnoe hozaistvo'); insert into GosSp values(291000,'Avtomobilnie dorogi i aerodromi'); insert into GosSp values(290100,'Arhitektura'); insert into GosSp values(290800,'Vodosnabgenie i vodoonvedenie'); insert into GosSp values(220100,'Vichislitelnie mihini'); insert into GosSp values(290500,'Gorodskoe stroitelstvo i hozaistvo'); insert into GosSp values(201200,'Dvigateli vnutrennego sgorania'); insert into GosSp values(290200,'Dizain arhitekturnoi sredi'); insert into GosSp values(210900,'Zemleustroistvo'); insert into GosSp values(271900,'Informacionnie sistemi v tehnike'); insert into GosSp values(272900,'Informacionnie sistemi v ekonomike'); insert into GosSp values(251300,'Kommercia'); insert into GosSp values(230400,'Lesnoe i lesoparkovoe hozaistvo'); insert into GosSp values(230100,'Lesoingenernoe delo'); insert into GosSp values(220400,'Liteinoe proizvodstvo metallov'); insert into GosSp values(221800,'Matematicheskie metodi'); insert into GosSp values(220401,'Mahini i oborudovanie'); insert into GosSp values(211100,'Menedgment'); insert into VuzSp values(15020,'Avtomobili i avtomobilnoe hozaistvo','AA X'); insert into VuzSp values(29101,'Avtomobilinie dorogi i aerodromi IS','AD '); insert into VuzSp values(29100,'Avtomobilinie dorogi i aerodromi OUDX',' AD'); insert into VuzSp values(29102,'Avtomobilinie dorogi i aerodromi','AD');
insert into VuzSp values(29010,'Arhitektura','A'); insert into VuzSp values(29011,'Landhaftnai arhitektura','A'); insert into VuzSp values(29012,'Restavracia i rekonstrukcia','A'); insert into VuzSp values(29080,'Vodosnabgenie i vodootvedenie','BB'); insert into VuzSp values(22010,'Vichislitelnie machini','BM'); insert into VuzSp values(29050,'Gorodskoe stroitelstvo','GSX'); insert into VuzSp values(10120,'Dvigateli vnutrenego sgorania','DVS'); insert into VuzSp values(29020,'Dizain arhitekturnoi sredi','DAS'); insert into VuzSp values(21090,'Zemleustroistvo','ZMU'); insert into VuzSp values(27190,'informacionie sistemi v tehnike','IS'); insert into VuzSp values(27191,'informacionionai bezopasnost sistem','IS '); insert into VuzSp values(25140,'informacionionie sistemi v bugalterii',' ISE'); insert into VuzSp values(25130,'Kommercia','K'); insert into VuzSp values(26040,'Lesnoe i lesoparkovoe hozaistvo','LPX');
insert into VuzSp values(25010,'Lesoingenernoe delo','LD'); insert into VuzSp values(21040,'Proizvodstvo cvetnih metallov','LP'); insert into VuzSp values(21041,'Hudogestvenoelitie','LP'); insert into VuzSp values(25180,'Matematicheskie metodi','MMO'); insert into VuzSp values(21043,'Mahini i oborudovanie','MLK'); insert into VuzSp values(25110,'Menedgment v hlk','MHLK'); insert into Kvalif values(1,'Ingener'); insert into Kvalif values(2,'Arhitektor'); insert into Kvalif values(3,'Ingener stroitel'); insert into Kvalif values(4,'Informatik ekonomist'); insert into Kvalif values(5,'Specialist kommercii'); insert into Kvalif values(6,'Ekonomist matematik'); insert into Kvalif values(7,'Menedger'); insert into Speciliz values(1,'Iskustvennie sooregenia na dorogah'); insert into Speciliz values(2,'Organizacia i upravlenia v hozaistve'); insert into Speciliz values(3,'Arhitektura gilih zdanii'); insert into Speciliz values(4,'Landhaftnai arhitektura'); insert into Speciliz values(5,'Restovracia i rekonstrukcia'); insert into Speciliz values(6,'Vodnai Ekologia'); insert into Speciliz values(7,'Informacionai bezopasnost'); insert into Speciliz values(8,'Hudogestvennoe litie'); insert into Speciliz values(9,'Proizvodstvenni menedgment'); insert into Specvuza values(29101,1); insert into Specvuza values(29100,2); insert into Specvuza values(29010,3); insert into Specvuza values(29011,4); insert into Specvuza values(29012,5); insert into Specvuza values(29080,6); insert into Specvuza values(27190,7); insert into Specvuza values(21040,8); insert into Specvuza values(25110,9);
insert into kod values(15020,150200,1); insert into kod values(29101,291000,3); insert into kod values(29100,291000,1); insert into kod values(29102,291000,1); insert into kod values(29010,290100,2); insert into kod values(29011,290100,2); insert into kod values(29012,290100,2); insert into kod values(29080,290800,1); insert into kod values(22010,220100,1); insert into kod values(29050,290500,1); insert into kod values(10120,201200,1); insert into kod values(29020,290200,2); insert into kod values(21090,210900,2); insert into kod values(27190,271900,1); insert into kod values(27191,272900,1); insert into kod values(25140,272900,4); insert into kod values(25130,251300,5); insert into kod values(26040,230400,1); insert into kod values(25010,230100,1); insert into kod values(21040,220400,1); insert into kod values(21041,220400,1); insert into kod values(25180,221800,6); insert into kod values(21043,220401,1); insert into kod values(25110,211100,7);
|