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

Database Management System Notes

1. The document discusses different database models including hierarchical, network, and relational models. 2. The relational model uses entities and relationships between entities to represent data. Entities have attributes and relationships are represented using keys. 3. Weak entities are entities that cannot exist independently and must have a relationship to a strong/parent entity. They are depicted differently in an entity relationship diagram.

Uploaded by

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

Database Management System Notes

1. The document discusses different database models including hierarchical, network, and relational models. 2. The relational model uses entities and relationships between entities to represent data. Entities have attributes and relationships are represented using keys. 3. Weak entities are entities that cannot exist independently and must have a relationship to a strong/parent entity. They are depicted differently in an entity relationship diagram.

Uploaded by

Isha phadatare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

clasSMAte

Date
Page

Sche dulc 4
does not pr eScrue
prescruc (A+8)

KSeriolizability
ConElict Serializability
uiew Serializability

).Disaduantaqc cE Eilc - oricoted


D.Doto rcdundoncy apptOach
2) DiEEicuity andinon SiSterncs
in occcssing data
3)Data isolatioo
9 Totcqtity pr obl em
6) Atomicity
6) cooCuLrcot acccsS
Securits problem.
)Aduartage
D
cf DBMS
Compactness
popcr Eilc
No nccd of laiqe amnount oE
2) spccd
3) Acuracy
49)RcducHon of tedundoncies
Aucid duplication of the
cducc thc tota) dota go cÊfectuey
)Sharing of data amnount
casicr
o SBorage
rcquured
6) Dota inteqrty
Data containcd in
Consisteot dotobas e js accuratc e
10gicaJ
phusioa
Changcs
date chonge the data depe
Anedata Strucur Adding, delectlode
locaHonoF databasc Dew attibute in dcho
Hne storagc deutce ike
magnet
1) Doto SccuLrty
R) Conflict Resolution
cooflict oo 1cquiicmcnk
DBA cSolue thc oppication
OF vOrio us uscL &

(9) Data indcpend ancc


Physical dato ndcpendoncc = AHe
D
DAlou changes. in physicaJ Storagc dcue
o)ithout rcquiinq chongc in conceptucuicuo
uie w Or any Cxterna

D) loqica data iodcpeodane


Tndicate dota Conceptucu Schcma Can be
chanqed wthout affcctiog the existia
CxtcrnaJ Gchema o ang opplication
program 109ica ulew OF doto js USer Uicy
DAiS deel dc cohat ino s kept o how to use l0giceal (ee
q) Disaduontagc Tt Prouide qlobaJ vieLo
oFdat

DDBMs Softuuorc o hordworc cost is bigh


)ceotiaiscd datobasc contto)
3)Setup of DBMS GyStem equite more
knooledc, Skil) %thmc.
4) The complCXits oE thc data bas may
ICGut in poor peormancc
) DìEFercocc
sharingof Date
Page
data
DBMS File proce ssinq Systen
)Mimimum dota rcduo: ) Dota Iedundacy
dancy problem iS cxist.

) Data inconsistency o) Exit


does Dot exist.

3) Accessing datobasc 3) difficwt


G eaSicr

)Secuity of data 4) s Dat qood


is qood
SConCucrent 0cceS S) Not poSsible
Recouery is possible.
6) Data isolatlon problcm 6) Exist
iS not found

Transactioo ke inscrt, ) TronS achion


deletc, uicw 0rc possible are not
nö poSSibl
in datobosc

Q)DBMs Dato base Modcl


)Hicrachia) dotaba Sc model
nHicrachial database model arro ngcS data
in structurc Slmilar to trCe.
There is mao root
) other dato arrongcd under
L) other nodc connctcd to main nodc.
Date
Page

Las chitdrcanodc.
|Anima)
wild

Tcat lionTiger
(S Thi model bclps to rcprcSeot
to mans rclatonship.
6) PaLcot- child tclationsbip
(9Nctwork modc)
extension of hicra chìal msd
) To this modc) data S oqarniSco Mo moe
ikc o qroph.
3) Hauc morc than onc porcot node.
4) Herc MorcIclationShip arc cstablished
S)AccSsinq data is e easicr ond Fast
6) Many-mons datarclationship
D This was mostly oldey uGed doata bose
modd beforc rclationa mode coaS
itoduced

Storc

CUStomer Manag er Galsma)

orderl terms
rclatiG
attubutcS. dcpartmcnt nH
ckssate
into
nome
dcpt
bwlding
qct
bud and ottribute
DatePage
usin9
deSiqn exist
Ex tibute
ualucd attIbute
rcprcscot
Get
2
iotercst atible
key Set
relations
ioto
model rclotcd that
gbject by entitu
to at -multi
repicsented
-
choracteristlcs
obËcct
ccmposite set
cotits Set.
rela
+o
)Rectonqlc
hip of oic toioto
Entity
-rclotions
TDdato
modc
basc
qood
pictoria)
Form
othcr attubuteS.
Deiucd to
ct dcfioc
obje entits js & attibutc
NulL
9)
L)lin
iS an Fom ualucd Componcnts.
modc)instructor
modcl js is and
diuing
mode Salory eotitq cotity
Attributes
quishable Diomon
9)
DifFcrcot
andts nome
Simple Ellipse
S
ID Entity D)Sinalc
by
bip.4)Thi An
3ER A
D) ) ) 2)
Date
Page

attibwde
SDouble cllipSe mutiualucd
dcriucd dttribte
6) Dashcd ellipsc
are undertincd
key attribute ar
primary
Wcak Eotity Set
houc aprimag
doeS Loot
DAo entity Sct docs Wcak cotity Set
kcy js rcfeLCd os eotty Set depend
ExiStence Of cueok entits Set
Stroog
on existence OF
oF Set js fonme
of oeak Set
Ohe pliMory key
primory kcy oF Strong
by
wcak cotity Get by double
) c depict a
Srectang!eeclioc the discriminator oF
) e Undcrloc
entits Sct coth dashcd inc.
coeak (Payment
ate
PaymNt Payma
(amount amouE

10an HIPoyment

Paument no discriminator
locn no- Payment no - Prima key

Speciali zatlon -TOP- down.


Ceeneralizatin Bottom uP Pproach
attribute
Derucd S)
4)Multiwaucd attributc
3)Singlc
uolucd attribute
DSimnplc
)
Lderlucd An
ceocrolizationottributc. for IECompasite
attiibutc TE ioto inStance
Gimplcr Cnhtu The key
atHibut
Geencralízaion. deriucd More t entity
hiqher
leuc) atnbue each on iSon Attributc
ottributes
thao att)bute Called
attrbute
boscd cotHty
plce
lcue Onc Composite
ccqunt cobich attribute
iS on
entity Ualuc iosta Can Comp
nent cobich
eotItics othcr coD
bottom-up cao ncctake diuidcd
Cannctbe
be is
ottabutc be Spiit unique
combine calcl Single
Attrib
Page Date

Bottem-up approach. UCUuc oto lassMAte


isatcd eueyfor
to Compon
a
Fomm &
* Spccialization approach
hiqher
p- docOD
lcuel eottty brokeo doon
TH is to
T+
2) Onc lcuc) cotity
ioto (O LUCr
cotitymay noha uc loc
S) hiqher lcucd
leuel entity
Student|

Ex - Student
Current student

9)Agqreqration rclatien
LAqqrcqration )S prOCesScobco
as
befucco tuo0 entity is trcated
Single cotity

|Centr e KOFFecou r5C

enquir

Uisito

Aduanta qe
easils undcrStone
D) Help
i n physica data base ccaticn
G Can be qeneralizcd Specializcd
4) Con be help in databaSe dcSiqn
alsemate
Data
Page

Disdduantagc.
D Somc amoLuot of ambiq uHeS
)inconsistc0cy
3)8) Sonmetimc diagrams may be
mou leads to
misiniotecptctation
4)Rc)ationa modcl
D Io this modc) data is orqaoiscd in two
Ldimco Slonal toble 1970
o) This mode (wasingtrod u ced by EE coddio
3) This mode js wwidcls uScd dahabasc modc
L)The basic Structuce of data in thc selaton
model iS toblc.
S) AL ofor matioo S Storedio roco OF to ble
6) TobleS are alSO KDOOD aS rclations i
relatioDa model
Rollo Name AddrcS No

D0FEcreocc

HieracbiaJ Network Relationa


)ID this model ) Tt organizc Tt orqanize
data through rcCord through
data s Stort
io hierachia |inks toble

2 Tre Structure dìretcd graph +able.

9) T+ im Plcmcot Mony: mony. anyMay


1: lond 1:n
Date

Page

u)TnserHoo anomaty
exist NO
G)DecleHoo anomaly
exist
PortiaJ
locks data inde Data
peoc datpend indcpend
less flcxi bl. most

Dota Abstraction

D Dato obsttactioo s proccsSoF ind in


unwontcd irc luaot detauIS From
dctauls
thc end USc
DTt hclps to 0chieuioq data iode pendane
Cubicb s ugcd tO enhanccS curitu of
data

le ucls of obst ractioo.


D PhysicaJ or
IotcrnaJ
2)
logicaJ lcuc)
Oror CoccptuaJ lGuc
3)u or Externa
Uiew eve
Uieuw
uiew 2 View 3
109ica leuc
cssMate
Date
Page

PhysicaJ
D TH iSs the lowcst cuc)_of abstractHan
2 T+ dc Eiochow tHhc data is actuculs Stored
3) Tt defi nc data- StructUrc to Storc the
data
)T+ is decidcd bu deuelopcr and clatoba SC
OpplicaHon proq ram MCr hoo to Storc datr
S) Tt js ueryComplcx level to under Sta nd
) logica
D Totcrmediate leueJ
2) T desribc obat data is Storc in datoba
this data
3) What sclaionship exist amonq
complcx thao phy Siccu
It s uscd by dcucloprs data
S)
Ladmiostra tors CDBA)
Cootaun tabics 1clationShlr
6) logica leucl
amoog table atttibute

3)vicu)
TH is highcst lcuel
there are diFFercnt leuel
Jcue uieu
OF uiews ioteracHoo coith usc.
GimpiEles
3) Ttalso uiccoS o mwtipic uicco.
pIodidcmanq
4) T bu_ cu) User
S)T S uS ed by
6 TS lcast Complex
For
USercX Can interact
inter oith SyStem using
bate

X D8ms lanquagc
Dato defination languaqc
DDDL
Qucry long uage
a) DQL Dato
Data maoipuUction
) DML Control
) D e - Dcta
TransacHooContro|
S) TCl
SQL Command
DQL pcL
ODL DML TCL

CREATE JNSERT COMT GEIECT CeRANT


DROP UPDATE Govc Poiot REVOKE
AlTER DELETE Roll BACK
TRUNCATE CALL -Bsaton
10Ck copstraint
Permancn
- ato Committed Changcs orc ret
DD DDL
1)That is uscd to dc Elocdatabasc Schen
3)DDL is Sct of SQ L Comand uscd to
CLCatc, modify dclcte dato basc
Gt ucturc b t not dat

D|CREATE - Crcate database or objcct


teble) D R o P - Dclcteobjcct from databasc.
)ALER Altcr the structure of databau
dl
e et
d oata

f r ot
m obe)

TRUNCATE-Thls is uSed to rcma0Clau


recordS fromn toblc

6 CoMMENT - add Commcot to dato dice


RENAME Tcnamc the objcct existng
In data base
2) D Not auto-commited changeg are o04 Pomao
)Thc SQL commood that deaus oith manip
OF data present in databa se
2) TH includc most oF SqL Statcmcot
3) DCL Gtate mcot orc groupcd oith Dr Stan
TNSERT TnScrt dataioto toblc.
UPDATE updatc existing data within
tablc delete totU
DELETE dclccticcord From table
lock Tablc Contol concurreny
CÂLL Cal|_a PLISa & Ta uA Progrqre

D DG L Statcmcots are to perForming


qucries on data
s componcot of SGL Statemcnt that
2) T+ database.
alloqct tìnq data Erom
3) I+Dclud c SElECT Statemcot
rctriucdota from datobase
SELETCT - To

4)DCL %REUOk E Righ Permi ssion


D Cootaio cRANT
CrRNT- The Command qiucS uSeracceSS
piiuiledqc to databas e
withdra the
REUOkE- This com mand
USer access priuilcdge giuen by using
CeRANT Command
clasSMAte
Date
Page

TCL Control cxecwion Of transaciaa


a
Permanenty Saue
COMnIT -Commits a ttonsocion
RolLBACK - Rollback a ttansacHon ie
CaSe OF eror. C TO undo change)
GauE PoI N T- Set a Gaue point oithin
a tHansactior CTO Saue temPorariy)

*ConGHatnt Toteqriy constrau nt


EID Name Phor
Donauo Constralot
domao must cootao atomic Un
DEucry
Mcans Compo Sitc and mltvaled atri

2) key constraints uoiguencss


tuplc in relation is uoiquc
D Eucry
2)Aclatioohas mlti plc kcys or
chook
Candiatc kcy out o F whi Ch cwe
primay key
8) Nu) ualc arc oot cllocoediD PK
4) Not Null Constraint s part of Key
constraiot

9) Entitå- Joteqrity ConSt raint

No. primany key can take


