0% found this document useful (0 votes)
53 views

DBMS

1. The document discusses database normalization including 1NF, 2NF, 3NF, BCNF, and normalization forms up to 5NF. 2. It covers functional dependencies and different types including full functional, partial, transitive, and non-trivial dependencies. 3. The concepts of lossless and lossy decomposition are explained in regards to decomposing relations into smaller relations while preserving dependencies.

Uploaded by

Sankalp rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

DBMS

1. The document discusses database normalization including 1NF, 2NF, 3NF, BCNF, and normalization forms up to 5NF. 2. It covers functional dependencies and different types including full functional, partial, transitive, and non-trivial dependencies. 3. The concepts of lossless and lossy decomposition are explained in regards to decomposing relations into smaller relations while preserving dependencies.

Uploaded by

Sankalp rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

D.

8-m:S lASSMALe
Date
Page

ufunc
Unit-3 1 fun tionod DepemdnC Pahal fund
2 1NE 2NE3NF and BCNF
3 Lossles De Co mositiem
A Nox malizaen
5. MuutHualuud Debemdon(muD)Toin Dep (so
6ranSitue daptn.dend 4nt5nf
Urit-4 TyomSackien 3 Sesiali zcbil
2 AID 4 ConEica|vie
S Schedulo ecoNeaablay Cas.cadalessthict
6. Precodemca haph
1 Log-based ecove Shadow Pa9ing
eheck Poinei ng
16 L09le 12 Distaibuded Database
L
De.adlocK t3. Daa hagmendati m
1 4 COnCuamoncy Condal
15 Direcs S

Ui-5 2 Phase locKing


2 Gaph based locking Protocs
3 (Oncuane todnSacdie0
4 Phantom Phenomema
5 Muti pla (anamulai
Date
Poge
Unit 3

associatie
is am
FUnchonol Dependen
betoeom two atrnbudes s h o Samo toble (elai ion
XY Staty hat wouplez ag09 n h
valuuu in adthbude Xthoy must adso a g n
m valu in
ottri bude y '
B On ena Uu9L Valu

whith the folowi ng is


- RA heCortct
22 (a) AB Cc) Be AX
4 a) AC B
5 33
in
T Can hawe Sam Uoun RHS but Canhot
houe Sam valuu LHSs
CAassitcotiom ED's
iviel Fd =Funchien dabendano Y is
viol And ory YCiY issubset aX
Non- ial F: =THhoho is acHoat h adthbue
in R:uS that is hat past 6ta LHS
AB BC) -Non ivia
LHS RAS

3FLl Cuntional Debendorn dy iuen R ond FD


Ythen Y is fully ncional
dabendot en
th0 ho2uhesu 2 is paapen Subset
Such tha z Y
AB AC N o t full fontiond
De pende
Pahial Dependo/n Gaven a alation R .
f D f dlned On tho odtibudey oROnd K a
a Candicdat Key s a
Pro pen Subset
K Ond X A thon A s Passial dapendss on K
clASSMAte
Date
Page

RCABCD)
CK AB Patia Dep ent
Fquuvalant FDe
6-1-ChecK foX
ACAC4D EAD E HS
f
1ADC E A3
Fs in 6 ulation
neckingor
rs- f A
A DC
E E AD H
AAC
selodian
Uhec for Ds ih E
NOW E AD_
A C AC 0
AC ACD E EADC
A AD
E H

Fquuvalent
heani y Not
Reloien R Cam be decompaSed
DeCombositjon = A
3 a o l a i m Schemes
o
Callackien a
into a
Aha namalies in onginal
euminad Som
relath en B
is a Aalation and has
= Let R
LoSelou decomposi-ion 8
R I h e decompos ian
Set a F D s
E Ove
s loselegs wyt E R R= R
indoR Ond R Nahul jo in

RABD),f : 1 A B , A C
b3
RLABE) B (A) LaSs les an Lossy 2
2 Xa vsse
LHSNaR taathi em m a
A Tada olpha ho toh
RHS mei eK

-opha daal d0
an Ona Ro w Cotoains álpha
R2
fuuy them t Loelas DeCon

LoSsle Decompo si tHom

