Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Uational Data Model ConcapA A

h
rmOdl, e p e r s he loloto
atb ba4
Relaorship
s a COlction o melotu Jnselatione
olote mëclel e a a h Snt
wwhich CRAAsp gnds to
aet
entbty LcelaLienship . comu in 197
In 197o
by r . F.Ctld
eumn Heuu!
uelat on oine un a
Relati'en +
akie, which haue uDus an COumns.

ramial Colwm n A
O ueloti on. Lt A

Cn aepeas

cotes as
ket 3alloual

t ole'naol
Dermain attasbute
h
mo
Volues o aleno
but A Can ke
olo meu at
dom (Aj ), DoM (A) , al),D(A)
Tuple Jt a Juw a lation

Entirnssi
exdelitr elaten otelinol Ons C

Aut Tuples at appuas


e l a i o

Ot s tintl o tim
Deu he oleguer a uelationihip
attibulis
oleineal as à no a
Contain CHeakla
awali nality It a selatign olejinud
he collition no uples Contuin

Relatisral tabasL Jt olofinealL


MLlatiem ui u
Callectien nomal znsl
clistuinet selatior nami

i ' Lh dugre
A e lat en
rauy Kelat ern
N knouorm a Wnasy Lelation

Chaua c t i tis aRelaion

tuples in elatin
( ) Creleung a At
deinnol ad
Auelat'enthip ol
&et haul no

tupls elemin a
i nlatton-
amom hem Ment tuples
asds.
not hauu DyPtiulas
hip OLD
OLD

wih
b) Odeuing vatus ain a iuflu Ah

iupplu an
nstlLapica
C) lution ol/i'nation lalunate leiaasion)-
ulatioral Achiwmt
- ad. A An Aut
O t i bulis and HLlati
mapping.
deirud as i t st
hn eah uplu
P= t, , tm
ti, ts--..- tn
O mappin R ts 9, uh 9
Rellno MVan Wonnt Rallno
A
Ralno m
A

3
o 3

Ralno
A

3
Invati'ob)
olomain
lorn CAi) d e m LAj)..u lem (Am)
Kul t. A mut be n dom Ll:)

n.
Q) Values Mel_valuu Each vlut
i
O iufalu am atomie.
tational datu Moold-Basie COnCuhts

Fonall
,givest , ,D Dn ,a sulatiem r

ia set ef n-tuplus (a,a2,--- an)


hus..a l a t i
shese each a 60

Cust- Ruy, Sam, otmil , komalf


nene
Cust-Strut S, S2 , Ss -f --

Cuust-C Lls, enp, Naola. -


hen :ilRuy, Si, Odhl), tSan, S2 knp}rt Aitt ,

S2, knp), C kamsd, S 3, Nosiela )3


a l o t i On vi
Cmt-leme

Rlati ona schimna

Ar Ar au atlui buutis
A
- -
.

,
dchemma
An) a Prelat on
R =R, A2
- -

-
=
Cst- nane
CuitStuet, dly)
Cust-stherilu
E
h klatio
olenati a elatien i '
eR)
khima R Cusr-sehema)
Cus t o r m i l
E
Klaton Inktamte
Yalui ée a
uelaton dieefi
4 h wshev
by atable eules
a tufple, upi4ei
ellemett tt ulty

able. ( celumns)
Ou in a

CAst nhrmi
ci
T i pTpluy
u
S
Rye
Snu H

Cuusy S2S3
Sam CusHorrui

Aleg3Canlinallhy =4
Re tatioal Aa ta bose Schtma
Sets af elatiou selremo
panyS Emplayee ,Oept,Aleperulon, ayie
Relation
Ennp loyee | Namel $SN| SALARY I DNOa
Ratia
ept NAME| DN0|Tat Dte Chena
DB
ept-Loo ONODLOc
Ehoma
PRejcet PName P NO| P Lo cD Aan
SSNPNo | HoUR3,1
Pepenslet |sgN DEP-Namel 8 Dat RulationshuP
Rlatiomal ata baseSyeti
mt yten fhat 3 basue
Lt a olada base
introodueeol by E.F Codd
On ht uclalional moodel as

