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



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


Book shop onlayn savdo markazi

  1. Sharti (biznes jarayoni qanday ishlaydi?)

Book shop onlayn savdo markazidan mijoz sotib olishi va kitobni sotuvga qo‘yishi ER modelda qanday aks etishini tasvirlash.
Jarayon qanday ishlaydi?
______________
Mijoz “Book shop onlayn savdo markazi”dan kitobni sotib olishi yoki sotuvga qo‘yishi mumkin.

  1. Obyektlar va ularning attributlari.

Obyektlar:

  1. BookType – qanday turdagi kitoblar borligini aks ettiradigan obyekt.

  2. Book– kitob turi va seriaysi aks etadigan obyekt.

  3. Price – kitobning 3 xil holatdagi narxini aks ettirgan obyekt

  4. Language– kitobni turli tillarda tanlash imkonini berobyekt.

  5. Condition –kitobning 3 xil holatini aks ettiruvchi obyekt.

  6. CoverType– kitobni muqovasini aks ettiruvchi obyekt.

  7. Users –foydalanuvchi turini xaridor yoki sotuvchi maqomini aks ettiruvchi obyekt.

  8. Orders – buyurtma haqidagi barcha ma’lumotlarni rasmiylashtirish jarayonini aks ettiruvchi obyekt.

Attributlari:

T/r

Obyekt nomi

Attributlari


BookType

Id
Title
Bookcover
languageId
conditionId
PublisherId


Book

Id
BookTypeId
Series


Price

Id
BooktypeId
ConditionId
Price




Language

Id
Language




Condition

Id
Condition


CoverType

Id
Typename


Users

Id
Fullname
Phonenumber


Orders

OrdersId
UsersId
BookId
Type
Orderstime
Summa



  1. Relatsion jadval





  1. Normalizatsiya qoidalariga mosligi




  1. SQL script

USE bookshop_rent
GO

IF DB_NAME() <> N'bookshop_rent' SET NOEXEC ON
GO

--
-- Create table [dbo].[users]
--
PRINT (N'Create table [dbo].[users]')
GO
CREATE TABLE dbo.users (
usersid int IDENTITY,
fullname nvarchar(50) NOT NULL,
phonenumber varchar(50) NOT NULL,
PRIMARY KEY CLUSTERED (usersid)
)
ON [PRIMARY]
GO

--
-- Create table [dbo].[publisher]
--
PRINT (N'Create table [dbo].[publisher]')
GO
CREATE TABLE dbo.publisher (
publisherid int IDENTITY,
name nvarchar(50) NOT NULL,
address nvarchar(100) NOT NULL,
phonenumber varchar(20) NOT NULL,
PRIMARY KEY CLUSTERED (publisherid),
UNIQUE (phonenumber)
)
ON [PRIMARY]
GO

--
-- Create table [dbo].[language]
--
PRINT (N'Create table [dbo].[language]')
GO
CREATE TABLE dbo.language (
languageid int NOT NULL,
language nvarchar(50) NOT NULL,
PRIMARY KEY CLUSTERED (languageid)
)
ON [PRIMARY]
GO

--
-- Create table [dbo].[CoverType]
--
PRINT (N'Create table [dbo].[CoverType]')
GO
CREATE TABLE dbo.CoverType (
CoverTypeId int IDENTITY,
TypeName nvarchar(50) NOT NULL,
PRIMARY KEY CLUSTERED (CoverTypeId)
)
ON [PRIMARY]
GO

--
-- Create table [dbo].[condition]
--
PRINT (N'Create table [dbo].[condition]')
GO
CREATE TABLE dbo.condition (
conditionid int IDENTITY,
condition nvarchar(50) NOT NULL,
PRIMARY KEY CLUSTERED (conditionid)
)
ON [PRIMARY]
GO

--
-- Create table [dbo].[author]
--
PRINT (N'Create table [dbo].[author]')
GO
CREATE TABLE dbo.author (
authorId int IDENTITY,
firstname nvarchar(50) NOT NULL,
lastname nvarchar(50) NOT NULL,
birthplace varchar(50) NULL,
PRIMARY KEY CLUSTERED (authorId)
)
ON [PRIMARY]
GO

--
-- Create table [dbo].[bookType]
--
PRINT (N'Create table [dbo].[bookType]')
GO
CREATE TABLE dbo.bookType (
bookTypeId int IDENTITY,
title nvarchar(500) NOT NULL,
bookcover int NOT NULL,
languageId int NOT NULL,
conditionId int NOT NULL,
publisherId int NOT NULL,
authorid int NULL,
PRIMARY KEY CLUSTERED (bookTypeId)
)
ON [PRIMARY]
GO

--
-- Create foreign key [FK_booktitle] on table [dbo].[bookType]
--
PRINT (N'Create foreign key [FK_booktitle] on table [dbo].[bookType]')
GO
ALTER TABLE dbo.bookType
ADD CONSTRAINT FK_booktitle FOREIGN KEY (bookcover) REFERENCES dbo.CoverType (CoverTypeId)
GO

--
-- Create foreign key [FK_booktitle_author_authorId] on table [dbo].[bookType]
--
PRINT (N'Create foreign key [FK_booktitle_author_authorId] on table [dbo].[bookType]')
GO
ALTER TABLE dbo.bookType
ADD CONSTRAINT FK_booktitle_author_authorId FOREIGN KEY (authorid) REFERENCES dbo.author (authorId)
GO

--
-- Create foreign key [FK_booktitle_condition_conditionid] on table [dbo].[bookType]
--
PRINT (N'Create foreign key [FK_booktitle_condition_conditionid] on table [dbo].[bookType]')

Download 0,62 Mb.

Do'stlaringiz bilan baham:
  1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©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