ΠΠ°ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅.
Π Π°Π·ΡΠ°Π±ΠΎΡΠΊΠ° Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ
Π΄Π»Ρ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ "ΠΡΠΎΠ΄Π°ΠΆΠ° ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ½ΠΎΠΉ ΡΠ΅Ρ
Π½ΠΈΠΊΠΈ"
Values (ID_Cl.NextVal,'Shirokov V.N.', TO_DATE ('1980/01/01','YYYY/MM/DD'), '9 183 212 115', 'Moscow, Volgogradskaya, 31β15','111 352'); Values (ID_Cl.NextVal,'Malaxova O.U.', TO_DATE ('1990/11/22','YYYY/MM/DD'), '9 031 823 574', 'Moscow, Komsomolskaya, 64β12','196 182'); Values (ID_Cl.NextVal,'Nikolaev A.N.', TO_DATE ('1989/04/13','YYYY/MM/DD'), '9 032 183 131','Moscow, Zelenaya… Π§ΠΈΡΠ°ΡΡ Π΅ΡΡ >
ΠΠ°ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅. Π Π°Π·ΡΠ°Π±ΠΎΡΠΊΠ° Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ Π΄Π»Ρ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ "ΠΡΠΎΠ΄Π°ΠΆΠ° ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ½ΠΎΠΉ ΡΠ΅Ρ Π½ΠΈΠΊΠΈ" (ΡΠ΅ΡΠ΅ΡΠ°Ρ, ΠΊΡΡΡΠΎΠ²Π°Ρ, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½ΡΡΠΎΠ»ΡΠ½Π°Ρ)
ΠΡΡΡΠΎΠ²Π°Ρ ΡΠ°Π±ΠΎΡΠ° ΠΏΠΎΡΠ²ΡΡΠ΅Π½Π° ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠ΅ Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ ΠΌΠ°Π³Π°Π·ΠΈΠ½Π° «Π’Π΅Ρ Π½ΠΎΠ’ΠΎΡΠ³».
Π Π΅ΡΠ΅Π½Ρ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ Π·Π°Π΄Π°ΡΠΈ:
- Β· ΠΡΠΎΠΈΠ·Π²Π΅Π΄Π΅Π½ ΡΠΈΡΡΠ΅ΠΌΠ½ΡΠΉ Π°Π½Π°Π»ΠΈΠ· ΠΏΡΠ΅Π΄ΠΌΠ΅ΡΠ½ΠΎΠΉ ΠΎΠ±Π»Π°ΡΡΠΈ;
- Β· ΠΠΎΡΡΡΠΎΠ΅Π½Π° ΠΈΠ½ΡΠΎΠ»ΠΎΠ³ΠΈΡΠ΅ΡΠΊΠ°Ρ ΠΌΠΎΠ΄Π΅Π»Ρ;
- Β· ΠΠΎΡΡΡΠΎΠ΅Π½Π° ΡΠ΅Π»ΡΡΠΈΠΎΠ½Π½Π°Ρ ΠΌΠΎΠ΄Π΅Π»Ρ;
- Β· Π Π΅Π°Π»ΠΈΠ·Π°ΡΠΈΡ Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ Π² Π‘Π£ΠΠ Oracle apex.
Π Π°Π·ΡΠ°Π±ΠΎΡΠ°Π½Π° ΡΠ΅Π»ΡΡΠΈΠΎΠ½Π½Π°Ρ Π±Π°Π·Π° Π΄Π°Π½Π½ΡΡ , ΡΠΎΠ΄Π΅ΡΠΆΠ°ΡΠ°Ρ ΡΠ»Π΅ΠΌΠ΅Π½ΡΡ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΠ·Π°ΡΠΈΠΈ ΠΈ ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ Π΄Π°Π½Π½ΡΡ . Π Π΅Π΅ ΡΠΎΡΡΠ°Π²Π΅: 10 ΡΠ°Π±Π»ΠΈΡ, 3 ΡΡΠΈΠ³Π³Π΅ΡΠ°.
Π‘ΠΏΠΈΡΠΎΠΊ Π»ΠΈΡΠ΅ΡΠ°ΡΡΡΡ
- 1. ΠΠΎΡΠΎΠ½ΠΎΠ²Π° Π.Π. «ΠΠ°Π±ΠΎΡΠ°ΡΠΎΡΠ½ΡΠΉ ΠΏΡΠ°ΠΊΡΠΈΠΊΡΠΌ ΠΏΠΎ Π΄ΠΈΡΡΠΈΠΏΠ»ΠΈΠ½Π΅ „Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ “» — ΠΠΎΡΠΊΠ²Π° 2010 Π³.
- 2. ΠΠΠ‘Π’ 2.105−95 ΠΠ΄ΠΈΠ½Π°Ρ ΡΠΈΡΡΠ΅ΠΌΠ° ΠΊΠΎΠ½ΡΡΡΡΠΊΡΠΎΡΡΠΊΠΎΠΉ Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΠΈ. ΠΠ±ΡΠΈΠ΅ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ ΠΊ ΡΠ΅ΠΊΡΡΠΎΠ²ΡΠΌ Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΠΌ
- 3. ΠΡΡΠΈΠΊΠΎΠ² Π‘. Π .
ΠΠ²Π΅Π΄Π΅Π½ΠΈΠ΅
Π² ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ Π½Π° ΡΠ·ΡΠΊΠ΅ Visual C#: ΡΡΠ΅Π±Π½ΠΎΠ΅ ΠΏΠΎΡΠΎΠ±ΠΈΠ΅ / Π‘. Π . ΠΡΡΠΈΠΊΠΎΠ². — Π.: Π€ΠΠ Π£Π: ΠΠΠ€Π Π-Π, 2013. — 448 Ρ. — (ΠΡΡΡΠ΅Π΅ ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠ΅. ΠΠ°ΠΊΠ°Π»Π°Π²ΡΠΈΠ°Ρ).
- 4. ΠΠ°ΡΠΏΠΎΠ²Π° Π’. Π‘. «ΠΠ°Π·Ρ ΠΠ°Π½Π½ΡΡ » — ΠΠΈΡΠ΅Ρ, 2002 Π³. — Π Π΅ΠΆΠΈΠΌ Π΄ΠΎΡΡΡΠΏΠ°: http://biblioteka.cc/index.php?newsid=74 396
- 5. ΠΠΎΠΌΠΏΠ°ΠΊΡΠ½Π°Ρ Π²ΡΡΡΠ°ΠΈΠ²Π°Π΅ΠΌΠ°Ρ ΡΠ΅Π»ΡΡΠΈΠΎΠ½Π½Π°Ρ Π±Π°Π·Π° Π΄Π°Π½Π½ΡΡ SQLite: sqlite.org
- 6. ΠΡΡΠ½ΠΊΠ΅ Π. «Π’Π΅ΠΎΡΠΈΡ ΠΈ ΠΏΡΠ°ΠΊΡΠΈΠΊΠ° ΠΏΠΎΡΡΡΠΎΠ΅Π½ΠΈΡ Π±Π°Π· Π΄Π°Π½Π½ΡΡ » — ΠΠΈΡΠ΅Ρ, 2003 Π³.-800Ρ.
- 7. ΠΠ΅Π²ΡΠ΅Π½ΠΊΠΎ ΠΠ»ΡΠ³Π°: [ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠΉ ΡΠ΅ΡΡΡΡ] Π‘ΡΠ°ΡΡΡ «Microsoft SQL Server» — ΡΠ΅ΠΆΠΈΠΌ Π΄ΠΎΡΡΡΠΏΠ°: http://bourabai.kz/dbt/servers/MicrosoftSQLServer.htm
- 8. Π Π°Π±ΠΎΡΠ° Ρ MS Word Π² C# [ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠΉ ΡΠ΅ΡΡΡΡ]. — Π Π΅ΠΆΠΈΠΌ Π΄ΠΎΡΡΡΠΏΠ°: http://wladm.narod.ru/C_Sharp/comword.html.
- 9. Π‘Π²ΠΎΠ±ΠΎΠ΄Π½Π°Ρ ΡΠ΅Π»ΡΡΠΈΠΎΠ½Π½Π°Ρ Π‘Π£ΠΠ MySQL: mysql.com
- 10. Π‘ΠΈΡΡΠ΅ΠΌΠ° ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ ΡΠ΅Π»ΡΡΠΈΠΎΠ½Π½ΡΠΌΠΈ Π±Π°Π·Π°ΠΌΠΈ Π΄Π°Π½Π½ΡΡ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠ°Π½Π½Π°Ρ ΠΊΠΎΡΠΏΠΎΡΠ°ΡΠΈΠ΅ΠΉ Microsoft: https://www.microsoft.com/en-us/server-cloud/products/sql-server/#fbid=JQk2DSKWQLz
- 11. Π‘Π£ΠΠ Oracle: http://www.oracle.com/technetwork/database/database-t.
- 12. Microsoft Access — ΡΠ΅Π»ΡΡΠΈΠΎΠ½Π½Π°Ρ Π‘Π£ΠΠ: https://products.office.com/ru-RU/access
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅
ΠΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΡΠΉ ΠΊΠΎΠ΄ Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΠ»ΠΈΠ΅Π½ΡΡ.
create table CLIENT (.
ID_Client int PRIMARY KEY,.
FIO varchar (25) NOT NULL,.
Birth_Date date NOT NULL,.
Phone varchar (20) NOT NULL,.
Address varchar (50) NOT NULL,.
ZIP int NOT NULL);
Create Sequence ID_Cl Increment by 1 start with 1;
Insert into CLIENT (ID_Client, FIO, Birth_Date, Phone, Address, ZIP).
Values (ID_Cl.NextVal,'Shirokov V.N.', TO_DATE ('1980/01/01','YYYY/MM/DD'), '9 183 212 115', 'Moscow, Volgogradskaya, 31−15','111 352');
Insert into CLIENT (ID_Client, FIO, Birth_Date, Phone, Address, ZIP).
Values (ID_Cl.NextVal,'Malaxova O.U.', TO_DATE ('1990/11/22','YYYY/MM/DD'), '9 031 823 574', 'Moscow, Komsomolskaya, 64−12','196 182');
Insert into CLIENT (ID_Client, FIO, Birth_Date, Phone, Address, ZIP).
Values (ID_Cl.NextVal,'Nikolaev A.N.', TO_DATE ('1989/04/13','YYYY/MM/DD'), '9 032 183 131','Moscow, Zelenaya, 25−18','315 112');
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΡΠΎΠ΄Π°Π²ΡΡ.
create table SELLER (.
ID_Seller int PRIMARY KEY,.
FIO varchar (25) NOT NULL,.
Birth_Date date NOT NULL,.
Pasport int NOT NULL,.
Phone varchar (20) NOT NULL,.
Address varchar (50) NOT NULL,.
Date_Priema date NOT NULL);
Create Sequence ID_Sel Increment by 1 start with 1;
Insert into SELLER (ID_Seller, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Sel.NextVal,'Ivanov I.I.', TO_DATE ('1991/05/13','YYYY/MM/DD'),'6 115 348 243','9 051 237 816','Moscow, Aviamotornaya, 34−8', TO_DATE ('2015/02/05','YYYY/MM/DD'));
Insert into SELLER (ID_Seller, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Sel.NextVal,'Alekseeva N.D.', TO_DATE ('1987/04/21','YYYY/MM/DD'),'6 211 354 218','9 203 211 515','Moscow, Volgogradskaya, 7−64', TO_DATE ('2016/03/21','YYYY/MM/DD'));
Insert into SELLER (ID_Seller, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Sel.NextVal,'Smirnov N.I.', TO_DATE ('1990/09/21','YYYY/MM/DD'),'3 208 114 586','9 207 421 881','Moscow, Avtozavodskaya, 16−5', TO_DATE ('2015/01/17','YYYY/MM/DD'));
Insert into SELLER (ID_Seller, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Sel.NextVal,'Xoxlova I.V.', TO_DATE ('1987/02/01','YYYY/MM/DD'),'6 512 132 476','9 031 283 516','Tula, Biruzova, 13−17', TO_DATE ('2014/05/30','YYYY/MM/DD'));
Insert into SELLER (ID_Seller, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Sel.NextVal,'Krasnova E.A.', TO_DATE ('1992/08/29','YYYY/MM/DD'),'3 842 132 115','9 037 422 835','Moscow, Uznaya, 24−64', TO_DATE ('2016/09/24','YYYY/MM/DD'));
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΠ΅Π½Π΅Π΄ΠΆΠ΅ΡΡ.
create table MANAGER (.
ID_Manager int PRIMARY KEY,.
FIO varchar (25) NOT NULL,.
Birth_Date date NOT NULL,.
Pasport int NOT NULL,.
Phone varchar (20) NOT NULL,.
Address varchar (50) NOT NULL,.
Date_Priema date NOT NULL);
Create Sequence ID_Man Increment by 1 start with 1;
Insert into MANAGER (ID_Manager, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Man.NextVal,'Rublev A.I.', TO_DATE ('1984/01/13','YYYY/MM/DD'),'1 235 748 212','9 035 721 801','Moscow, Svobodnaya, 30−2', TO_DATE ('2014/12/13','YYYY/MM/DD'));
Insert into MANAGER (ID_Manager, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Man.NextVal,'Ivanova A.M.', TO_DATE ('1987/04/20','YYYY/MM/DD'),'6 117 841 211','9 213 151 694','Moscow, Bolshaya, 18−24', TO_DATE ('2015/01/17','YYYY/MM/DD'));
Insert into MANAGER (ID_Manager, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Man.NextVal,'Soboleva I.N.', TO_DATE ('1991/12/03','YYYY/MM/DD'),'3 151 821 322','9 037 541 118','Moscow, Svobodi, 21−24', TO_DATE ('2015/08/02','YYYY/MM/DD'));
Insert into MANAGER (ID_Manager, FIO, Birth_Date, Pasport, Phone, Address, Date_Priema).
Values (ID_Man.NextVal,'Vitko A.G.', TO_DATE ('1990/10/10','YYYY/MM/DD'),'6 215 312 418','9 203 182 111','Moscow, Pushkina, 31−21', TO_DATE ('2016/09/15','YYYY/MM/DD'));
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΠ°ΡΠ΅Π³ΠΎΡΠΈΠΈ.
create table CATEGORY (.
ID_Category int PRIMARY KEY,.
Name varchar (25) NOT NULL);
Create Sequence ID_Cat Increment by 1 start with 1;
Insert into CATEGORY (ID_Category, Name).
Values (ID_Cat.NextVal, 'Telephone');
Insert into CATEGORY (ID_Category, Name).
Values (ID_Cat.NextVal, 'Notebook');
Insert into CATEGORY (ID_Category, Name).
Values (ID_Cat.NextVal, 'Planshet');
Insert into CATEGORY (ID_Category, Name).
Values (ID_Cat.NextVal, 'Aksessuari');
Insert into CATEGORY (ID_Category, Name).
Values (ID_Cat.NextVal, 'PhotoCamera');
Insert into CATEGORY (ID_Category, Name).
Values (ID_Cat.NextVal, 'VideoCamera');
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΠ΅Π»Ρ.
create table MAKER (.
ID_Maker int PRIMARY KEY,.
Name varchar (25) NOT NULL,.
Country varchar (25) NOT NULL,.
Site varchar (50) NOT NULL,.
Phone int NOT NULL);
Create Sequence ID_Maker Increment by 1 start with 1;
Insert into MAKER (ID_Maker, Name, Country, Site, Phone).
Values (ID_Maker.NextVal, 'ASUS','China','asus.ru','88 001 002 787');
Insert into MAKER (ID_Maker, Name, Country, Site, Phone).
Values (ID_Maker.NextVal, 'Huawei','China','shop.huawei.ru','84 953 201 221');
Insert into MAKER (ID_Maker, Name, Country, Site, Phone).
Values (ID_Maker.NextVal, 'Lenovo','China','lenovo.com','861 058 868 888');
Insert into MAKER (ID_Maker, Name, Country, Site, Phone).
Values (ID_Maker.NextVal, 'Nikon','Japan','nikon.ru','84 952 216 912');
Insert into MAKER (ID_Maker, Name, Country, Site, Phone).
Values (ID_Maker.NextVal, 'Canon','Japan','canon.ru','84 952 585 601');
Insert into MAKER (ID_Maker, Name, Country, Site, Phone).
Values (ID_Maker.NextVal, 'Xiaomi','China','ru-xiaomi.com','84 991 109 938');
Insert into MAKER (ID_Maker, Name, Country, Site, Phone).
Values (ID_Maker.NextVal, 'PocketBook','Ukraine','pocketbook-int.com', '88 007 009 327');
Insert into MAKER (ID_Maker, Name, Country, Site Phone).
Values (ID_Maker.NextVal, 'Sony','Japan','sony-russia.com','84 951 252 446');
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΡΠΎΠ΄Π°ΠΆΠ° ΡΠΎΠ²Π°ΡΠ°.
create table CHEK_INFO (.
ID_Chek int PRIMARY KEY,.
ID_Seller int NOT NULL,.
Kolichestvo int NOT NULL);
Create Sequence ID_Chek Increment by 1 start with 1;
alter table CHEK_INFO.
ADD CONSTRAINT SellerFK FOREIGN KEY (ID_Seller) REFERENCES SELLER;
Insert into CHEK_INFO (ID_Chek, ID_Seller, Kolichestvo).
Values (ID_Chek.NextVal, '2','5000');
Insert into CHEK_INFO (ID_Chek, ID_Seller, Kolichestvo).
Values (ID_Chek.NextVal, '3','7200');
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ Π’ΠΎΠ²Π°ΡΡ.
create table PRODUCT (.
ID_Product int PRIMARY KEY,.
Name varchar (30) NOT NULL,.
ID_Category int NOT NULL,.
ID_Maker int NOT NULL,.
Garanty varchar (15) NOT NULL,.
Price int NOT NULL);
Create Sequence ID_Pr Increment by 1 start with 1;
alter table PRODUCT.
ADD CONSTRAINT CategoryFK FOREIGN KEY (ID_Category) REFERENCES CATEGORY;
alter table PRODUCT.
ADD CONSTRAINT MakerFK FOREIGN KEY (ID_Maker) REFERENCES MAKER;
Insert into PRODUCT (ID_Product, Name, ID_Category, ID_Maker, Garanty, Price).
Values (ID_Pr.NextVal, 'ASUS GL552VX','2','1','2 year','57 000');
Insert into PRODUCT (ID_Product, Name, ID_Category, ID_Maker, Garanty, Price).
Values (ID_Pr.NextVal, 'Xiaomi Redmi 4','1','6','2 year','7900');
Insert into PRODUCT (ID_Product, Name, ID_Category, ID_Maker, Garanty, Price).
Values (ID_Pr.NextVal, 'Lenovo Vibe','1','3','1 year','5000');
Insert into PRODUCT (ID_Product, Name, ID_Category, ID_Maker, Garanty, Price).
Values (ID_Pr.NextVal, 'Huawei Nedia Pad','3','2','1 year','7200');
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ ΠΎ ΡΠ΅ΠΊΠ΅.
create table CHEK (.
ID_Chek int NOT NULL,.
ID_Product int NOT NULL,.
Summa int NOT NULL);
alter table CHEK ADD CONSTRAINT PK_CEK PRIMARY KEY (ID_Chek, ID_Product);
alter table CHEK.
ADD CONSTRAINT ChekFK FOREIGN KEY (ID_Chek) REFERENCES CHEK_INFO;
alter table CHEK.
ADD CONSTRAINT MProduct_FK FOREIGN KEY (ID_PRODUCT) REFERENCES PRODUCT;
Insert into CHEK (ID_Chek, ID_Product, Summa).
Values ('1', '3','1');
Insert into CHEK (ID_Chek, ID_Product, Summa).
Values ('2', '4','1');
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΠΎΡΡΠ°Π²ΠΊΠ°.
create table DELIVERY (.
ID_Delivery int PRIMARY KEY,.
Price_Delivery int NOT NULL,.
Address varchar (50) NOT NULL,.
Phone int NOT NULL,.
Date_Delivery date NOT NULL,.
ID_Manager int NOT NULL,.
ID_Order int NOT NULL);
Create Sequence ID_Del Increment by 1 start with 1;
alter table DELIVERY.
ADD CONSTRAINT ManagerFK FOREIGN KEY (ID_Manager) REFERENCES MANAGER;
Insert into DELIVERY (ID_Delivery, ID_Delivery, Address, Phone, Date_Delivery, ID_Manager, ID_Order).
Values (ID_Del.NextVal,'57 000','Moscow, Zelenya, 25−18', '9 032 183 131', TO_DATE ('2016/03/20','YYYY/MM/DD'),'3');
Insert into DELIVERY (ID_Delivery, ID_Delivery, Address, Phone, Date_Delivery, ID_Manager, ID_Order).
Values (ID_Del.NextVal,'7900','Moscow, Komsomolskaya, 64−12', '9 031 823 574', TO_DATE ('2017/04/20','YYYY/MM/DD'),'3');
Insert into DELIVERY (ID_Delivery, ID_Delivery, Address, Phone, Date_Delivery, ID_Manager, ID_Order).
Values (ID_Del.NextVal,'7900','Moscow, Volgogradskaya, 31−5','9 183 212 115', TO_DATE ('2017/04/13','YYYY/MM/DD'),'1');
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΠ°ΠΊΠ°Π·Ρ.
create table ORDERS (.
ID_Order int PRIMARY KEY,.
ID_Product int NOT NULL,.
ID_Client int NOT NULL,.
Kolichestvo int NOT NULL,.
Date_Order date NOT NULL,.
Summa int NOT NULL);
Create Sequence ID_Or Increment by 1 start with 1;
alter table ORDERS.
ADD CONSTRAINT ProductFK FOREIGN KEY (ID_Product) REFERENCES PRODUCT;
alter table ORDERS.
ADD CONSTRAINT ClientFK FOREIGN KEY (ID_Client) REFERENCES CLIENT;
alter table ORDERS.
ADD CONSTRAINT DeliveryFK FOREIGN KEY (ID_Delivery) REFERENCES DELIVERY;
Insert into ORDERS (ID_Order, ID_Product, ID_Client, Kolichestvo, Date_Order, Summa, ID_Delivery).
Values (ID_Or.NextVal,'2','3','1', TO_DATE ('2016/03/20','YYYY/MM/DD'),'57 000','1');
Insert into ORDERS (ID_Order, ID_Product, ID_Client, Kolichestvo, Date_Order, Summa, ID_Delivery).
Values (ID_Or.NextVal,'3','2','1', TO_DATE ('2017/03/31','YYYY/MM/DD'),'7900','2');
Insert into ORDERS (ID_Order, ID_Product, ID_Client, Kolichestvo, Date_Order, Summa, ID_Delivery).
Values (ID_Or.NextVal,'3','1', '1', TO_DATE ('2017/04/11','YYYY/MM/DD'),'7900','3');