OTel ChedK ommam LHS m R\adion


Poge

FOS=
Canenical
cove%
FE ABC, CA
A8
BC B
BC
ini mal EELA
A, B.CD tha set E Ds
oEDs
-1 R he set
Minimi 2
AGc3 Essenial
Redundant
A BC
A
A AGC
A B J Redundont
A ABC
Chetk CAo sae A B(Delue)
A A B
A 8 A
but do n Redundoart
A 8
t RHS A B8
otkor
AB (Ramove ths alas
CHK om uon
AB
atlons ABt AB

Now Ramad r n
A anove) A A BC

A B
fAnal
A 8 A
&-2 R AB CDeJF=ABC CDE B 0
A
E A Minimize9
ts - A BC Esseid CO Esseiol
A A
D ssesic eA Essaial

wo olo haue
E A
A B o A9 D
B D A C J
uni mal A B

A E
D

A
alasSMAte
Date
Page

Narmali 20ion = POC o 'organizing data in


th dotabase
) - Miize adyndono m tlodtem
(Ti) - Di vi des Ba table in Smald trbu

1NF Z T h vauos in ha domaun ef each


athibut i ulodion a ado mic OR
Only on ualuu is asociated with each, adtvibut
enoe-hami cantac
A
enoe hamt contnc
1
A 9 ,993 A 99
199
B {199,too3
2 foo

ind Candidat KeH in a Relakio


Q-RABC D) ind all Candida KeuA Relahen R
LosK fox atkmbut hich is ho
ecA P e s e in RHS
AD 6
n cAosus t h a o Cosu
CD B
h n A nd
Combinaie h o t Clos w
ACD

c No

Act ACD B
CK
Bc BAD
C K
CO CD BA
Concah l untienel bep'
NE= Based on dihbL
en-pimt
aaen R' is in 2NE C e
funtionad Debendert h Key R
RNon
is uly Pat
OR dutenmi ha ba by
NO Primg odttibute S heudd
Candidok Ka
Non- Pyima Atibuk = a ta
Pima Aibu -
wic
Pat CK ( D)
u Pan o CK (A)
A B No Paahol fD
RCABCd)
SSMALE
Date
Page

-1- (A Bco)EAB- 8 D find hd Normal


ind
An- AG ABCD Ck LcK A6J
B' 8D i)-Pima AB
8c 6c D Non Pma =CD

AB C 2 2N F
G D X 2 . NF

So Ôvesnall
&-2 RCABC) F A8 8
-A C.K A ABC
CKA1
Psim attibutt =A
No n- Pyihs BC

2NF A B 2NF
s in 2N F
3 RLABCD)F AB C A D
Ay- A6 ABC KE AB
Pm AB
Non- Pyimi C D
N
A
2N F
&CABC R2 (AD)
A-B
A D
&4 RABCDe) F:iAB SC A D B ES
AB ABCOE CK AB)
Pama= AB
Non- P i a C DE
AB 2NF R (A 8 c)
A D
X2 NE R2 A D)
2 NF R3 B E)
elASSMAte
Date
NE No Page
3NE A Sulokien shumahansitve Dependam
CA) is in 3NE
Solsies 2NF Omd
nm: Pim odhibute e
Ris dnSitivel
A eohen
deende. 9n Ke
OR is in 3NE E D - 9 Sais
dny n llOuing Conditim
i s is atdvial FDieyCx SUbse A A
- K y than
AD LatAD supo K
is a sube Key nen Ap E
u Let
A Xy tham ) is a pime ctt
AAhbue Preet in N bud rat în X
y- =D A Ss a
3N F
-1RLABC) F: A 8 iB) R in which Nf.
K = A ABC, 1eK=A Pime =A
2d Cond
A 2e 3 N.F NOn-Pima= B
c 3 NF
B
C C ne a Pad P a i me, ott

Nov cheCK or2-NE


A B V2: N In NF bud e
3NF
2N F
3NF

-2-RLA BC DES AB 6 D O e ) Decompose


AB AB CDE CK= AB)
AB 3NF Pme AB
Non i ma=CoE
X3N F
3NF

De copse=

E
R3 (DE) D

3RCABc)F AB e C A which Normal f o m


eK- AB, BC
et = B AB= A BC
BC BCA
3NFF RAaton is in INF2NA
C A N-F P
Data
Page

- Creatt Relatio nal Schema


psimay Key AG Such
B(A.B.cDwi-h
ha Ris in 2NE
b
hat n 3NE E p lain wh
RCABcD) , Key AB

In 3 N
DI
Not in 3NF
bud m 2N
BCNF Eenslem NE Om Stdck ams
A selation is n BcNE
COnd holds - _otleast_Dni s th
U Y s ataivia E D
X _ em is a Supon Mey
RCABC 1aBC CASRin 3NF DcNE
A = ABC Bc* BCA =

AG C
3N. F and BCNF Doth
A 3NFbut a
im BCNf
A-C APant a CK S Psimo
atkaibu
Eve BCNE is_a 3NR but via-yensc
is
O-2-
RAGCDEFaHIT) Decompose ro BcNE
F IA C A DE f P GH 0T
ABt = ABC DEFGHII CK= AB
Padm =AB
Non Patma = e dEFHS
AB C BcNF
R2 (DE FGAHTs)
AB
clASSMALe
Unit 4 Date
Page

Transaction Logical u t a Databae


databaa
bo Cong hat indude ene h maR
accesoehaions li K Tnsesrien, Dela tiamn
Seiauzabili E Pxopanty ansactien
3 State
data in Consis+e
wuhich is uSed to eap
executien sanSackioe
ci) To ContAl COncLeat
h odatabase is Consist+d
) - To nsuw that
Swopping fosibla
14ConHict Senializabili ty
yES
ReadtA) ReadA
wHte A on-ficti
Read(A)

wiie A) Read (A)

Schedulo S Gnd S aa
Senializability
Niew
vie equi alo ardS2
T b e a d ai n i i a
vau daa iRmA in S
o) in
dasa l e m A witttm by
2 reads valun e
Kiy
S and ta S2

Ti b waitts Rnal v alua


honSactiors ane eaCtimg
Schadudl Uhem Seenol
5 vasioug
eechien o
Conusamddy thm the ordaa a
Scha.duis
instuciong is Kroun ag
Recoveynobla schaduu
Date
Poge

Log
Log Bas ed coven tis a
Sequana oLo
CANds, Keps a Src 2c6d
a l updae a t
in the dodabase adiNte
la).
Tistaut> a_ Transaien Ti ba Stassed
(b), <TA jVN =
Ce) Ti Commut = Transacken has Comttes
aoted
is donu ensuno amidta
Two echnigos to maldtin okomiEidtq_
Delnd database modi cation mmedia
Tha Chenges aar haB applied Tho Changscu applied
mmedlasely tha database diecy ts daabase
2he lo e Contai alu ha Chcngas2log e
Cordra h hoth
hat ano to applied on database Ad a wal eu nd
3Concalp bidng Ond Cachirg 3.Shadous Paging
4maadisaduaaga s SquiSes a

CheckPoiringThe hecKPoind i s a ye omechansin


uhsns all tte reuious loga ant moved ham th
ssem and Pentmane ndi stokd tn storaga disK
DeadlocK= A de adbck is a situotoa in uhich
wo es masu ram Sadhons a
uatng ats.
olaaaa h \oc held by othen tansacHON
Mhod to handlt deadlockK=
t.
DeoddoK Preverdion Pmtocal-
Systm ul hu
YIndeocddock.
a Pre- declanoon metho
bPotial ordeing mahe d
imas tam mod
clasSMAte
Date
Page

2Deaddock DekcHan Wot fpr n p h


de peadlock ocn
w t for lacK CRa)
Recov ey aom deadlocKE
Seladion a uicim
b .Rolback.

C Stouain
A Deadlotk awoidanaa
bAutocommut thansacien_
a Seslod acc
C Ordeacd ubdates d. Rolling back Con Bicting an
noadud
By ooCaHng he locksuheai
Preuendian schemu
schem!
2 wound- uaut
wait -die schem
ondiion for deadlo ck
Neca
3 No Pre-enpion
1 Mutual etcLusien
Cigulan wa
2 old and wat
se =1.Consis+ colla kien e sites
Digtributd Databa
hotuOK
Commui Cotia Ho
tsgethoa oough a
Connecsed
no 2.Het

