Book shop onlayn savdo markazi Sharti (biznes jarayoni qanday ishlaydi?)


-- PRINT (N'Create foreign key [FK_price_condition_conditionid] on table [dbo].[price]')



Download 0,62 Mb.
bet3/3
Sana16.10.2022
Hajmi0,62 Mb.
#853482
1   2   3
Bog'liq
ER model

--
PRINT (N'Create foreign key [FK_price_condition_conditionid] on table [dbo].[price]')
GO
ALTER TABLE dbo.price
ADD CONSTRAINT FK_price_condition_conditionid FOREIGN KEY (conditionId) REFERENCES dbo.condition (conditionid)
GO

--
-- Create table [dbo].[book]
--
PRINT (N'Create table [dbo].[book]')
GO
CREATE TABLE dbo.book (
bookId int IDENTITY,
series varchar(20) NOT NULL,
bookTypeId int NOT NULL,
PRIMARY KEY CLUSTERED (bookId)
)
ON [PRIMARY]
GO

--
-- Create foreign key [FK_book_bookType_bookTypeId] on table [dbo].[book]
--
PRINT (N'Create foreign key [FK_book_bookType_bookTypeId] on table [dbo].[book]')
GO
ALTER TABLE dbo.book
ADD CONSTRAINT FK_book_bookType_bookTypeId FOREIGN KEY (bookTypeId) REFERENCES dbo.bookType (bookTypeId)
GO

--
-- Create table [dbo].[Orders]
--
PRINT (N'Create table [dbo].[Orders]')
GO
CREATE TABLE dbo.Orders (
ordersid int NOT NULL,
userid int NOT NULL,
bookid int NOT NULL,
type bit NOT NULL,
ordertime date NOT NULL,
summa money NOT NULL
)
ON [PRIMARY]
GO

--
-- Create foreign key [FK_Orders_book_bookId] on table [dbo].[Orders]
--
PRINT (N'Create foreign key [FK_Orders_book_bookId] on table [dbo].[Orders]')
GO
ALTER TABLE dbo.Orders
ADD CONSTRAINT FK_Orders_book_bookId FOREIGN KEY (bookid) REFERENCES dbo.book (bookId)
GO

--
-- Create foreign key [FK_Orders_users_usersid] on table [dbo].[Orders]
--
PRINT (N'Create foreign key [FK_Orders_users_usersid] on table [dbo].[Orders]')
GO
ALTER TABLE dbo.Orders
ADD CONSTRAINT FK_Orders_users_usersid FOREIGN KEY (userid) REFERENCES dbo.users (usersid)
GO
Download 0,62 Mb.

Do'stlaringiz bilan baham:
1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish