Sql server® 2012 t-sql fundamentals



Download 10,93 Mb.
Pdf ko'rish
bet44/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   40   41   42   43   44   45   46   47   ...   443
Bog'liq
BookSQL

orderid

productid

PK

PK

orderdate

qty

customerid



companyname

FIGuRE 1-1

  Data model before applying 2NF. 

The second normal form is violated in Figure 1-1 because there are non-key attributes that de-

pend on only part of a candidate key (the primary key, in this example). For example, you can find 

the order date of an order, as well as customerid and companyname, based on the orderid alone. To 

conform to the second normal form, you would need to split your original relation into two relations: 



Orders and OrderDetails (as shown in Figure 1-2). The Orders relation would include the attributes 

orderidorderdatecustomerid, and companyname, with the primary key defined on orderid. The 

OrderDetails relation would include the attributes orderidproductid, and qty, with the primary key 

defined on orderid and productid.

Orders


Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   40   41   42   43   44   45   46   47   ...   443




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