u) ualue
NO
a) ReferentaJ integrits constraint
1)Cootauo too relatioo table.
refercnc
For eiqo key RL 1S Sad to
t0 Pk R2
ome
ckssAte
column.
DatePage

<toblc~Damc 2!)
tablc_Domc) Uatuc) tablc-nomc2
K
FROM age.
studcotsi
Erom uaiue
nam
table
Disaduant
datatypc,colum
<Uoluc|, CondHoo
Comnand CoDditoo
JUHERE
DSELECT
Commond
From
INTO Aduantage
&
c upDAIE
INSERT UPDALE
3) DELECT
4)
¥SELEcT
SELECT TNSERI
2) Ualueç wbcre DELETE
So
form
edatobas
that quarantced o cotirc
onine uSing
langu
be Nutl qiuen th
cASSHAte dictiooory.
data
as Suntax Can
mayit
oE.
trcatmcot Sub-accesS
Page a bc cotaJog
thecn cobich
Defe
relationa
bein
must Rulc coith treatment Rule
base key
elemcotiS must data
of in
Acccssloqically be lineat
updatin
base
rule handlc
rulc.
dato pimany unform
database description
onine Stored ComprehensiuCupdbe
thc
metadata
onis data
Rulc
8Ioformation Sustematic
foundation a
in Ccuaraotccd
data bc _hauinq
Theidatabasci
Con acessiblc Actiuc
Stored name a ond knocUO
Cataloq
must uicw
uleu
in Structure languaqe
Rule.
Codd
(0)
m
Syste
or Single Systemnatic
ata oFtablc
- value
Database data 8 database
8 the
o d be
2 Eucry 3 Null 4 s 6
Rule fhat The Uscr Rule Rule the
Rule Rule Rule
to a A
Functhonal
depcndoncy
D) (q)
D
Tt The
20that theo Location
Rulc2
IE Gec Rulc
appicationToteqrity
uses
that Rule
Alo Rulc Ldelete
Rulc
prouldc
accesS
Subuertto Ru 8inser
Rule & A
typically
ttribute
Don-kes Function a database databasemust
exist Sustcm that The 9 ton
thc L &
cnd
betuueen interface
data
Distribution oqicaJ
independa
Physicad
data High
thc o0 updation
’Ybetwcen
X exist
depen user must
has
Subucrsion iss leud
6sstem to
dancy ao
distributed dato Support
must bcce
indcpenda
loO-
too must
intcrtace independance
lndcpcndentof
insert,
Ro
indcpendalce. delcHon
leuc Dot
attributeS is Rulc hiqh
not
relationsh
primog ke
a oUer be update,
bc
recòd Jeue Page Date
adassKate
Hhat ablc
dbe uartou
ta
2)
Norn-tiuaU FD
2) ) )
IAlhen Subset ofA Emp-
Name
conSidcr Ex Thc TriuaJFD
AB TypcsoF FD toreX
side sidc
l-eEt o
NameComplctc
DoR IDNtriNouna A’BS EmpId,
tùua
Non-FD
TiUal Riqht
ollowiog
AOB has Emp- Id
Name d D

non
1S
Emp-Namcf tablc tiua
detcrminont
depeodcrst FD
iS
trìuaJ FD
OF
ull tuoo also FD
then EDE EBis Emp.armc
columo riua

A>8 B Emp. Subsct


is Poge Date
cdacGate
Emp-
iS
nota Td
Id of
callcd A
ansitiuc
Rulc 3)2Auqmcotahoo Trnfcrcocc
Rulc()
IE For Ex
R D
It b,C,d,ct Ex IF
=Q, X Re£lcxivc The HmStrong
The
Tt a rulc Thc
infcrcncc
ED
On
’Y iS con
X>Y Y
(A8CD) a)Go C FD
Infercncc armstrong
X
and has appls
Callcd then databasc.
relation
thenXZ
YZ Rulc axiomS
Y’z 6tupes to
(IRe)
Rule (IR) rulc
parta X’Y Set axiomS
hen is are
oF
of type
coAC’BC USed
depchdany ED arc
Ofcrence
oF tO basic
asseration Conclude Poge Dete