BMS fn uhich olata Shouec


t may ke a
lables amd he elationclp
In he oum
mong h data is also Stoeed n he fom

abls
e famdis mahennaHin hes
E f Cod
ino cluced 12 uls CO-12) fo4 e 2 lational
Onls knoin ad
model fo dala basu comm

Co old ' vcles I h e maind f i n e u h a t


leg
a DeMSs fo to be
u e g u i r e fo
n l a l i o r a l , 1 . C , am
RDBMS.
CondiolerLd
Coddl ul EA Coclol oe mulaliel

heoribal ecslubidn any soteuet

laning to be a RDBMS

O-SinaleFoun olatb ule DAS mu


asprct olatabasL entihul,
mamae euuny
mamne e
sulatienal
hroushdut, is ey usin
utirg ay entisnal
Cab abili iis uilhat

lang uare

InJoematicn ku h unoumat'n C
n
ebe ekentiel u ne amal ony
way ie tables :

h u u l e e n p hadices
can R
he aet hat he n/oremation
sudus O n cSlumnt

rakamtied AcceN+ o acc he takle,


oLo he Aaklname
simat tai bul
Colum n)
(O)

3 eimatis natmemt null > e Ahol


able Ao penat he null Value
null vales ae
h
Jhe Jueat menl
Meams Msir data
d null ooatu.
>

penlent
a i o o4 enply
Notc applicable
appicabla
T i s dfunt shing
Kiy Nat NDLL
Actu nline alogue RDBMS
shauiol k oble prate, deuta olictiona
taubl,s kup ak Cursent ilal
uiu ome 9uery lauus
olatobaLe. u s
an

4o kcces ho co fa loa wehiob y aeets useo to access He datk base


tiely.
aCso ielate hem.

5- lomrehm a t sublArguapes LOa


DBMSshoutal haue COm/pi hensiiu
arsaLtional alata languageg
ode'rati'on languRg
oula fin o ,
Lamg waPes etnito
anal late cOnlio
Aupiizdiow
Dcla Mni pulaiou
r a e u o n beorla'o
Juiy orxlu

6+ View ubolation Miule y n can


Cans wel

uuuus Canhe ub olatzot u t hn


Dut
rat amy
Rhac t , One Camnot ub clati ues
basio n ajgtlraiDn
C 8ome ieues ase
a s eaumec as jor
wwew
E o u ew Rhoutu
untuaaf +able Jabus,
CLem na'e f u chamges
Cnel
NctNUL atlisute e base
v t i d in basu-tables.

Vies ant pe ubdaa


tRig ll nlob el imsent updrzZ
be Capabke
del R DG MS muut

Luini mOrC han ust tiatn


bu able to inis,
loto J huld

clele te data item ui he


he
upolok
i n g lGm mane Jos aatu h loBeiaban,
mu a d fnaeNtion
bL dollt, uplalig eaoh i u l paha
4h
e i ike Unon, inesee tiou ond minus shaulel aLsa Ruppru

8'Physical_olate Indepnaleucu Jt mant

the olato Lubieruee t

Lhuiuld be inolpenolent sOrage trvctine

2uufp antetiond
Logical obh Zn oupencdense Ihe dala
hukd Irele pentent ogr'e
Inuauwd w ols
Phog runmins olatub ode ole
Proulnn dhaulel
incdepin d i n t hese hannfet
1o Tnteqzity Inleb tmoltnesy Jhe olata
auau lable Ahdulel w no imi tetions,
ww tesm! inte guat'en Jhe imil
kytin Ahoulel only be lakin inlio
Cersiolehatian Jhi tegity Constraint,
Apeeiyy in
lelational olala dub
Stovbte In olata olisttona
larnguage

11> istrikution Inolubenodence h ombhain=