Ouun oCa dotrbas


Relicokien
2 ach sie hos 18
Acve local and Aobal tson Scction
Pss
3 DDBMS Cam handls boh
froqme nation =1Decompnsitian e ulation irdo
t3 Dacta
diuida
a Singls quL ido
rog mends 2 * Pexmlsts
set udblo quoy Ma Con eoute Panalla)
a
9nfraqmonds
IVerdica fr Hoi2onz fa
No to oCou Dept
Nam Ro Couru e pà|

Subsat o t s i budes
Fo 3
ondohn a
aioa a a ud
Psa k 3 b rid
Dity eal(uwa
asSMAte
Data
Poge

1+ on (unumty Contal- t is a Pocay t


het dda is updattd comey
Con CUUOnd
An
uhan multibl,
hamsochons Qo LAUEV
e0Cded in DBMs.
Avartag =() waiting hm T ) Raponse tin
C Roca uilizatian T Celpi.cienc
NEed o
cCESimutanas RCution a tionsal
Ov a shad daabo Can Ctatt Seeal
doka intanutOnd Consiskmay roblem
3 Problemd au LOSt updatR_ Uncommded
daBa inconsis tent otieNals
Conict wR Rwwu seilizahillty o
ranSa chord
Roading uncommited dota(WR Conicd Ditty hed
A-5 T2
A A+I RCA
wA
RA) 6
bot AB
wB)
Aba
G-soUnopearab Raad (Rw Con tict)
A 10 T T2

RCA lo
A-At S wlA)
AA A5
3 LoS+ ubda W Con i cr)
Dire ca SystemELlis ting of in fomatian aba
Soma cas object Such as Penson
2 USed And intasmatian abouct a
Shaci Aicobjed
clasSMALe
URt5 Date
Page

Lock H lock is a vaiable associodtd uudth each data

Hem that indicates whuthen tad s wye obanotion


is abplied. Locking s a machamism to ensus
data itgaity uhile adowing matimum ConCuoaant
acceto dota Avoldlashas in
Avoid doadlock Condu iohs 2 Coptuing thaeIOuaa
Read openation Shoed locK
S a t up dat Delate
2 dusive lockOnu omA

Requno ba:th loc and unlocK


= 2 - Phose locking (22P) =
beingdone n two Phaas
Phoja
S h i i n n l g Phasa
n o w i n g P ha^

d New o cKg on ikmy L o K o new lock Can b2


Cam ee ac t d INT acauHA

h2 L PotCa Em torces
Seuauzability but ma dLc
Releo-
Cen ome do to lotairg a o
Lo M Un hRcoadaly
-Holding
Pemolk tD 0thaa thansaedon
(-Lociking to0 easly ii)-
baanet
Vouaios S a i e 2 PL e AcquR ol lock
u a a au ock alhen e Comm
Staas Od
AVoid Cascading ollbatK Deadlock Pre
untiILCom mud
2 S t c 2PL= Eiclusive locK Comt a eloaad
a y OCC Deadlodk
Auoid Coscadirq bol ba cK
v H Con uk
3 RauDUA 2PL= Shaud EAduSue Cant ba eleaaA

y Hapa n Cojcading Shuduula May OC Deodock


T
A A2A) AUotk opunak1 m pRada
,A) (A
A-AO A AL2
w2(a- Umock OpcaclioH
A() UatA
8)
B)
B Btlo we)
elassmate
Date
Poge
Con Pie
2 Goaph- Based lockig Po tocel = Ensu Seiali
2 at om deadock
3Onocking may
mo ocCu ealuen \h tho qaah bay
ocking Sys tm han an 2 PL
4 Shoe uautng tima inCtae n Conuaency
NoNo RslbacS aquistd
6 Or dus\ve loa ana considinad
Tho Ayst ocK em T Con ba n an data iem bu
a data a Cam n a loced n Tiry ha
Poondd is cu9ant lo CKed ba T
Timi Stamp Based Paotoco

You might also like