0 ratings 0% found this document useful (0 votes) 35 views 39 pages Database Notes
The document discusses various aspects of database management systems, including data abstraction levels, relational database concepts, and SQL operations. It covers topics such as schema definitions, data manipulation languages, and the importance of keys in database design. Additionally, it provides examples of SQL statements and relational algebra operations to illustrate these concepts.
AI-enhanced title and description
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Carousel Previous Carousel Next
Save database notes For Later Nea es
—_ DerBrse Maveoenaur Srey
Monegenent. Syston is= 1) Neatectin of taler-vclated data,
7 )N set of (oograrms to mange Whe aceres and at
“pb tek ay of data,
—_—fltbles = Relations] Jd
_— i be) . ee
| Dhysteat Level
| Cchitechure of Datalboge Sytem)
7 Level of Abstraction —
Newest, level of absbacttonts physical Lerel
1
Ilidhest level of abjeactfon fs view level
—_Labstaaction fs bastelly hiding of data. | Vigkemthetabibatsailenertierdekls |
Vhystal lovel tndepindence 1 acfers tho the abfty of DAMS Why virine oF
wiloh Can change the physteal witout affecting legit loel.
@ scanned with OKEN Scanner| Scena & Tstare-
—__» | Scheiar- The local soucbwe of he. database. |
Tate The atu Conknt of the database ct a. fata otek in¥e thre,
Eximple-| Relation —y Shudat —_ |
I a
Schema Sbiclnt id Fist_nane _last-nane Sait Gnas
Anstante-7 Jetkemnlgi {6 Tekan Stag H e
H
8 Daa manipulate | LenguageCom)~ Language Soe ace aripuletig he
eae Weed by the gpenprele ee ig andes up
= DML algo ne
Mbeki gatas Ses nope dan gel Sac
Kisaa of a delice cde withotbs ates stident_td Aleck
tr, towse Should ye wittlen’ is follows ~ me
\sdent (std. Boat ada using
{Example -
| srtor
Name oe Coaumb_no.
——__ |] ters beet Lance .
@ scanned with OKEN Scanner|SGL Statements - oe
= CRETE TABLE CustomerAable
| ra
Custoner- nome. Vorc har (20),
Customer. sleet Vorchor 20),
aaa Astomer- itty Vorchac bo),
REATE TELE Account Table _
| CBecourt-number varchar (20),
Balance it);
+ lopfeel Raion Dect on the database schema . Database design _
_Fochnstance ‘Busnes dectsfon- What altetbutes shuld We record fn tho
| database? + i
Computer Science derision - What aclatten schemas should we hare)
i huge Tega Detag on ea of He data,
a Eel —Relationdhy Mol
Modéts an entrispiiie as a cplletienlOhentitiessantielatonships
a a thing ng oo Object, tnsthe enterpice thabis distingufshable don
other *ecks.
hfinhip- on asgpclatlon between diferent attaibutes.
* |Dabtbaie Users =
pad Users are dlilrentiatedl by the way they Expect to fnvtered Witt vbemret wilt,
@ scanned with OKEN Scanner7 | Danke Use
ei a an & -
; [Naive Ver Sopiictel cs, Spell User Nylon Pogeamerens
scquivedoens ov ole nyt fon, Clee who do er| (Mofle sho design the, a4
Foinkeeg ct with dnc fgets YOLOVME HEY nendtfood || dhe notre Usews ute, &
eye Aeowgh DML coy.
fare the Aataboie [dain ressing,
I Databaie Mua See EEE eet
‘Coordinates allthe actiites of the database system
Mainveeponstbtties— Scheaa defittion
ph 7 Spactlyog okepaty constants
fii Lfason th uses —_____
x swore andaccess method deffnitin
pois feet we torte
= Shere an fu tsablon mod’ eaklee
|
iPockekechne of database bared ‘ay Valoos >
‘ued \ T [user
Gla on aod a
Teo-ter orthtlecture Thoce -tier archHectare:
a “4
@ scanned with OKEN Scanner|
| vows = tuples =reroWds eee
- : _anienimnionien fos each ablabuae f, Caied Mbp P no
altibule, ae
+ The spectavivaluannall? (so mamnbow of eae Aarhatee, Tncltem ted
Uhat the valite ts lenown,
— NAPs PBC anc formant che Ta sereRqAOHINRY
Relations are unordescd’
7 Wes OF Keys : eo IIA =I)
1. Superkes- Set of attributes with te help of sich econ eentip
Tek @ tune 7 iD Taelaeeaeal slong |
@ 1
© To ,Aame
2. Candidate bey The, sek of attebtes with Ue hele of which we.
Can fdedbG the tuples uniquely, Zn other words, candidate key fs
7
esl be
k-"@name
| @ io
7
3. hs ~ Seb_of attatces. with the help of bith we con Ienihy ie
byes unquele Tey ore Jed
: Pk Oname or Lv
| :
4 leat key- These ave the s5Candiclate keys not selected as the prinaey
Ms
i fongatic tag Sob of attributes withthe help of which we can tdeatity
—_ Hagoles te ‘ch Consists of more Laan gne qtabute .
ample- me, LD),
@ scanned with OKEN Scannercleplnane_| Salary
“ane,
Fiastein Phys “% “16000
wh finnte 4o000
LUSaid 11Mopy » | 60000
katz Cong Se 16000
kin Flee « 5 80000 -
Gia: Bilan, p.000 nel:
Sikosen Con 65000 _| 7
Califo | es | [62000 | E
badt | tone | $2000 [2
Mozar Masse 40009
Gold Physics $7000
Shag Fhince | 8000 |
Stolp, Phusis |» 500
( _fe-@ia
OId Name ta dy An
I Ou Depb-nvare
O74, Colany
Ck-@gid 7
Aame dept name ‘ &
Foseign Key HL that otibute whith ov Renskegmatatitet
4
@ scanned with OKEN Scannerae Tgortaat 5 elnssoate,
fe 2 ae
}—Nowme__}dlogl. name __| solany | wi a
Hosen, | Piggies |. 4160 '
lwo Hoance , Gor. a
EL sata Histo 60K
_ Kate Coop Set 25k @) Tastoctor Table
Kim Fle Tg, gok = oo
eel Gnu Boley Dre _
| Srintern | Gompf 6g tiny 2s
Calitet Hon | 62x | t ‘ 7
brand Com Si | 12k
Mozart Muste Yor 7
Gold Aysics | 1 Bate]
ssn siagh France |“ 0k
dept nome butlding budget
Comp.Set Talo! | \oo000
Biolog “hte 4000.0 © Department: Table
‘Woon te Eng Taylor 85000
Must Racard S000
ae fatorer= | 120000
Histon Rifoter 50000
Phayee 7 witson F000
e fot ~ A sule ree tert
Conus natalie tanelbee eS NPARE oxunigiee
S
o
eran
Exargle - deptname ha fas
fas eo
relbencing epnitiment.
@ scanned with OKEN ScannerShoasc ope select (0) aes
clasemnte,
|ReLattonal Npgbon - i |
1D. Qrovectinnt Longuye Consisting of a. set of wpenations “tnab tae one,
Lor two aclations as input: and produce. anew sclation as tele seus
eck(TT) eae
|_Unjon (UW) z Sesesaseee SESE ee gee aio
Set diffsence(—=)_ ;
| Cartesan product (x)
|| Xname (p)
____ | SebereGor) — works 0-the B68 _—__———_—_____
eae “Te ach thanoss uhich Satis the ghen Condit om the fagut ele¥en,
a
> TF torget >elabton)
yor Predieate e cok
Foe cxomlel! Cfasbuctor) Seecree
Aept_nome=" Phystes™ ~ Feom fastuctor
— Relobioacl. algo mn WHERE Aepkanove = Pry oe
SeLect y
Ciosbuctos) Rom tosbctoe
Sa boy 7 42000 luHleRe Seley 7 too
4
@ scanned with OKEN Scanner| wD A __thesonate
| om oy =
NOt aS
Ques Wate a veLationnl algebon qMery bo Bod tafoeeation aboull aU the Spteuctor
Ancloaging do phy HO department,
AtPl name = "Physica"
0
( bostrcdor)
ws “ite arelatamd. algtton ques 40 find the fntoemation shout ct the
_ hshnuctors belonging to phy depbe ma salary fresber Mon
em
i hd a cca ee
: 7 Ontpub Ore )eno-n3
_o Oe Gasbudoe)) feqtalent guectes
pa oee nana a
x AEC —voek on the Céboumns»
|
rT Cearget relation)
SE eae
Que WARRQ-to Alad-he name, Za, dept-nane ofall dre fstuctors droothe,
_fnsbucter tale i
L Chsbudpe). 3
‘Tdjname ept-name
Sues led he ames of aU the Sastoucbors Toon Comp. Sa. dept Waring salary
Qreaec shan 72x fromske instructor 2€lation.
Ta, CF depenane OY SC.” Realéry F200 — SHYT)
rete
@ scanned with OKEN Scanner™~!
chesnut,
—
——
He a
| Compoition of Relational cprentions=
| Tre result of a relational ~algelan opernttoe fs rela ton md Herefrce of
[geben gpevations Can be Composed Lojetyer feto & Pele
|2clatinal -a
[algebra expreestno, ag seem on the last fasten ce
“Touhes.— a fable
ir — —
a | 2ort_| rn
C$ ~3) _ Spring | 2018 =e
— 4 L ak 2or_|
- fl2i21 2o1e -
Log
207
| 4556 O 208
5565 (S-lo) bes] Sons 2019 7
{965 J Gs-39 1 Spe) 018
| 8 [50-101 Lo | Somme [2014 | —
766 I 850-30) LT Summee og. |
|] $382) [ CS-190 1 Spring ohn
fe [cto 2 Spoing 201%
Io3te1 | C5319 7 me | 30
[itz | EF) j vo | aly
pig | Lor,
@ scanned with OKEN ScannerSo, a cantetion preluct detwenn Snstructer bale and teaches able
Kegon hy Os Mls so
i 2
piAp Alia tas] ts |
a el | bs | by
\_|4 a bs bes
|| Jao ap {a4 ba hy
ap fan be by
oy fom | ba} by
an On bs be .
Snsbutoe x dnble.
: foshyctoatd] Dame enone | salary | Jeadws. Z| coursed | sec id] seared ye
© oro |Setason | Comps 65008 | rior | os-o1 fr | rou foes
VoVO1 |Stofuson | _tomnp-ser-' | 65000 | foro! | 2-315 1 Spreeg bag
lovol ivan | Comps: 65000 | Jolol (5-343 | Fal |2012
lolol SSrkavn |. Comp scr | 65000 | farain ~{F e209 — |b [Sie boy
Jorol Siriasen | Come. cop | 65000 | isi |mv-197 |] | reg fooe.
Ioio1__biton | Gomes, [64000 [92209 [fv [ey bo
ts of the Carkesin prduche ae oot noled just wie Ui eranple as howtre
(Cartesian product vill be represented
Cinsbuctos x eiches).
Ingo ctor: ZA = Leaches TA \
Seek ty Carlesfan freduck 2 Jon
So the combinabon of select(o) anc Cacton product fs comed as Jot
@ scanned with OKEN Scanner4 Join
4
States
| \oyo)
Jovol
iro}
Nola)
1518)
x io A so-lol
Gide | Biggs |_| bbe | | Bioiol | ||
Gick
ay Then 2a coustetd |
6», 1010) Go
Sobicen | Cag Su _ | Novon | oat
Goin | COM hae | loro | G-30
las Fiore {20k | pa | zon
muna
Mom | Mucic [tor | 1515 |
Fin | Physts | se | 222% filtyion
Laid thi bow | 22813 | Misusl |
Katz | Corpsa | 76 4545) C101
Kate Copter | 95" | 18565, G-3t
Al nove dep hnane
solomon] CONE St
[ae _|_ 2696 | Sto-21
comps: | 92K 83g21 | Gs-190
| mt | Comps. oe _| Sp | Glo
Sroodt | Gon. ok _| 8362) | G-319
Kion Elec gok | 18375 | Be-h
‘Toi - Allows 10 combine a selech operatin ond a (Arleon-proly
______Operatinn Into single ogembbn
Thus Cingbuctorx-teaches)
ie hector. fal = ackes.td
Can be waitin 4,
[Snstrurkor 94 teach
i Tntuctos 7d = eachesstd ‘ =
@ scanned with OKEN Scannerte condita Rr unton operation ¢ ts ome SS Rreeseeton“e port
| gad set affevenie. Dis )
Aathle land table 2apey shoud Blow the fillovine sales -
—wTable Lanet Table > shld have de same numer of Galles,
' 2 Tek Cocap og rbbibntes Should hers onactching Aonaios. ae]
‘|
+ + Tn onter ‘long unlon.onany table sxchos
‘ges “Woah in fed all Couses a lobe fall 2619 semester lor in te _ z|
i
| _ Spring 2018 semester, or in bi pom the beaches table. a
| _ “ (tad
- laches) U G “eneslees “sphy” Ayoee ce)
o “ru 'N yeae= 201%
))@uree ta oer ayo
(Ques WARE to vad i a af alte: courses a dang torka beta he lanes
Land gring WI semesters, fron the tides able .
Tr U6srnstee eh yor'2012" ore NY (Cece = “sp “ Nye =e y
Jues__|WAKAG, fain He Will 201 senator butak a
: ig sete leis
Te _|[(Ceenester rau“ hyear "2000" ee "\= ((TReester se spih*Ayere = “roe
Creches? J
3 Sebel Mlows to fad uples that ove.tn telation but are not
anobes,
@ scanned with OKEN Scanneri
|
: toate, gl fit ot 6 a
N tsdemaeopmste- We use Uh foe assigning forts ofa ell
(lgeton. expressions to dompoveny vanables, i:
WARAQ 4 Lind He Tnsbucloes fore, types and custe poet
a.
Cirstouctor) )
1 Physkes — 97, Thame leanne 8)
|
Music — Trame (eptnames * Musics CAE)
| Phases U Muse
A of vel Zoas b he
0.nam We _Con Use or 3 denome Opearine Pie oi
cna
{xe) mest
“To fad. fefbemsioe chou: courses yah ly labructoes fo te Bi
dlepactinent nth salary Guenter bran. FOp00
Chostouctos)
dept name = “Psi” “salay A000
Caepe-naet "Alysia (Galary 28000 RSE)
give toe same result 00 a
jo il ay ge
@ scanned with OKEN Scannera
qe _ find § fo{oomelfoa qhout Coysses 4a ‘inctuctoss fo the.
: if! ysis eQuiclment. Bom Sostuctor and "edhe table,
| fotraco, Lee ta.)
Sethian ‘dz seachea td
a ee heathe, ee
ROE NRE Wag" | {nstrueloegd = toxches ian ion poe
= Entity -class
Fan
| colos.
b. Bsandl
3.No- of blades
Type ot tastalloton
F Sefol ‘um
Brand) (pot bud S
ae Ge) i A yfte-ot-festatletib0)
Seal.) —| E
ia :
Sect No | Colae | Beondl a Ly Fea al icin
\
2.
Se
Ma
5.
@ scanned with OKEN Scannerie
| Seu |
| ola
|| oS
N
XW |Enbiy = Lt is an object tat erishs and & Antic
ich wale. .
- Yak my got Sct of entsiies of Ke same ee Moat shore the —
z ‘ Rectangles Kpreser
ute} Enbly sets os,
lenis sented + Pitbsoubss Listect na %
me Underline fodtabes Pk *
a Ne
[ 2 Gere) Galanpy
|
Titeouctes |
Ht |
i [ekidect
i
2 1 _| Reladinship- Tt ts an assodiatfon Among several emtiies .
a D Relationship cek- Beis a set of au Lhe ae i:
Igek of emtttes.
Relationship. Sels with fbbiaces
{ “Taatel
[ostauctoe Tame Shy
2D —_ dissoe, mD
} Name ane.
Salary dob cre
ad
@ scanned with OKEN Scanner|
¢ Bores- The Labels Course it and Pre Jd oe ed aces
Course fd a
A The dewee of aselationshipset refers to the numbers of entity sets
_—Parblpating tral relationship sels
4 TPs oF Altstbutes /Gnglex Mibsibukes 7 :
__ 4b 8a | Je eat op gS
Bee abbsfbybe~ ID" gender (Connot be cided 2nko smaller Pints)
(oogeste abide Nome
Le On wae of values ~ ngle_and_Multicese
ingle —onlyy one ealue prexonte #20
IMubalyeY mose Yon Value > phone number
Ly [Derived attshute hich is oblshed fom omlarateibute. E- DOB
—_fhueaththite) and Pye ts (Derhed atthe),
fnstuctoe
Tp as afr Key
| nome cher stanpte Compost
Fest came. sfogle
Fade intl
oo
laddeess be Compomte fs “
| if derek, FPacse t
Steet number
| 'skegle
eat
ci
| Sate pastel
ine serra
dete of Vink
linge Cieuatrat ey
@ scanned with OKEN Scanner}|
La
ete
—
a
cag fats 7 ——__
Comune? Congtraa ‘ch anobiee entity Canbe ag.
‘i
{ catibies 40 whi
Wy
Continaliby
Express toe number 0
via 0 selalionship sel-
one te one
ee lb
|
3]
ee)
By [ bl ]
wi
|
oA one diveched.neans one
[(_ ern —_undfcectedl mas many:
I g dg |
Dl Total and Past ol Cretic(edtioos
[Fokab- Every entity in the entity set poeticipabes wit atlas
Jone nelats ce te
= Some_entises_tnay nob Pardsipate § ny ela biorshi,
fn be sel#bion ship seb rc
—
@ scanned with OKEN Scanner“tudeat
To.
name
_tob.«
t=
eb ciation of ol ghident a qdvisos aC labor ts total.
ite pticipaln of fasbuctor ty adusne fe posit.
4 NoFstion he expressing mose Complex Constentints,
_ — |e Tinstautain
me) L
Name _* > _
salan | | tot cued
2 _Inshyctrs Gan adil 0 06 move Students, A student must have.
[Nadsoe; Cannot howe mult ple adlisrs.
=2| Almac” value of & fodieates:no Leni.
‘Ges Rrofece 71-5. ty
~~ Tnmuctar-y 2-10 |
IShudent_ 7 |=
rope
To
etna,
:
linsbucbow : Stadt
2D 22 Od tor 2] Tp
Name Name
Sala bot cred
@ scanned with OKEN Scanner=r yer
ie
oy 0) ae. |
tob_caedh =
. f saloy |
Ff Weak Eby sets
~ lo a [section |
. | weil | Lag me |
2 _ Seren |
: Loci | . yeas]
[hh ER diayons , 0 wertevendtlyneetmalsrAepttediyfararctoukle
. _ eptargle
: = | Weundled’ae tre Alichinin aos pha weak en Wir esruahe
a dagen nt ‘
o - es ty ly ipa set-tothe
: ident bong ently sot Ys cep adouble dfanay
7 - Hier Key fos Sebion — (oursetd ee semester, eat
——
@ scanned with OKEN ScannerA sample Fok “4 Rela Mowshi? cllagwan
¢ oveatng alt Ike. Cone aught Coolepls
ans \dlepartineat
7 |depkname (6
si bulldin
ioucestd K019> tgese RE tie Hae slot 14
Bee TT Tda, :
q co
Stab_ tre,
end _time
Classen _]
building
om -nuember |
Cpacies
@ scanned with OKEN Scannerie
/)
| lee
}
I
L Functionat Pylon
|| Yy Kalepaodl Gt on,
| dalerminant | Fail
= | Bavoks uy
. Corey Nostt,
I Glee Sane 1
| Green _Walbut
a Hayes Mako |
| Johnson Alona |
| does al
say Pare |
Sint Nie |
I emer fucnam If
Je Wile Nassau | Ptoceton
i Table - The Customer Relation
1
[Funct in Aga ty 7). CuStoener er Ch
2+ Customer name — custemes- street,
| 3 Customer — name — Custoner= Cy
aopeelies of Functional Dependency a:ka, Prmstrongs Povfoms,
@ scanned with OKEN Scanner7]
Te Fuoctional Daypotaniirs
Tal P= Warp iidatal ff Gx
MED Mery fe a taival Foal y 6 a Sublet Of.
Hoey nple, ta the custome relation the FDe
‘Luystomer. street , (us toner. cy? costo ner city ts dando
ih olter words,
wm yt beta ft we
2 Non-teivaL FD — Demy voKangr™y RN'W@E a FUBUEP OF KE”
Ex qustomer-name, Cuslymerstreek p> Customer oF
— fee aa "Aoi rods Uschi constants wih ve the of fe
Fafa neces seal stoner ay 2 ee
Custoente name Custo tee c!
Cushomer- state? Customer =o x
“og es T Nome
L ‘ Ram Prysgfes
a 4 Chepats Sk>
[ 3 nde rene? 1 fudtirgno. name)
4 Sohan Chem abstds no, depl-nane
ft | howto ef I, 0. pane dept!
o i lg 00 ane pe
= 1 (Butldig ns. nane ) (K> (Building No. name) OR
2 Puslaleg vo, dept name ) building No. egb-name.)
@ scanned with OKEN ScannerLn
4, Raval D+
Conte,
| Pine Mbbeibuber and Non ~ rine a ables
[eine atlaitutes - They ore a pact of the Condihete p.,
Non -prine atlailnd-cs—‘h "Gy On ett part of he candidate
— a a
=(A.8,¢,0)
I. kag ¢, D> =
i Aw — (A ep Py :
i
4
“| (astial FD - Tf ay non-prime_abbaiiade fs clepend,
-on|deteomived ya TE ol ie dilate ley en diss
partial FD.
fA -2@-D
AGC
l a Aare t
| Student no. Course do | Course Bae
| | a logo -7>
| 2 C 1500
| | : C4 2000. ~ 1
iy v3 (000 ‘|
| 4 Ci looo
2 (e5 |_... 2600
LCK= (Ghidentoo., course no) | PA Shidentno. ,paurse ne,
: —__NPA- course fee
FD.of this table +: ]
Course no, —7 Course’ fee.
@ scanned with OKEN ScannerR80)
ren b> ¢
| fyte Barb
Aiscoelne ls =f
ne
hence, MR NBC (By the proges My of gee Na Wary )
' d
hove AB will be Ue Canclidate key of He table P(4,6,0)
and 1,8 wl be the pare atbabules LowtiZ C0 be the wn-palee
attahbute,
5, Mutti-value FD- Lf (NERVE and Mlemnd 2” AoW Ae Be rRaRENeTEA
BHRER 2 's a. multivalued functional dependaney.
Fo cacmple Te :
[No | Name =e 7
| ye Tec Saal
| 43 PGR | 18
47 _ | XYZ [gs 7
ys | Aéc 19
G. Tiesihe Fp- it WT ond HOE then MERE ad dectlys
———
| Frwollment We. Name. Gu ding No.
Yo fec 6 Y |
| 43 foe | coe} 2
ty | Mz | Tr |
iL 4s fc | fee 2
@ scanned with OKEN Scanner& Chogeeties of Fs AKA Dnstony Maras
1 ‘ Cots of )
LeL X Yond Z bedhe atliibules fa aclation Rs So te ing
pepeltes of FD, whith always hold fo Aare Knowngs
‘brtctomys Ayioms -
isk ReFlextity >, H Yis q slbset of X, then X—>Y.
(iD. Pagmntanton > HX? Y ahen XZ IZ jrsbrea® Zi aon,
Lavmbube which es augmented,
3 Transit ff X94_and Y->Z then indheetly x -
4. itelbute‘closuse> Seb of attaiiubes which ame ;
Gtatbute X fs called attribute Undine of X, fb ts sepe,,
as ‘x*.
{=
“_Jomns— 2)
7 Is Join _clouse fs used to combine -huo ox move tables 09. basis
theferelatecl coloumn. :
: =
: i Thichims allthe matched values of boththe tables.
ees,
Osdeetd | Aiclowen id | tidDate.
2
losoe 196 09-18
10309 3h} 19% - 9-19
lo3io _ tt 1/996 -09-20
Oxdec Table
@ scanned with OKEN ScannerPoystonce id |_tuslonwrname. | omaclname Go —
\ Mifveds Mario ama
| 2 Ang fina thevtol
{3 Nnlonio Pntooto (Morten.
Cuctomes Table
SE LECT Orders. onder? A, Customer: custorernane, orders orbecdat
FRom orders INNER Jost Cuslomors ON) texetn
Orders. cusomer.fd = customer. customeria ,
SELECT orders. odentd
Customer. Customer—name
Qiders. Oveler—date.
FROM ___Ordlers INNER ToIN lustomers
ON edders. Customer.fd_ = Customer, Gustomer_ta
Te setums GU the value fom the left table [ Orders | and the
matched m_Hairt table er.
JE
Ef }
To Had she customer name ancl onler fd Brom te gicen tables.
SECECT Custy-mecs wistomer—Name
Orders. oxdler—td
From Sev Lert outer Join es
ON Customer, Customer.fd = orders. wsbomertd
@ scanned with OKEN Scanner“Que Te find ovdertd andl ludtiniee name OM
Q >
Oe
LA veluens atlate voles homahe aight dntle 1d mde
_ylues homthe WH table.
— &
__SELECT orders 0 omderid
ec aa Gane aistamecname
FRom ores RIQUTOUTER Jot. Customer
[ON __ Orders. customertd = Customer. cushomee—td
Me |
T+ vekums all the seconds Don, oy He -tatfes when
samatch fo left and sppetalile sco
2
@ scanned with OKEN ScannerRast ia Semester >
AC rere ave 2 ways +o clestin q database +
ER modelit
> Nosmalisaite
Goat of nesmalisation fs to Clininhte the xedunda
Theee are yavious levels of normalitatin , :
LL BNE - 5 oemalise Loom ri
2. UNF = 1" Nonmalised from 7 _
3. GCMF ~ BOE Ye Codd Nomalited four Level oF schndone,
4. 3NF - 3” Nosmalised frm
Se 2NF = 27 Nema fom _
6. INF = I Moca lise fran Vv
=_NFs ae a set of guiddines 40 ensure Yat degn of databace is
free fevr_any fo condstenctes acated ip dota and ts CMicient
— Nis ace als etgatded as no- various foams of no«malts ebfoa
Ns are_alee
<7 | NF
|
file |- Every bable cell should have only a single vale. ;
| OR ;
Tf a selation has multiralued atteibuybes then te glen table ts ot ta
[lve
Hiclent No. | Stident-nome | stuclentb—contact
| Ram 4562, 95e
2 Ram "925 |
3 Swiesh 2284 f
Table - Student
(Tieabore tuble ts not novmalteed
@ scanned with OKEN Scanner_~— Rule = \4, Table should alcady be fo_ INF. ~
- WRelation should not Bntda dm Partfal dependency act
- __nonfieime_attafbuce should be Aependent: on any prgecag C5
: Of we Candidate key
0 T
Student—No |. (ouase No. fe
f ahi. an 1000"
— 2 Cary. = 1300
— | cy 2000
a 4 C3 looo 34"
— 4 C looo =
alae’ 2. C5 2000
_—
@ scanned with OKEN Scanner—_—
Kouene | Course fee Couse—no._| sturfeak-do. |
© 1000 a '
/500 Ca i
2000 cy !
looo 63 '
bln IND cr 4
2000 G 2.
___ Mable |) Table 2)
ABA tables are fy 2-NE Sceieenueseacest
“Tis can_be further incerstbod as follows
1 Tinnstsiee_depeedancy oftues when a non-Key attthsrke depends 90
another non-key atttbdt retire than dicey onthe priory kex
_[Stidectd | None | peptcd | Depten
I {tor Rag ool | csé
(tor Nha Gor |. Ete
103 Kaxan 01 _-
Table =: Stdent dees. [Primary key Scented]
[Thisrable fs not foBNF So the Jem _Causi bid _& Degb-ose
‘Depa fs dependent id which in tum 's Sependeat on
____Bhudent wid Hrecernre Dept-name {5 Transistire Dependent on Studost—
id Anroug h h cept -d
wert 2emovtag Vansitine Depeadtny (TD) dom fing
heb fr lt mannes: gl oe
ai = Deptt Student tet Name |
| Dept. Table Student Table
@ scanned with OKEN Scanner=? Boyce Codd NF
—_o
Lt should a ready befy 3ue
| Every deteemfrant “should be a. candidate o7
KY
=| oo &c-We +b compare: fn D-bable
Course | fnstuctos: Student.
ea
Cousse-fnchuctos doble Student Course table
_|YNF-
Rules IIIA selation should al sea ben Bove,
2. |TE should not vex ote
3. 1D multivalued depend 4s OC( wh fs a le:
multiple =Indegen dant rallies ty another colowmn,
by
@ scanned with OKEN Scanner~ Nyabby s
Must.
Dance
Magic
Shident td —> Course
Student td —> hob:
% Course. ond hobby ate factependent thts tablets okh Yur
2? Grenting Tle § INE decompose fro 2 difleot able,
~ Tetudant td = hob
«> SNF-
et Relation should be io {NE
ts rete ack
ty 7 A collocHon_of 0
Comgleles Gr exetutes 2 task.
‘Al 'B) All or Nothing mains Alon
Read (*) React 6)
f=A- 600 B= 64500
wertelA) waite 2)
—iaie yapoas ditutlons
@ scanned with OKEN ScannerAcwe
Tsoletyon Durnbiltty
nn) I
‘ Aly fenstonry
Le Phomicity> A transaction fs tanatod as a rr Indie uty,
QU Cparekons of transaclne ave Gre cuteol fn bade °F none ofa
oe Execution of @ ‘transaction tn fsolatton suththaty, *
_olber eet ‘s excell Co Concumenty Petes He cong
— 3 [lan aon when salle ansatiny Biybe Ona eating ty,
io 7
| rea Ti tat ether fon belnse T. Th Started, an
ic wil Start exe ution aftee B. foe
ae . =
paket Teansactinn tut
Parti \_ Con
Covent |
| (Adtire J
ee)
Transactions rc fsolaked wih-the help OF locks «
4 Lock
Le,
Shared Lock Exdlu sive lock
Cs) (x)
@ scanned with OKEN ScannerFu F 4.
Ly there are 2
Aronsaction
Vp JTF team action has obstiloed a clnee mode lok (6) on adata than thea
ME Conn eta wt nwt ey
42TH atrawaction (1) his ebstnined an exclusive mode lack (1) On a dita them
Aber transiretion can cad tt and woke on tt
modes Sv with a dain tee nlapn oe Voeredt bya
¥ Locktng otocol= His « common y Conbml. Mehantrn vied in
Database ment: syetm Lo Coondtnate the. access ond madtfteaton of
data ems a Ug '6 donunent: txmsactions.. Lis object is ty pene
29 tomnsa clon. Ht acess the same date items. TE allons
_tEransactioas to aggre and selene Locks on deka thems -bo comwol, ttc
Actess and apply « soeb of she dating or orden,
ith Th
TF Read @) Red _
Read 1A) Wite(@) __
I WJeite (P) Read(®)
| Wate (9 upitele) =
Read(e)_- Read () *
Reed (8) ste (8) 7
wite(A) Read (a
Wwaece) alte (a)
4 |Gitefa foe Conflécting operations =
— Foe aay set Ke be tont licking they must salshy the Lllute attena-
(7) Foy should log cltffeent: tents actions.
(i), ACh sa d bea “ge the same data ttm. 7
(MMIBHest noe of Hem shoulol bo a weite operation
4 ||Schedule- A Schedule ta Collectiin_of beansaction s
@ scanned with OKEN Scanner(Ns-)) | Sefeléoble schedyl > Tt fs aby seal schedule which canbe
how [a ito. Sal le, diacéo: bh
I 4
jpemns
[
[ i
| ! Ain
uA
—
| | wlB)
fee
' :
Schedule (*) ;
=
@ scanned with OKEN ScannerWi)
Win)
Sesfalisable vesion of schedule (1)
(Ns-2), Non-serflisable schedule > Te ei. a safalfeable eputralert,
7 ercfose.
(5-3) Conic selsobitiy WT ensines-the onnenty ord contig of
____rhransaclfors, asus 7
_ Ths 0 pgecly wlthquamenlees Yab-the execution of Contuitre bensacton
Seputralpat bp some sedal-execkian vbtee brorsactars are executed one abc
lanother. i
Tequovides a ine tthe Concysrent ere of trarsaelfars Can lend
ty a Stating where Ye cthn ts the same ast
Ore created shally. a
Gis) (oscadng Rollback schedule > tp asthedule fyuhich the effects ofa
| fot cl M Le Leading 4o a Soes of solbcks,
When a bansackion Ti modifies dota thems ‘and subse ils .a Asi
|chect octues when 0 atten Heat hare al mo
‘dada 4 so oe be. dolled back.
5) \Cascade-less Gollbacke scheduler dIfey are algo Endun'as 'Shict accoveeble
Sched) le. Tey are destmned ty ani f the Cascading eect of sollback.
le_a fat clay only sollbacte ibs om Chango
2 Bache, aM cascade ls:
ond does oot affect any ober tansackin
é hey ele fn aniline by an ‘ as-they geevenb propagation _
Tol tncorcect data caused! by oollbacks’.
@ scanned with OKEN ScannerfF OtiCSY dea
lace
| QE
cf Concumenry Qolocol- Deals with the Coosdination and Mondgen
Contanentattess to. shracd data hy multiple trans aeons mt,
leona tt Fremsactins can aun Conturttly without Causteg dat ,
i : —
2-PL Qwtocol
| Mists War So that
|__ 2 - Phase] cking Protocol.
Grout Shaki
hie Que?
8c bo phase loot Potncal ta widely Used tervunény, Conbot
| fn DBMS tpenuse fs and WiCts_ bebween
_ —bsacdine
| # Te follows aset of rules foracg, fgg ond we aig locks on date 2
: tg te exan an saci, TE ghes, srtelbliy ond gents
|
|
a ¢ ists of2 phages
aoe 1) | Qxpw £ acquisition 5
Ete ty stings aad
eS Lock segues. Gin be. goaked only ff thay don'ts Cause conflicts wlth He
~ pi any ober transaction.
= \CooHicke vill occur when a transaction alzordy holds an exclusive lock
~ # Once alocle {s granted it helds Up-untél the end of the tansacfn:
~~ (A) Iohtnktys phase Lock delese) Aer F el
ands is leg Ha, tenes fibration he acgtsfred all te
- y
__—_@ Thbisphate a baradin aot lcs on Oe 1 ne longoc*
a [SS
@ scanned with OKEN ScannerMasa bons of 2h. Crolocol-r
he
ne 8s alae rr — {1 frotocol Crop fon astral vadation
choy have been ello foto ltlowia Phaws
= wh hi Us San temsadn Alay tay tha 0 H/ pied forks
(ocud ond |e witte)
no locks ae iclarsed fo thts pare. Gor vitor aging).
vt sti» a shaed locles may be aelerged biting Wes pha.
sie locks ax. {toed Unb He ems action comnts oF
aborts,
Mreverts cascade dollbacks.
ght block Okie tamsactas lo
én sti surfer bom Denlocks
ZEnauees yeco-era byl lity.
due to reatved enchustre locks.
fs Sider thanthe “stick 2-PL Q@obocol’
- dts Phaies areas fpllons - :
= 0 tpape> hae ela cyte all locke
mae] (xtad and Jor witte) :
I = no locks ave released Indus Phase
infil Rep» No Locks are relented until He hems action commit, of
bent
‘ocket Recents dleadlarles .
Frevents cascading wUbacks
3 Prckamed fo Intgh Falgyaey nvésvoments Like Boing 6 Saket arintat
| sueben.
Linttntipe Ulster blocking of Oker toansacdian due to 2ekentin ofall
Locke.
*| May lard to Pecfoomane ovesharc andl longer wisibfog. chasos.
v
@ scanned with OKEN Scanner