het he dyca hauld ku Look
aanta Uzesl tyctn To uiu, uwn
t nstributel acsai
iuiste kuks gt m
b - hos iur,
(Singleedpta ne
law Saue
RD BNS he a

Cannet any integrity u u l l epueB-


bipas
in tha ighut eul lhelatibnal largudge hrlt p rerorels
a t a simi).
Relati'ona ALbka
aa esocLolsal Jamguape uuith asoti
1 o m o v exieting
hat peryouOd n
Rlatien otnine pes ult Cane hi) Jelatensi
whou ehanging phe i g i n a l sL lasn. 4h

RMbot allrol clolnL

h
ormnm penatien
Natiu elation ghuati'n .
Codol Rules

Ruule 1o Tndquily Jnolepen olen Rule


ugei ty efeus
to
meintarning
ota
e accwa2iz
coriie bem y oolala ouw
Cy cle
Cnaise

iret Cnkulee hal eet olata yp utd,


; hese allow columr
Cheek consiain
be Cheekud agenizid Othes Column byoru insrtib
allouud inolfptrrdert - he Arond -end afplicaho-
latabase
amol k inifaee

K0gical ata Tnelepvnoleive


Rult 9
ad'e al, odata uw
a latabase must e indepidt
olata mie
Change in l o ral dato
he mui
uil's
nuieus Y
s tuwo esig
keo lebis
uaing it :

For eg
afe he appiiiatons o l u n t ladles,
olufount tasles,
not unde two
One is split
aue mug ed e
he uit

horehould b
imbuet oe Chamge On
rult
rule
ndit
ondlt olHeult
oliitievutt
Jhi Onl o he
applulation

Je opP
An mm puations
S
SAh Rallno SNn olHho
ROS A ol B 0 2

C O3

JuUS-t|ter
tes}
RUS SNamnt Kalnob For seUSto Bi valid.
Botn l a t i o u mutk
A
h a same
1)ASmuxi
O attai buts

C o3 2) The atwbu doma


mutbe ompatibl.

untisietion Gpuauon
uiid h Grman
n
Lcaol C)om oelats ns
n S =St|t
Er. ancl t es}
GAillensuiwo elatie s a s L Union COnbatible
ulhew
RS = A
- S t t e aandts
S-K C

a det all
ontts'a o d u > t mians
exs =t 9/te
poskl Spcouol
R S
RN
SNn Kelle
A C03
02 D
RN
RyS 3-Nm JbundRa R a t
A C o3
D
2
3
2 |oy
Aation a l peicators CNitive)
benohou uiel a r i run
a muLt ul a umary
a ulation.
a t t ibulu
Glnetd by p'Aho
pCafh) R wtll inim he a t t i b t b'c/ uizt enl
by a
Noutdu Rlatson peration
Sledion (r) Cable-nm fantu (R
Selict #Pno Pnm Colas leeeight ay
Sit Nu Arol
Yuple Blue Kurpus
SCtus
ut all hoSe Pa , uhie
irnal p )
Less han p u d i c a l i ,

Opn m " n a u t s " o n d s t i g h = S C c ) P peposh


