close

Вход

Забыли?

вход по аккаунту

?

Kursovaya rabota BD

код для вставкиСкачать
?????????? ??????????????? ???????????
?????????, ?????????? ? ???????????
???????? ???????????? ??????????
??????????: "???? ??????"
???????? ?????? ?? ???? "?????????????? ?? ??? ????????????? ?????? ?????????? ????"
???????????:
??????? ?????? ???-301
??????? ?????? ??????? ????????????:
??????? ??????? ???????????
?????? 2012
??????????
1. ???????? ?????????? ???????...................................................3
1.1. ??????............................................................................5
1.2. ???? ??????....................................................................5
1.3. ????????? ??????..............................................................6
2. ER-?????? IDEF 1x..................................................................8
3. ?????? ?? ???????? ?? (SQL)......................................................9
4. ?????? INSERT.....................................................................26
5. ???????..............................................................................34
1. ???????? ?????????? ???????
? ?????????? ???????? ??????????, ? ??????? ???? ????????? ???????????, ?????????? ???????? ? ???????????? ?????????, ?? ????? ?? ????? ?? ?????????. ???????? ?????????? ?????????? ????????. ??? ??????????? ????????????? ??????? ?????????? ? ??????, ????????? ? ??????????????? ????? ?????????? ?????????????????? ???????, ?????????? ?? ??????????? ???? ??????. ????????????? ???? ?????? ? ?????????????????? ??????? ??? ?????? ? ????? ?????? ??????????? ???????? ????? ???????????? ????????? ? ????? ?????? ?????????? ?????????? ?? ?????????????? ?????????? ? ?????? ? ?????? ?????? ??????.
? ?????????? ?????????? ??????? ????????????? ?????????? ? ??????, ????? ?????????? ????? ???? ?????????? ?????????? ? ??????? ? ?????????? ???? ?????????? ??????, ???? ?? ???????????? ????????. ?????????? ??????, ??? ????? ? ?????????? ????? ?????????????? ? ?????????? ???????????, ??? ????? ?????? ?????? ????? ????? ?????????? ????????, ??????? ?????? ????? ??????????? ????????? ?????????? ?????. ?????????? ? ????????? ?????? ???? ?????? ? ??????????? ??? ??????????? ????????? ????????. ?????????? ??????, ??? ????? ????????? ????? ???? ????????????, ??????? ? ??????? ???????? ?????? ???? ?????????? ??????????? ?????.
??????????????? ?????????? ???????, ?? ????? ???????, ??? ?????????? ???? ?????? ??? ?????????? ?????????. ????? ?????????? ???? ?????? "??????????" ? ?????????????????? ??????? ??? ?????? ? ??? ???????? ????????? ???????? ???????????? ????????? ? ????????? ???????? ???????? ????? ??????????. ???????? ?????????????????? ??????? ????????:
1. ?????? ???????? ? ??????????
2. ????? ? ?????? ????? ???????? 3. ??????? ? ???????? ???? ?????????
4. ???????? ???????? ????????
5. ?????????? ???????? ?????
6. ?????????????? ???? ?? ?????????
7. ???????? ????
8. ?????????? ?????? ???? ?? ????????
9. ?????????? ???????? ? ?????? ?? ???????
10. ?????????? ???????? ? ????????? - ?????????, ? ????????? ????? ?????????
11. ?????????? ?????? ???? ?? ????????
12. ?????????? ?????? ???? ?? ??????? ???????????, ? ????????? ??????????? ????? ??? ?? ????????????.
1.1. ??????.?????????????? ?? ??? ????????????? ?????? ?????????? ????.
1.2. ???? ??????.
???????? ???????????? ????????????????? ????????? ?????blr_vidBIBLIOTEKARVIDACHA?? ????????????????1:?ch_vidCHITATELVIDACHA?? ????????????????1:?ej_vidEXZ_JOURVIDACHA ?? ????????????????1:?eb_vidEKZ_BOOKVIDACHA?? ????????????????1:?ej_pPOLKAEXZ_JOUR?? ????????????????1:?eb-pPOLKAEKZ_BOOK?? ????????????????1:?st_pSTELAZHPOLKA?? ????????????????1:?b-eBOOKEKZ_BOOK?? ????????????????1:?e-bookBOOKE_ BOOK?? ????????????????1:1b-aBOOKBOOK_AUTHOR????????????????1:?a-bAUTHORBOOK_AUTHOR????????????????1:?t-bTEMATIKABOOK?? ????????????????1:?b-iBOOKIZDANIE????????????????1:?i-bIZDATELSTVOIZDANIE????????????????1:?t-jTEMATIKAJOURNAL?? ????????????????1:?i-jIZDATELSTVOJOURNAL?? ????????????????1:?j-NVJOURNALNV_JOUR?? ????????????????1:?nv-exzNV_JOUREXZ_JOUR?? ????????????????1:?e-nvjNV_JOURE_NVJ?? ????????????????1:1nvj-stNV_JOURSTATEY?? ????????????????1:?st-aSTATEYST_AUTHOR????????????????1:?a-stAUTHORST_AUTHOR????????????????1:?
1.3. ????????? ??????.
???????? ??????????? ?????????? ??????BIBLIOTEKARID_BLR (PK)INTEGERSURNAME_BLRNCHAR(50)NAME_BLRNCHAR(50)CHITATELID_CHIT (PK)INTEGERNAME_CHNCHAR(50)SURNAME_CHNCHAR(50)VIDACHAID_VID (PK)INTEGERID_EXZ_J (FP)INTEGERDATA_ARRRDATETIMEID_CHIT (FK)INTEGERID_BLR (FK)INTEGERID_EXZ_B (FK)INTEGEREKZ_BOOKID_EXZ_B (PK)INTEGERID_P (FK)INTEGERID_BOOK (FK)INTEGERBOOKID_BOOK (PK)INTEGERID_TEM (FK)INTEGERPRICENUMERICNAME_BOOKNCHAR(50)E_BOOKID_EBOOK (PK)INTEGERID_BOOK (FK)INTEGERBOOK_AUTHORID_AUTHOR (FK)INTEGERID_BOOK (FK)INTEGERAUTHORID_AUTHOR (PK)INTEGERSURNAME_AUTHNCHAR(50)NAME_AUTHNCHAR(50)TEMATIKAID_TEM (PK)INTEGERNAME_TEMNCHAR(50)IZDANIEID_BOOK (FK)INTEGERGOD_IZD (PK)INTEGERID_IZD (FK)INTEGERIZDATELSTVOID_IZD (PK)INTEGERNAME_IZDNCHAR(50)JOURNALID_JOUR (PK)INTEGERID_IZD (FK)INTEGERID_TEM (FK)INTEGERNAME_JOURNCHAR(50)NV_JOURID_NVJ (PK)INTEGERID_JOUR (FK)INTEGERNOM_VIPINTEGERDATE_VDATETIMEEXZ_JOURID_EXZ_J (PK)INTEGERID_NVJ (FK)INTEGERID_P (FK)INTEGERPOLKAID_P (PK)INTEGERNOM_PINTEGERID_STEL (FK)INTEGERSTELAZHID_STEL (PK)INTEGERNOM_STINTEGERE_NVJID_ENVJ (PK)INTEGERID_NVJ (FK)INTEGERSTATEYID_ST (PK)INTEGERNAME_ST NCHAR(50)ID_NVJ (FK)INTEGERST_AUTHID_AUTHOR (FK)INTEGERID_ST (FK)INTEGER
1. 2. ER-?????? IDEF 1x.
3. ?????? ?? ???????? ?? (SQL).
CREATE DATABASE BiblioDKB
CREATE TABLE BOOK
(
ID_BOOKINTEGER NOT NULL,
ID_TEMINTEGER NULL,
PRICENUMERIC NULL,
NAME_BOOKNCHAR(50) NULL
);
CREATE UNIQUE INDEX IXBOOK ON BOOK
(
ID_BOOKASC
);
CREATE TABLE AUTHOR
(
ID_AUTHORINTEGER NOT NULL,
SURNAME_AUTHNCHAR(50) NULL,
NAME_AUTHNCHAR(50) NULL
);
CREATE UNIQUE INDEX IXAUTHOR ON AUTHOR
(
ID_AUTHORASC
);
CREATE TABLE IZDATELSTVO
(
ID_IZDINTEGER NOT NULL,
NAME_IZDNCHAR(50) NULL
);
CREATE UNIQUE INDEX IXIZDATELSTVO ON IZDATELSTVO
(
ID_IZDASC
);
CREATE TABLE JOURNAL
(
ID_JOURINTEGER NOT NULL,
ID_IZDINTEGER NULL,
ID_TEMINTEGER NULL,
NAME_JOURNCHAR(50) NULL
);
CREATE UNIQUE INDEX IXJOURNAL ON JOURNAL
(
ID_JOURASC
);
CREATE TABLE EKZ_BOOK
(
ID_EXZ_BINTEGER NOT NULL,
ID_PINTEGER NULL,
ID_BOOKINTEGER NULL
);
CREATE UNIQUE INDEX IXEKZ_BOOK ON EKZ_BOOK
(
ID_EXZ_BASC
);
CREATE TABLE CHITATEL
(
ID_CHITINTEGER NOT NULL,
NAME_CHNCHAR(50) NULL,
SURNAME_CHNCHAR(50) NULL
);
CREATE UNIQUE INDEX IXCHITATEL ON CHITATEL
(
ID_CHITASC
);
CREATE TABLE STELAZH
(
ID_STELINTEGER NOT NULL,
NOM_STINTEGER NULL
);
CREATE UNIQUE INDEX IXSTELAZH ON STELAZH
(
ID_STELASC
);
CREATE TABLE POLKA
(
ID_PINTEGER NOT NULL,
NOM_PINTEGER NULL,
ID_STELINTEGER NULL
);
CREATE UNIQUE INDEX IXPOLKA ON POLKA
(
ID_PASC
);
CREATE TABLE TEMATIKA
(
ID_TEMINTEGER NOT NULL,
NAME_TEMNCHAR(50) NULL
);
CREATE UNIQUE INDEX IXTEMATIKA ON TEMATIKA
(
ID_TEMASC
);
CREATE TABLE BOOK_AUTHOR
(
ID_AUTHORINTEGER NOT NULL,
ID_BOOKINTEGER NOT NULL
);
CREATE UNIQUE INDEX IXBOOK_AUTHOR ON BOOK_AUTHOR
(
ID_AUTHORASC,
ID_BOOKASC
);
CREATE TABLE IZDANIE
(
ID_BOOKINTEGER NOT NULL,
GOD_IZDINTEGER NOT NULL,
ID_IZDINTEGER NOT NULL
);
CREATE UNIQUE INDEX IXIZDANIE ON IZDANIE
(
ID_BOOKASC,
GOD_IZDASC,
ID_IZDASC
);
CREATE TABLE E_BOOK
(
ID_BOOKINTEGER NULL,
ID_EBOOKINTEGER NOT NULL
);
CREATE UNIQUE INDEX IXE_BOOK ON E_BOOK
(
ID_EBOOKASC
);
CREATE TABLE VIDACHA
(
ID_EXZ_JINTEGER NULL,
DATA_ARRRdatetime NULL,
ID_CHITINTEGER NULL,
ID_VIDINTEGER NOT NULL,
ID_BLRINTEGER NULL,
ID_EXZ_BINTEGER NULL
);
CREATE UNIQUE INDEX IXVIDACHA ON VIDACHA
(
ID_VIDASC
);
CREATE TABLE NV_JOUR
(
ID_NVJINTEGER NOT NULL,
ID_JOURINTEGER NULL,
NOM_VIPINTEGER NULL,
DATE_VDATETIME NULL
);
CREATE UNIQUE INDEX IXNV_JOUR ON NV_JOUR
(
ID_NVJASC
);
CREATE TABLE EXZ_JOUR
(
ID_EXZ_JINTEGER NOT NULL,
ID_NVJINTEGER NULL,
ID_PINTEGER NULL
);
CREATE UNIQUE INDEX IXEXZ_JOUR ON EXZ_JOUR
(
ID_EXZ_JASC
);
CREATE TABLE STATEY
(
ID_STINTEGER NOT NULL,
NAME_STNCHAR(50) NULL,
ID_NVJINTEGER NULL
);
CREATE UNIQUE INDEX IXSTATEY ON STATEY
(
ID_STASC
);
CREATE TABLE ST_AUTH
(
ID_AUTHORINTEGER NOT NULL,
ID_STINTEGER NOT NULL
);
CREATE UNIQUE INDEX IXST_AUTH ON ST_AUTH
(
ID_AUTHORASC,
ID_STASC
);
CREATE TABLE E_NVJ
(
ID_ENVJINTEGER NOT NULL,
ID_NVJINTEGER NULL
);
CREATE UNIQUE INDEX IXE_NVJ ON E_NVJ
(
ID_ENVJASC
);
CREATE TABLE BIBLIOTEKAR
(
ID_BLRINTEGER NOT NULL,
SURNAME_BLRNCHAR(50) NULL,
NAME_BLRNCHAR(50) NULL
);
CREATE UNIQUE INDEX IXBIBLIOTEKAR ON BIBLIOTEKAR
(
ID_BLRASC
);
ALTER TABLE BOOK
ADD PRIMARY KEY (ID_BOOK);
ALTER TABLE AUTHOR
ADD PRIMARY KEY (ID_AUTHOR);
ALTER TABLE IZDATELSTVO
ADD PRIMARY KEY (ID_IZD);
ALTER TABLE JOURNAL
ADD PRIMARY KEY (ID_JOUR);
ALTER TABLE EKZ_BOOK
ADD PRIMARY KEY (ID_EXZ_B);
ALTER TABLE CHITATEL
ADD PRIMARY KEY (ID_CHIT);
ALTER TABLE STELAZH
ADD PRIMARY KEY (ID_STEL);
ALTER TABLE POLKA
ADD PRIMARY KEY (ID_P);
ALTER TABLE TEMATIKA
ADD PRIMARY KEY (ID_TEM);
ALTER TABLE BOOK_AUTHOR
ADD PRIMARY KEY (ID_AUTHOR,ID_BOOK);
ALTER TABLE IZDANIE
ADD PRIMARY KEY (ID_BOOK,GOD_IZD,ID_IZD);
ALTER TABLE E_BOOK
ADD PRIMARY KEY (ID_EBOOK);
ALTER TABLE VIDACHA
ADD PRIMARY KEY (ID_VID);
ALTER TABLE NV_JOUR
ADD PRIMARY KEY (ID_NVJ);
ALTER TABLE EXZ_JOUR
ADD PRIMARY KEY (ID_EXZ_J);
ALTER TABLE STATEY
ADD PRIMARY KEY (ID_ST);
ALTER TABLE ST_AUTH
ADD PRIMARY KEY (ID_AUTHOR,ID_ST);
ALTER TABLE E_NVJ
ADD PRIMARY KEY (ID_ENVJ);
ALTER TABLE BIBLIOTEKAR
ADD PRIMARY KEY (ID_BLR);
ALTER TABLE BOOK
ADD FOREIGN KEY (ID_TEM) REFERENCES TEMATIKA;
ALTER TABLE JOURNAL
ADD FOREIGN KEY (ID_IZD) REFERENCES IZDATELSTVO;
ALTER TABLE JOURNAL
ADD FOREIGN KEY (ID_TEM) REFERENCES TEMATIKA;
ALTER TABLE EKZ_BOOK
ADD FOREIGN KEY (ID_P) REFERENCES POLKA;
ALTER TABLE EKZ_BOOK
ADD FOREIGN KEY (ID_BOOK) REFERENCES BOOK;
ALTER TABLE POLKA
ADD FOREIGN KEY (ID_STEL) REFERENCES STELAZH;
ALTER TABLE BOOK_AUTHOR
ADD FOREIGN KEY (ID_AUTHOR) REFERENCES AUTHOR;
ALTER TABLE BOOK_AUTHOR
ADD FOREIGN KEY (ID_BOOK) REFERENCES BOOK;
ALTER TABLE IZDANIE
ADD FOREIGN KEY (ID_BOOK) REFERENCES BOOK;
ALTER TABLE IZDANIE
ADD FOREIGN KEY (ID_IZD) REFERENCES IZDATELSTVO;
ALTER TABLE E_BOOK
ADD FOREIGN KEY (ID_BOOK) REFERENCES BOOK;
ALTER TABLE VIDACHA
ADD FOREIGN KEY (ID_EXZ_J) REFERENCES EXZ_JOUR;
ALTER TABLE VIDACHA
ADD FOREIGN KEY (ID_CHIT) REFERENCES CHITATEL;
ALTER TABLE VIDACHA
ADD FOREIGN KEY (ID_BLR) REFERENCES BIBLIOTEKAR;
ALTER TABLE VIDACHA
ADD FOREIGN KEY (ID_EXZ_B) REFERENCES EKZ_BOOK;
ALTER TABLE NV_JOUR
ADD FOREIGN KEY (ID_JOUR) REFERENCES JOURNAL;
ALTER TABLE EXZ_JOUR
ADD FOREIGN KEY (ID_NVJ) REFERENCES NV_JOUR;
ALTER TABLE EXZ_JOUR
ADD FOREIGN KEY (ID_P) REFERENCES POLKA;
ALTER TABLE STATEY
ADD FOREIGN KEY (ID_NVJ) REFERENCES NV_JOUR;
ALTER TABLE ST_AUTH
ADD FOREIGN KEY (ID_AUTHOR) REFERENCES AUTHOR;
ALTER TABLE ST_AUTH
ADD FOREIGN KEY (ID_ST) REFERENCES STATEY;
ALTER TABLE E_NVJ
ADD FOREIGN KEY (ID_NVJ) REFERENCES NV_JOUR;
4. ?????? INSERT.
INSERT INTO dbo.CHITATEL VALUES (0, '??????', '??????');
INSERT INTO dbo.CHITATEL VALUES (1, '???????', '????????');
INSERT INTO dbo.CHITATEL VALUES (2, '???????', '???????');
INSERT INTO dbo.CHITATEL VALUES (3, '??????????', '???????');
INSERT INTO dbo.CHITATEL VALUES (4, '?????', '??????');
INSERT INTO dbo.CHITATEL VALUES (5, '??????', '??????');
INSERT INTO dbo.CHITATEL VALUES (6, '?????', '??????');
INSERT INTO dbo.CHITATEL VALUES (7, '??????', '???????');
INSERT INTO dbo.CHITATEL VALUES (8, '??????', '?????');
INSERT INTO dbo.BIBLIOTEKAR VALUES (0, '??????', '?????????');
INSERT INTO dbo.BIBLIOTEKAR VALUES (1, '???????', '?????');
INSERT INTO dbo.TEMATIKA VALUES (0, '??');
INSERT INTO dbo.TEMATIKA VALUES (1, 'IT');
INSERT INTO dbo.TEMATIKA VALUES (2, '?????????');
INSERT INTO dbo.TEMATIKA VALUES (3, '??????????');
INSERT INTO dbo.BOOK VALUES (0, 1, 340, '???????????????? ?++');
INSERT INTO dbo.BOOK VALUES (1, 1, 400, '???????????????? SQL');
INSERT INTO dbo.BOOK VALUES (2, 0, 200, '?????????????? ??????');
INSERT INTO dbo.BOOK VALUES (3, 2, 150, '??????????????');
INSERT INTO dbo.BOOK VALUES (4, 2, 120, '??????????????');
INSERT INTO dbo.BOOK VALUES (5, 3, 210, '?????????? ????????');
INSERT INTO dbo.BOOK VALUES (6, 3, 210, '??? ??????????');
INSERT INTO dbo.BOOK VALUES (7, 1, 340, '???? ???????? ??????????');
INSERT INTO dbo.AUTHOR VALUES (0, '?????', '????????');
INSERT INTO dbo.AUTHOR VALUES (1, '????????', '?????');
INSERT INTO dbo.AUTHOR VALUES (2, '????????', '??????');
INSERT INTO dbo.AUTHOR VALUES (3, '?????', '????????');
INSERT INTO dbo.AUTHOR VALUES (4, '????????', '?????');
INSERT INTO dbo.AUTHOR VALUES (5, '?????????', '???????');
INSERT INTO dbo.BOOK_AUTHOR VALUES (1,3);
INSERT INTO dbo.BOOK_AUTHOR VALUES (2,3);
INSERT INTO dbo.BOOK_AUTHOR VALUES (5,7);
INSERT INTO dbo.BOOK_AUTHOR VALUES (0,0);
INSERT INTO dbo.BOOK_AUTHOR VALUES (0,1);
INSERT INTO dbo.BOOK_AUTHOR VALUES (3,3);
INSERT INTO dbo.BOOK_AUTHOR VALUES (3,4);
INSERT INTO dbo.BOOK_AUTHOR VALUES (4,4);
INSERT INTO dbo.IZDATELSTVO VALUES (0, '????');
INSERT INTO dbo.IZDATELSTVO VALUES (1, '????????????');
INSERT INTO dbo.IZDATELSTVO VALUES (2, 'De Agostini');
INSERT INTO dbo.JOURNAL VALUES (0,0,1,'???????????? ?????');
INSERT INTO dbo.JOURNAL VALUES (1,2,1,'?????');
INSERT INTO dbo.JOURNAL VALUES (2,2,3,'??? ????????');
INSERT INTO dbo.JOURNAL VALUES (3,1,2,'????? ? ??????');
INSERT INTO dbo.JOURNAL VALUES (4,1,3,'????????');
INSERT INTO dbo.JOURNAL VALUES (5,0,3,'??????? ??????');
INSERT INTO dbo.JOURNAL VALUES (6,2,1,'????? ???');
INSERT INTO dbo.IZDANIE VALUES (0,2004,1);
INSERT INTO dbo.IZDANIE VALUES (0,2010,1);
INSERT INTO dbo.IZDANIE VALUES (1,2010,1);
INSERT INTO dbo.IZDANIE VALUES (2,1996,1);
INSERT INTO dbo.IZDANIE VALUES (2,2000,1);
INSERT INTO dbo.IZDANIE VALUES (2,2004,1);
INSERT INTO dbo.IZDANIE VALUES (3,2004,0);
INSERT INTO dbo.IZDANIE VALUES (4,1984,0);
INSERT INTO dbo.IZDANIE VALUES (4,2000,0);
INSERT INTO dbo.IZDANIE VALUES (5,2004,0);
INSERT INTO dbo.IZDANIE VALUES (6,2012,1);
INSERT INTO dbo.IZDANIE VALUES (7,2010,0);
INSERT INTO dbo.STELAZH VALUES (0,1);
INSERT INTO dbo.STELAZH VALUES (1,2);
INSERT INTO dbo.STELAZH VALUES (2,3);
INSERT INTO dbo.POLKA VALUES (0,1,0)
INSERT INTO dbo.POLKA VALUES (1,2,0)
INSERT INTO dbo.POLKA VALUES (2,1,1)
INSERT INTO dbo.POLKA VALUES (3,2,1)
INSERT INTO dbo.POLKA VALUES (4,1,2)
INSERT INTO dbo.POLKA VALUES (5,2,2)
INSERT INTO dbo.EKZ_BOOK VALUES (0,3,0)
INSERT INTO dbo.EKZ_BOOK VALUES (1,3,0)
INSERT INTO dbo.EKZ_BOOK VALUES (2,3,0)
INSERT INTO dbo.EKZ_BOOK VALUES (3,2,1)
INSERT INTO dbo.EKZ_BOOK VALUES (4,2,1)
INSERT INTO dbo.EKZ_BOOK VALUES (5,2,2)
INSERT INTO dbo.EKZ_BOOK VALUES (6,2,2)
INSERT INTO dbo.EKZ_BOOK VALUES (7,3,2)
INSERT INTO dbo.EKZ_BOOK VALUES (8,3,2)
INSERT INTO dbo.EKZ_BOOK VALUES (9,1,3)
INSERT INTO dbo.EKZ_BOOK VALUES (10,1,3)
INSERT INTO dbo.EKZ_BOOK VALUES (11,1,3)
INSERT INTO dbo.EKZ_BOOK VALUES (12,1,3)
INSERT INTO dbo.EKZ_BOOK VALUES (13,0,3)
INSERT INTO dbo.EKZ_BOOK VALUES (14,0,3)
INSERT INTO dbo.EKZ_BOOK VALUES (15,0,4)
INSERT INTO dbo.EKZ_BOOK VALUES (16,0,4)
INSERT INTO dbo.EKZ_BOOK VALUES (17,0,4)
INSERT INTO dbo.EKZ_BOOK VALUES (18,2,5)
INSERT INTO dbo.EKZ_BOOK VALUES (19,5,6)
INSERT INTO dbo.EKZ_BOOK VALUES (20,5,6)
INSERT INTO dbo.EKZ_BOOK VALUES (21,5,7)
INSERT INTO dbo.EKZ_BOOK VALUES (22,3,1)
INSERT INTO dbo.NV_JOUR VALUES (0,0,1,'24.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (1,0,2,'01.05.2012')
INSERT INTO dbo.NV_JOUR VALUES (2,1,3,'24.03.2012')
INSERT INTO dbo.NV_JOUR VALUES (3,1,4,'24.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (4,1,5,'24.05.2012')
INSERT INTO dbo.NV_JOUR VALUES (5,2,1,'24.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (6,2,2,'24.05.2012')
INSERT INTO dbo.NV_JOUR VALUES (7,3,1,'24.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (8,3,2,'01.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (9,3,3,'08.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (10,4,6,'24.03.2012')
INSERT INTO dbo.NV_JOUR VALUES (11,5,1,'24.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (12,5,1,'01.05.2012')
INSERT INTO dbo.NV_JOUR VALUES (13,5,1,'08.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (14,5,1,'15.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (15,5,1,'24.05.2012')
INSERT INTO dbo.NV_JOUR VALUES (16,6,1,'24.04.2012')
INSERT INTO dbo.NV_JOUR VALUES (17,6,1,'01.05.2012')
INSERT INTO dbo.EXZ_JOUR VALUES (0,0,5)
INSERT INTO dbo.EXZ_JOUR VALUES (1,0,4)
INSERT INTO dbo.EXZ_JOUR VALUES (2,1,5)
INSERT INTO dbo.EXZ_JOUR VALUES (3,1,4)
INSERT INTO dbo.EXZ_JOUR VALUES (4,1,4)
INSERT INTO dbo.EXZ_JOUR VALUES (5,2,4)
INSERT INTO dbo.EXZ_JOUR VALUES (6,3,4)
INSERT INTO dbo.EXZ_JOUR VALUES (7,3,4)
INSERT INTO dbo.EXZ_JOUR VALUES (8,3,4)
INSERT INTO dbo.EXZ_JOUR VALUES (9,3,4)
INSERT INTO dbo.EXZ_JOUR VALUES (10,4,4)
INSERT INTO dbo.EXZ_JOUR VALUES (11,4,4)
INSERT INTO dbo.EXZ_JOUR VALUES (12,4,4)
INSERT INTO dbo.EXZ_JOUR VALUES (13,5,4)
INSERT INTO dbo.EXZ_JOUR VALUES (14,5,4)
INSERT INTO dbo.EXZ_JOUR VALUES (15,6,4)
INSERT INTO dbo.EXZ_JOUR VALUES (16,7,4)
INSERT INTO dbo.EXZ_JOUR VALUES (17,8,4)
INSERT INTO dbo.EXZ_JOUR VALUES (18,9,4)
INSERT INTO dbo.EXZ_JOUR VALUES (19,10,4)
INSERT INTO dbo.EXZ_JOUR VALUES (20,10,4)
INSERT INTO dbo.EXZ_JOUR VALUES (21,10,4)
INSERT INTO dbo.EXZ_JOUR VALUES (22,10,4)
INSERT INTO dbo.EXZ_JOUR VALUES (23,11,4)
INSERT INTO dbo.EXZ_JOUR VALUES (24,12,5)
INSERT INTO dbo.EXZ_JOUR VALUES (25,13,5)
INSERT INTO dbo.EXZ_JOUR VALUES (26,13,5)
INSERT INTO dbo.EXZ_JOUR VALUES (27,13,5)
INSERT INTO dbo.EXZ_JOUR VALUES (28,13,5)
INSERT INTO dbo.EXZ_JOUR VALUES (29,13,5)
INSERT INTO dbo.EXZ_JOUR VALUES (30,14,5)
INSERT INTO dbo.EXZ_JOUR VALUES (31,15,5)
INSERT INTO dbo.EXZ_JOUR VALUES (32,16,5)
INSERT INTO dbo.EXZ_JOUR VALUES (33,16,5)
INSERT INTO dbo.EXZ_JOUR VALUES (34,17,4)
INSERT INTO dbo.EXZ_JOUR VALUES (35,17,4)
INSERT INTO dbo.VIDACHA VALUES (NULL,'5.7.2010', 3,0,0,10)
INSERT INTO dbo.VIDACHA VALUES (NULL,'5.7.2010', 3,1,0,17)
INSERT INTO dbo.VIDACHA VALUES (3,'5.7.2010', 3,2,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'5.7.2010', 0,3,0,15)
INSERT INTO dbo.VIDACHA VALUES (NULL,'5.7.2010', 6,4,0,9)
INSERT INTO dbo.VIDACHA VALUES (NULL,'5.7.2010', 0,5,1,0)
INSERT INTO dbo.VIDACHA VALUES (4,'5.7.2010', 6,6,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (8,'5.7.2010', 8,7,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'5.7.2010', 3,8,1,21)
INSERT INTO dbo.VIDACHA VALUES (3,'5.7.2010', 8,9,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (28,'5.7.2010', 8,10,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (29,'5.7.2010', 6,11,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'5.7.2010', 5,12,0,10)
INSERT INTO dbo.VIDACHA VALUES (19,'6.7.2010', 2,13,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (21,'6.7.2010', 2,14,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'6.7.2010', 2,15,0,5)
INSERT INTO dbo.VIDACHA VALUES (NULL,'6.7.2010', 6,16,0,19)
INSERT INTO dbo.VIDACHA VALUES (NULL,'6.7.2010', 6,17,0,18)
INSERT INTO dbo.VIDACHA VALUES (35,'6.7.2010', 8,18,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'6.7.2010', 7,19,0,21)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 0,20,1,5)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 2,21,1,9)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 3,22,1,6)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 4,23,1,3)
INSERT INTO dbo.VIDACHA VALUES (20,'8.7.2010', 4,24,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (22,'8.7.2010', 4,25,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (12,'8.7.2010', 5,26,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 5,27,1,4)
INSERT INTO dbo.VIDACHA VALUES (0,'8.7.2010', 5,28,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 6,29,1,3)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 6,30,0,5)
INSERT INTO dbo.VIDACHA VALUES (1,'8.7.2010', 1,31,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 1,32,0,21)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 0,33,0,11)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 2,34,0,7)
INSERT INTO dbo.VIDACHA VALUES (NULL,'8.7.2010', 4,35,0,5)
INSERT INTO dbo.VIDACHA VALUES (13,'8.7.2010', 4,36,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 0,37,0,10)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 2,38,0,12)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 5,39,0,16)
INSERT INTO dbo.VIDACHA VALUES (25,'9.7.2010', 5,40,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 7,41,1,14)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 8,42,1,19)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 8,43,1,5)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 7,44,1,0)
INSERT INTO dbo.VIDACHA VALUES (26,'9.7.2010', 2,45,1,NULL)
INSERT INTO dbo.VIDACHA VALUES (NULL,'9.7.2010', 3,46,0,1)
INSERT INTO dbo.VIDACHA VALUES (32,'9.7.2010', 3,47,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (11,'9.7.2010', 0,48,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (27,'9.7.2010', 2,49,0,NULL)
INSERT INTO dbo.VIDACHA VALUES (33,'9.7.2010', 5,50,0,NULL)
5. ???????.
??????? ?? ????? ???????? ???? 2010 ???? ???????:
??????? ???????? ? ?????????? ???????? ?????????? ??????? ?????? ????:
????? ????? ?? ??????? ????? ??????? ?? ???? IT:
????????????? VIEW:
??????? ????????????? ??? ?????? ????? ???? ? ???????? ?? 8.7.2010
??????? ?????? ???????????? ???????
????????? SELECT:
????? ????? ?? ??????? ?????? ????? ???? ? ??????? ?? ??????????????.
??????? ????????????? ??? ?????????? ???? ?? ??????
??????? ?????????????? ????? ?? ??????? ????? ?????? ????? ????
2
Документ
Категория
Без категории
Просмотров
13
Размер файла
340 Кб
Теги
kursovaya_rabota_bd
1/--страниц
Пожаловаться на содержимое документа