daenste
rulc
) (5 bY u)union
Ruc
Pscudotransitiuc
DX’Y
(Ciuen)ProoE
3)
Rule(6 ’YZ
Dx 2)XZ DX’Y
(giucn)
3) (Ceiven)
Proof It TtX’YZ
Dccompds
iS Proof TE
Xz X’Y IF XY YZ XXC X XY
’ >Y Knoæn S
Yz reUerSe YZ
Celucn) (
cton
and Cqiuen) (using
(using and
C using
usingusin9 (usingthenX’YXZ% of as
(using
IRe) Rule
YZ’ unionrulc
project ’Z
IR , IR,
IRon
JRg IR) JRz
On onl
on I W rulc then
’YZ X
by then nby 2
3 tohere by
x\-X
3
augm 2 Page Date
augmcntaH.
augoith
4)
clAsSMate
2)
ol
th
aion ¥NOrOmalizaton
G 2)DT+ on0molics Tnsert 3) oDomalics DeletionQ) onomaicS 9)Anomaies
octeristics
deletton 20 2o DUpdate
lec Torbage T+
dato that Ne OF Ne Could then itDot JE contaun
mas It TE
is iS j
oherc
Gome
else JE
Gct H data
also uscd procc
docs
tricd aworencSS
cwastried datodatabase
of lioked
blc baSe
to
mauies rclation ss
sS lef to itcms
ocliminate Oot
uide for o inscrt desgooc
delete
%updatCike
insertioo rcdureduce -2)
3) )t
red
theundc to
leadeach 0re
design
k exiSt
Organizing
inereasing data data
Somc
ndancy data 0
orge lctcd
Scattcrcd
to is
choncesuee ct at rccord
is other not
itgity anomaliesano
al io alSo Stran4e
blc the oFrom thc he O
becauSe
but properly
pertect
maieS
re SoUcd
undc performoe and Page Date
cdata &l datof a cord ports SituHol clecmte

intu relab consis


SiD
oF are then
aecan
Therc 2) () 3) 2) )1NEG)Thc
Stud- id
D
CompasIte
4)St
4) Tt
must
Attrbuteof Tt
fcdundancy
Ex Thc
IDEmp.Nomc
Emp-
EmpID Ex lueS Ua
2
|2 20 14 contaun
toblc NE. NE norma minimize
Ghold Do
be
diSaul
Project-23 d
Showdbe Emp.
Namc
attributes hold an
from form
ows. table nu)
24 atomic
PQR ABC nly
ABC ABC
is vaue
gst mutiualucd& cannotualucdatabasc
single uSed
nt.name dependency
portial g32,'1c 8314-2o
4320
their by
NE 2 Phone
g92)991336
2241 Emp-
- to using
EmpPhone
83120432 o
99299138G hold
combinaioo ualucd toblc
rcduce
attr1btte Page Dafe
dASSHAte
muhplc normal
atibut
Projech
8 A
elassMate fora ca tanSitiucls
apart coe
Date.
Page. projectDame UP US
Studcnt-name uhen ony
ooy
on zip
Emp.
depend key 2NEdepcO
B
exit 245
123
PoR attribute io
piimay
puma
dcpendoncy
depcods
io
toble me
Na
Emp not
kcy cousioq
sobich
porta
remoue
Totoblc
the
diuide
POR
key
primars 1s spartia
ld
Student id
Project.
Compositc
primag NE
2
keyon
table

NE.
depcnds
Don
3)zrd ID
Emp.
2324 Portial
2NE 2
Therc
Ceiuen
OF 2
2)
No
statc
City.
daseate
S
FDblc.
Page
Date to
Cucry
3NE
US city City of
8NE Dam P OF LFkey
S 3NE
Namc
Emp- Emp-no
PoR UcrSio
BCNE
X42P¢R State notState
’ city State
UP US
thanSupcr
UP US
codd isiO
NE toblc
but
’ aduonce 8NE
Stictcr
SX’YX
ID
Emp. Emp
zip Emp.ID Id
iS2NE
1D Emp- Emp_zip
245
S
tablc iSin
Employ
245 StCtc T+
123 Emp 2 123
Bouce
(u)S
S
TH )IHA
T
2) 3)
D394
3
Emp_DEPDEpt|
Emp
Fmp-cQuntry
DEPDGBCF
DEPT-NO
cASSMAt
tablc
are
ito
DEPNO DEP
Em
Page
Date Desigo
ID, Ceunty
Emp-
Test ble
Couoty
Eop- Country
Emp-
FunctionDomc BCNE
DEPTEmp to
qiuco Jndia
Jodia
DEPr
Fmp.
3 ID
Em
Emp-I
DEP.
ble
aboueta
To DEPT’
Emp-
kcy
not
condidate
thc
'S
candiadc
key
's
EmpIDDEPT
coOUcrt Emp.
ID
Emp
ID
Emp tablc
TD
Emp. 264
269
CeFolo 26
4
264
1St
toblc
blc2rd
ta
nd tob
Tbe
TO fD

You might also like