Loq
"Nut" Paut sulatid) tablu
Pnm vatBn
wk en h
) Yhis
Pofecti on Ry
Omothe
ta
uv
columns tuem
Afueireal
Cefyn amay olayfbeèot
elLmirat ng
(able

Phno
Enm sdge
np-iol 3
A 22
2 B 24
78
3 C 22
lo 1 12
D 23
(E
7&ge (tmp enn,Ae
2 nm
A
3

lata
Rrlational loleulu
h elyutioral Coul culus mbn
MoCudukal
lornguae RC dogfcaly
RC a

on appsoah han ela tional algeb


ut Jh languare Hrat Can be utd t to

RAoclur any daDOn het CAm


olessunl,
bry he klati onal calculus d a i s to b
kelai orally Complt CaLtutut
phuolicat Colclud- Jouma lartuij,
l tp
durnbaUe lo cal agu ren in
muthemutics
h w yps AC-
(A)ufpL enltal Rc. (B) omain Orentnel R-

(A) Juple ientuel RC usa nen Procaalus


uesAy language. t g'uas
anforobbien uel no cutung dreif.e
obtiobtai ning o t in matien
NTRO 9uessy epraol
t Plt»}
tupl , t Anlicat P
ue yo t
PaTina Cuut 4e mlormati on o Cmplay ecs.

du Sinel all hoL enpuly e s holePaln


9reatm ham Sooo
t e.emp anh sal >Sooo}
in
u inel aL he enp loy e s uo
rking
heyci olept
E S ¬enp lA ldnoJ S[ano7)
u e ctupt (t Cdrd-a lano]
( u C arame I= Sysm ')
hatt
e x tansial uantifi, mamk
some valu hat
hese enist
huu i allnetAins tane
L31 Oomaiw Aiernlol Relat'oa alk
hi valus
he asiaklu takus hom
Olomain
atthi but kathes ham upl
ulav'om Jukm ulab'on dhgre
mult
Les ult , we
ague nu
risabtes.
haue n yhee alomain
is expregsel ag
Gpmehal RC expuukien
n ? hueh at P-a.d-d
ay, o
hee m7 n
uupusent olgrrain
He
NeL d, d - -
oln
vawirbe and P , du -. -dm? breuent
Cempasol atoms eask alan
aorula

hae 1 RCdl, d2 -aln)


R a aulaio 0tgrew'm'
whes
(di= lto n)
Ol i a do maim variabu

whe a a

demaim a i a b l e k &
demaim a cempayra
Opurato CK,>2, S,=, ==)
whers olj 2 a demaum

C is a corshn pugm olamau

d
LCusMLCwhiuely. buila a
mda
rem atorm uirgtlasing ulu.
a omula

F2 dosmuas. he
F2 P, vFa 7 F 7P C.afh
3 I P) a Jourula C 'h
hen amol alo
olo mair auicekte
dormula
(C3%)CPoc)) anal ((t)PCx)
i l E-ro ,
4 4 he is

nm saloy ,
otuyt-ro o r employ ee
hauuing salasy l
7oooo

eno, Enm, S, opt no E


7 <eno, E_ nm, S, deptno >/<
Cmp S>1oo0o
Calcls_ (TR)
Jupl Rlati onal
guuonnfeel
can
be
TRC

o heie eds
heit ekists quamiJies
he eaistenial
) 2 (alled
Hhe n a , id
he nane, id a
and gendloi
ThC ol
suttt a ha '
hose Relaiy usguatu
Enmploye

|Enploye lt) A, t klary Ice

S4Enaew, t.eiol,f qendek


databe'?
l7) AND TT asuticle
Trnane slulhor
OR ="database' AND Rramy -Trae
EAuthors (T-aschcke
RIaT i h 'name'
9ulun
uples
yuples i
uh 'name
utl
bath quwsies atie n olath at.
Qutput eduhor wlho has uwuten Qm

ientol Rilatonul lalculis CORC)


Calculus CORC)
Omain

operaho% S TRC .

DRO L s
nsukjitr: "datatai
7

<autile, page, sukyeet>| Book


ielol wicle page and kulyeel fuom
a iC
Bock, ulhie Buuhyeet is elatabase.
e9ui va i n t
e TRC DRC cguvad
Jh he CpwssSiO poueL
to RlatiOnal tgebiea
rure 7
ad Tchr
utle DRC e 2elict Tehr-id
Lullt a k
fo clept. lo
(tdhrid,
tehr. ** )
2TO-id, tchr reme -Toarles,

0e, asdaes ) n De PT_ID l0f =

yielt
a

cilus
g u r a n t t e d

s it
4 Ex/RE<S ]ON s one t
SAFE
uesilu.
Cfhasusiss,

tnitt d
ik

UNSAfE (Empleyee)} Un SAFE!


t l net
Tmit,lname.
7mpleyeit Tnüne, ,SSA, Bcdals, dclAic,
Age, Cola yi Supea S
,n 4 o

opautmet SOnam,dnamd yr.tsn , flgr. sto,t_tal


aTRC uelueue namo anol
ueho wwek
o all CnplaYees fau he Rlsael
cpuut met

S.EName, t:Lnane, t.adlolkeesEmployee (t) a-d 3d)


ad
(Dehantment ld) qmd d Dnann ='Redearoh'
Drumkes =t Dno)

You might also like