You are on page 1of 13

MCA Semester 4 MC0077 Advanced Database Systems

Assignment Set 1 Roll No.



1


MAY 2011
Master of Computer AppIication (MCA) - Semester 4
MC0077 - Advanced Database Systems- 4 Credits
(Book ID: B0882)
Assignment Set - 1 (60 Marks)

1 L|st and exp|a|n var|ous Norma| Iorms now 8CNI d|ffers from the 1h|rd Norma|
Iorm and 4th Norma| forms?
A) I|rst Norma| Iorm
8) Second Norma| Iorm
C) 1h|rd Norma| Iorm
D) Iourth Norma| Iorm

I|rst Norma| Iorm
Any Lable havlng any relaLlon ls sald Lo be ln Lhe flrsL normal form 1he crlLerla LhaL musL be meL Lo
be consldered relaLlonal ls LhaL Lhe cells of Lhe Lable musL conLaln only slngle values and repeaL
groups or arrays are noL allowed as values All aLLrlbuLes (Lhe enLrles ln a column) musL be of Lhe
same klnd and each column musL have a unlque name Lach row ln Lhe Lable musL be unlque
uaLabases ln Lhe flrsL normal form are Lhe weakesL and suffer from all modlflcaLlon anomalles

Second Norma| Iorm
lf all a relaLlonal daLabases nonkey aLLrlbuLes are dependenL on all of Lhe key Lhen Lhe daLabase ls
consldered Lo meeL Lhe crlLerla for belng ln Lhe second normal form 1hls normal form solves Lhe
problem of parLlal dependencles buL Lhls normal form only perLalns Lo relaLlons wlLh composlLe
keys

1h|rd Norma| Iorm
A daLabase ls ln Lhe Lhlrd normal form lf lL meeLs Lhe crlLerla for a second normal form and has no
LranslLlve dependencles 1hls deflnlLlon sLaLes LhaL a Lable ls ln 3nl lf and only lf for each of lLs
funcLlonal dependencles x A aL leasL one of Lhe followlng condlLlons holds
x conLalns A (LhaL ls x A ls Lrlvlal funcLlonal dependency) or
x ls a super key or
Ax Lhe seL dlfference beLween A and x ls a prlme aLLrlbuLe (le Ax ls conLalned wlLhln a candldaLe
key)

MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

2

Iourth Norma| Iorm
IlolaLlons of Lhls normal form are much less frequenL Lhan of Lhe oLhers lL occurs when Lhere are
repeLlLlons of groups of daLa 8efore you can learn how Lo puL a Lable lnLo 4nl you musL flrsL
undersLand moltlvoloeJ Jetetmloocy


2 Lxp|a|n the concept of a uery? now a uery Cpt|m|zer works
Database uery Language
A u8 query language wlll always provlde speclflcaLlon of Lhe selecLlon crlLerla for Lhe deslred
lnformaLlon and can also lnclude lnformaLlon for Lhe remalnlng processes as lllusLraLed ln Lhe query
examples of llgure 31b and 31c noLe here LhaL Lhe SCL query lncludes elemenLs of Lhe execuLlon
process (Lhe [olns) and Lhe deslred resulL whlle Lhe LexL l8 query only glves Lhe selecLlon crlLerla
assumlng LhaL Lhe sysLem wlll provlde Lhe selecLlon process as well as deLermlne Lhe resulL
presenLaLlon 8eLrlevlng daLa from a daLabase conslsLs of 3 maln processes

1 lormulaLlon of an lnformaLlon/daLa requesL Lhe query
2 Cuery execuLlon by Lhe u8MS oety ptocessot and
3 8esulL presenLaLlon

uery Cpt|m|zer
1he uery Cpt|m|zer ls Lhe componenL of a daLabase managemenL sysLem LhaL aLLempLs Lo
deLermlne Lhe mosL efflclenL way Lo execuLe a query 1he opLlmlzer conslders Lhe posslble query
plans (dlscussed below) for a glven lnpuL query and aLLempLs Lo deLermlne whlch of Lhose plans wlll
be Lhe mosL efflclenL CosLbased query opLlmlzers asslgn an esLlmaLed cosL Lo each posslble query
plan and choose Lhe plan wlLh Lhe leasL cosL CosLs are used Lo esLlmaLe Lhe runLlme cosL of
evaluaLlng Lhe query ln Lerms of Lhe number of l/C operaLlons requlred Lhe Cu requlremenLs and
oLher facLors

The output from the optimizer is an execut|on p|an that describes an optimum method of
execution. The plans shows the combination of the steps Oracle Database uses to execute a
SQL statement. Each step either retrieves rows of data physically from the database or
prepares them in some way for the user issuing the statement.


MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

3

Lxp|a|n the fo||ow|ng w|th respect to neur|st|cs of uery Cpt|m|zat|ons
A) Lqu|va|ence of Lxpress|ons
8) Se|ect|on Cperat|on
C) ro[ect|on Cperat|on
D) Natura| Io|n Cperat|on
Ans

MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

4





MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

3



MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

6



MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

7


3 1hen all LhreerelaLlon query plans are compuLed by [olnlng each Lwo
relaLlon plan produced by Lhe prevlous phase wlLh Lhe remalnlng
relaLlons ln Lhe query

MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

8




4 1here are a number of h|stor|ca| organ|zat|ona| and techno|og|ca| reasons exp|a|n the
|ack of an a||encompass|ng data management system D|scuss few of them w|th
appropr|ate examp|es
Ans 4
A number of hlsLorlcal organlzaLlonal and Lechnologlcal reasons explaln Lhe lack of an all
encompasslng daLa managemenL sysLem Among Lhese are
O 1he senslble advlce Lo bulld small sysLems wlLh Lhe plan Lo exLend Lhelr scope ln
laLer lmplemenLaLlon phases allows a core sysLem Lo be lmplemenLed relaLlvely
qulckly buL has lead Lo a prollferaLlon of relaLlvely small sysLems
O ueparLmenL auLonomy has led Lo consLrucLlon of deparLmenL speclflc raLher Lhan
organlzaLlon wlde sysLems agaln leadlng Lo many small overlapplng and ofLen
lncompaLlble sysLems wlLhln an organlzaLlon
O 1he conLlnual evoluLlon of Lhe organlzaLlon and lLs lnLeracLlons boLh wlLhln and Lo lLs
exLernal envlronmenL prohlblLs compleLe undersLandlng of fuLure lnformaLlon
requlremenLs
O arallel developmenL of daLa managemenL sysLems for parLlcular appllcaLlons has
lead Lo dlfferenL and lncompaLlble sysLems for managemenL of
Labular/admlnlsLraLlve daLa LexL/documenL daLa hlsLorlcal/sLaLlsLlcal daLa
spaLlal/geographlc daLa and sLreamed/audlo and vlsual daLa
1he resulL ls LhaL only a porLlon of an organlzaLlons daLa ls admlnlsLered by any one daLa
managemenL sysLem and mosL organlzaLlons have a mulLlLude of speclal purpose daLabases
managed by dlfferenL and ofLen lncompaLlble daLa managemenL sysLem Lypes 1he
growlng need Lo reLrleve daLa from mulLlple daLabases wlLhln an organlzaLlon as well as Lhe
rapld dlssemlnaLlon of daLa Lhrough Lhe lnLerneL has glven rlse Lo Lhe requlremenL of
provldlng lnLegraLed access Lo boLh lnLernal and exLernal daLa of mulLlple Lypes
A ma[or challenge and crlLlcal pracLlcal and research problem for Lhe lnformaLlon compuLer
and communlcaLlon Lechnology communlLles ls Lo develop daLa managemenL sysLems LhaL
can provlde efflclenL access Lo Lhe daLa sLored ln mulLlple prlvaLe and publlc daLabases
MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

9

roblems Lo be resolved lnclude
1 lnLeroperablllLy among sysLems
2 lncorporaLlon of legacy sysLems
3 lnLegraLlon of managemenL Lechnlques for sLrucLured and unsLrucLured daLa
Lach of Lhe above problems enLalls an lnLegraLlon of concepLs meLhods Lechnlques and
Lools from separaLe research and developmenL communlLles LhaL have exlsLed ln parallel
buL lndependenLly and have had raLher mlnlmal lnLeracLlon Cne consequence of whlch ls
LhaL Lhere exlsLs an overlapplng and confllcLlng Lermlnology beLween Lhese communlLles
ln Lhe prevlous chapLer a Jotobose was deflned as a collectloo of teloteJ Joto tepteseotloq
some loqlcolly cobeteot ospect of tbe teol wotlJ
WlLh Lhls deflnlLlon oo llmlLaLlons are glven as Lo Lhe Lype of
O uaLa ln Lhe collecLlon
O Model used Lo sLrucLure Lhe collecLlon or
O ArchlLecLure and geographlc locaLlon of Lhe daLabase
1he focus of Lhls LexL ls on onllne elecLronlc and web accesslble daLabases conLalnlng
mulLlple medla daLa Lhus resLrlcLlng our lnLeresL/focus Lo mulLlmedla daLabases sLored on
one or more compuLers (u8 servers) and accesslble from Lhe lnLerneL Lxamples of such
daLabases lnclude Lhe lmage collecLlons of Lhe PermlLage Museum Lhe caLalog and full LexL
maLerlals of Lhe ACM dlglLal llbrary and Lhe cusLomer records for Lhe 7 slLes of Amazoncom
LlecLronlc daLabases are lmporLanL slnce Lhey conLaln daLa recordlng Lhe producLs and
servlces as well as Lhe economlc hlsLory and currenL sLaLus of Lhe owner organlzaLlon 1hey
are also a source of lnformaLlon for Lhe organlzaLlons employees and cusLomers/users
Powever daLabases cannoL be used effecLlvely unless Lhere exlsL efflclenL and secure Joto
moooqemeot systems uM5 for Lhe daLa ln Lhe daLabases







MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

10

Descr|be the Structura| Semant|c Data Mode| (SSM) w|th re|evant examp|es
Structura| Semant|c Data Mode| SSM
Ans
1he SLrucLural SemanLlc Model SSM flrsL descrlbed ln nordboLLen (1993a b) ls an exLenslon and
graphlc slmpllflcaLlon of Lhe LL8 modellng Lool 1sL presenLed ln Lhe 89 edlLlon of (Llmasrl
navaLhe 2003) SSM was developed as a Leachlng Lool and has been and can conLlnue Lo be
modlfled Lo lnclude new modellng concepLs A parLlcular requlremenL Loday ls Lhe lncluslon of
concepLs and synLax symbols for modellng moltlmeJlo objects

SSM Concepts
1he currenL verslon of SSM belongs Lo Lhe class of SemanLlc uaLa Model Lypes exLended wlLh
concepLs for speclflcaLlon of user deflned daLa Lypes and funcLlons uu1 and uul lL supporLs Lhe
modellng concepLs deflned ln 1able and compared ln 1able llgure shows Lhe concepLs and graphlc
synLax of SSM whlch lnclude
1ab|e Data Mode||ng Concepts
Concepts
(synonym(s))
Def|n|t|on Lxample(s)
LnLlLy Lypes
LnLlLy (ob[ecL) SomeLhlng of lnLeresL Lo Lhe
lnformaLlon SysLem abouL whlch
daLa ls collecLed

A person sLudenL cusLomer
employee deparLmenL producL
exam order
LnLlLy Lype A seL of enLlLles sharlng common
aLLrlbuLes

ClLlzens of norway L8SCn
name Address
Subclass
superclass
enLlLy Lype
A subclass enLlLy Lype ls a
speclallzaLlon of alLernaLlvely a
role played by a superclass
enLlLy Lype

Subclass Superclass SLudenL
lS_A erson 1eacher lS_A erson
Shared subclass
enLlLy Lype
A shared subclass enLlLy Lype has
characLerlsLlcs of 2 or more
parenL enLlLy Lypes

A sLudenLasslsLanL lS_8C1PA
sLudenL and an employee
MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

11

CaLegory enLlLy
Lype
A subclass enLlLy Lype of 2 or
more dlsLlncL / lndependenL
superclass enLlLy Lypes

An owner lS_Ll1PL8A erson or
an CrganlzaLlon
Weak enLlLy
Lype
An enLlLy Lype dependenL on
anoLher for lLs ldenLlflcaLlon and
exlsLence

LducaLlon ls (can be) a weak
enLlLy LypeuependenL on erson
4ttributes
roperLy a characLerlsLlc of an enLlLy

ersonname !oan
ALLrlbuLe 1he name glven Lo a properLy of
an enLlLy or relaLlonshlp Lype

erson lu name Address
1elephone Age oslLlon
ALomlc An aLLrlbuLe havlng a slngle value

ersonld
MulLlvalued An aLLrlbuLe wlLh mulLlple values


1elephone# home offlce
moblle fax
ComposlLe
(compound)
An aLLrlbuLe composed of several
subaLLrlbuLes


Address SLreeL nr ClLy SLaLe
osL# name llrsL Mlddle LasL
derlved An aLLrlbuLe whose value
depends on oLher values ln Lhe
u8 and/or envlronmenL


erson age as currenL_daLe
blrLh_daLe erson salary
calculaLed ln relaLlonshlp Lo
correcL salary levels



MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

12

What are d|fferences |n G|oba| and Loca| 1ransact|ons |n d|str|buted database system?
What are the ro|es of 1ransact|on Manager and 1ransact|on Coord|nator |n manag|ng
transact|ons |n d|str|buted database?
DIS1kI8U1LD DA1A8ASL
ulsLrlbuLed daLabase lmplles LhaL a slngle appllcaLlon should be able Lo operaLe LransparenLly on
daLa LhaL ls spread across a varleLy of dlfferenL daLabases and connecLed by a communlcaLlon
neLwork
A dlsLrlbuLed daLabase sysLem conslsLs of a collecLlon of 'slLes' connecLed LogeLher vla some klnd
of communlcaLlons neLwork ln whlch

1 Lach slLe ls a daLabase sysLem slLe ln lLs own rlghL buL
2 1he slLes have agreed Lo work LogeLher so LhaL a user aL any slLe can access daLa anywhere ln Lhe
neLwork exacLly as lf Lhe daLa were all sLored aL Lhe user's own slLe

lL follows LhaL Lhe socalled dlsLrlbuLed daLabase" ls really a klnd of vlrLual ob[ecLs whose
componenL parLs are physlcally sLored ln a number of dlsLlncL real" daLabase aL a number dlsLlncL
slLes

A dlsLrlbuLed daLabase sysLem conslsLs of a collecLlon of slLes each of whlch may parLlclpaLe ln Lhe
execuLlon of LransacLlons whlch access daLa aL one slLe or several slLes 1he maln dlfference
beLween cenLrallzed and dlsLrlbuLed daLabase sysLems ls LhaL ln Lhe former Lhe daLa reslded ln one
slngle locaLlon whlle ln Lhe laLLer Lhe daLa reslded ln several locaLlons
Lach slLe ls able Lo process local LransacLlons Lhose LransacLlons LhaL access daLa only LhaL slngle
slLe A slLe may parLlclpaLe ln Lhe execuLlons of global LransacLlons Lhose LransacLlons LhaL access
daLa ln several slLes 1he execuLlon of global LransacLlons requlre communlcaLlon among Lhe slLes

Lach slLe ls a daLabase sysLem slLe ln lLs own rlghL ln oLher words each slLe has lLs own local real"
daLabases lLs own local users lLs own local u8MS and LransacLlon managemenL sofLware and lLs
own local daLa communlcaLlons manager 1he dlsLrlbuLed daLabase sysLem can Lhus be regarded as
a klnd of parLnershlp among lndlvldual local u8MS aL Lhe lndlvldual slLes

ln Lhe glven conLexL Lhere are four slLesle uelhl Mumbal Chennal and kolkaLa and Lhese slLes are
geographlcally dlspersed Lach slLe has lLs own compuLer wlLh a daLabase conslsLlng of all Lhe
cusLomers and fllghL deLalls malnLalned aL LhaL slLe 1he daLabase sysLem aL Lhe varlous slLes are
based on Lhe relaLlonal model Lach branch malnLalns Lhe relaLlon reservaLlon where
8eservaLlon_scheme(slLe_codefl_nocusL_codeLravel_daLe)
SlLe conLalnlng lnformaLlon abouL Lhe four slLes malnLalns Lhe relaLlon (ClLe_scheme) where
ClLe_scheme(ClLe_codeClLe_name)
A local LransacLlon ls a LransacLlon LhaL accesses lnformaLlon ln Lhe one slngle slLe aL whlch Lhe
LransacLlon was lnlLlaLed A global LransacLlon on Lhe oLher hand ls one whlch elLher access
accounLs ln a slLe dlfferenL from Lhe one aL whlch Lhe LransacLlon was lnlLlaLed or access several
dlfferenL slLes
1hen Lhe advanLages are surely obvlous 1he dlsLrlbuLed arrangemenL comblnes efflclency of
processlng (Lhe daLa ls sLored close Lo Lhe polnL where lL ls mosL frequenLly used) wlLh lncreased
accesslblllLy (lL ls posslble Lo access a uelhl lnformaLlon from kolkaLa and vlce versa vla Lhe
communlcaLlon neLwork) rellablllLy and avallablllLy and speedup of query processlng
MCA Semester 4 MC0077 Advanced Database Systems
Assignment Set 1 Roll No.

13

Allowlng Lhe sLrucLure of Lhe daLabase Lo mlrror Lhe sLrucLure of Lhe enLerprlse ls probably Lhe
number one advanLage of dlsLrlbuLed sysLems 1here are some dlsadvanLages Loo of whlch Lhe
blggesL ls Lhe facL LhaL dlsLrlbuLed sysLems are complex sofLware developmenL cosL greaLer
poLenLlal for bugs and lncrease processlng overhead
As per commerclal lmplemenLaLlons mosL of Loday's relaLlonal producLs offer some klnd of
dlsLrlbuLed daLabase supporL Some of Lhe besL known lnclude
(a) ln8LSS/S1A8 from 1he ASk Croup lnc's lngress ulvlslon
(b) Lhe dlsLrlbuLed daLabase opLlon of C8CALL8 or laLer from Cracle CorporaLlon and
(c) Lhe dlsLrlbuLed daLa faclllLy of u82 from l8M
lL ls worLh polnLlng ouL LhaL all of Lhe sysLems llsLed above boLh proLoLypes and producLs are
relaLlonal
C8ILC1IVLS
1 Local auLonomy
2 no rellance on a cenLral slLe
3 ConLlnuous operaLlon
4 LocaLlon lndependence
3 lragmenLaLlon lndependence
6 8epllcaLlon lndependence
7 ulsLrlbuLed query processlng
8 ulsLrlbuLed LransacLlons managemenL
9 Pardware lndependence
10 CperaLlng sysLem lndependence
11 neLwork lndependence
12 u8MS lndependence

lor dlsLrlbuLed LransacLlons each compuLer has a local ttoosoctloo moooqet When a LransacLlon
does work aL mulLlple compuLers Lhe LransacLlon managers lnLeracL wlLh oLher LransacLlon
managers vla elLher a superlor or subordlnaLe relaLlonshlp 1hese relaLlonshlps are relevanL only for
a parLlcular LransacLlon
Lach LransacLlon manager performs all Lhe enllsLmenL prepare commlL and aborL calls for lLs
enllsLed tesootce moooqets (usually Lhose LhaL reslde on LhaL parLlcular compuLer) 8esource
managers manage perslsLenL or durable daLa and work ln cooperaLlon wlLh Lhe u1C Lo guaranLee
aLomlclLy and lsolaLlon Lo an appllcaLlon
ln a dlsLrlbuLed LransacLlon each parLlclpaLlng componenL musL agree Lo commlL a change acLlon
(such as a daLabase updaLe) before Lhe LransacLlon can occur 1he u1C performs Lhe LransacLlon
coordlnaLlon role for Lhe componenLs lnvolved and acLs as a LransacLlon manager for each compuLer
LhaL manages LransacLlons When commlLLlng a LransacLlon LhaL ls dlsLrlbuLed among several
compuLers Lhe LransacLlon manager sends prepare commlL and aborL messages Lo all lLs
subordlnaLe LransacLlon managers ln Lhe twopbose commlt algorlLhm for Lhe u1C phase one
lnvolves Lhe LransacLlon manager requesLlng each enllsLed componenL Lo prepare Lo commlL ln
phase Lwo lf all successfully prepare Lhe LransacLlon manager broadcasLs Lhe commlL declslon

You might also like