You are on page 1of 42

Q.WhataredifferencesinCentralizedandDistributedDatabaseSystems?

Listtherelativeadvantagesofdatadistribution?

Adistributeddatabaseisadatabasethatisunderthecontrolofacentraldatabase
managementsystem(DBMS)inwhichstoragedevicesarenotallattachedtoa
commonCPU.Itmaybestoredinmultiplecomputerslocatedinthesamephysical
location,ormaybedispersedoveranetworkofinterconnectedcomputers.

Collectionsofdata(e.g.inadatabase)canbedistributedacrossmultiplephysical
locations.AdistributeddatabasecanresideonnetworkserversontheInternet,on
corporateintranetsorextranets,oronothercompanynetworks.Thereplicationand
distributionofdatabasesimprovesdatabaseperformanceatenduserworksites.

Toensurethatthedistributivedatabasesareuptodateandcurrent,therearetwo
processes:
Replication
System maintains multiple copies of data, stored in different sites, for
fasterretrievalandfaulttolerance.
A relation or fragment of a relation is
replicated if it is stored
redundantlyintwoormoresites.
Fullreplicationof arelationisthecasewherethe relation isstored atall
sites.
Fully redundant databases are those in which everysitecontains acopy
oftheentiredatabase.

Fragmentation
Relationispartitionedintoseveralfragmentsstoredindistinctsites
Division of relation r into fragments
r1
,
r2
, ,
rn

which contain

sufficientinformationtoreconstructrelationr

MajorfeaturesofaDDBare:
Datastoredatanumberofsites,eachsitelogicallysingleprocessor
Sitesareinterconnectedbyanetworkratherthanamultiprocessor
configuration
DDBislogicallyasingledatabase(althougheachsiteisadatabasesite)
DDBMShasfullfunctionalityofaDBMS
kcbijay123@gmail.com

Totheuser,thedistributeddatabasesystemshouldappearexactlylikea
nondistributeddatabasesystem.

Advantagesofdistributeddatabasesystemsare:
DatasharingandDistributedControl:
The primary advantage to accomplishing data sharing by means of data
distribution is that each site is able to retain a degree of control over data
stored locally. In a centralized system, the database administrator of the
central site controls the database. In a distributed system, there is a global
database administrator responsible for the entire system. A part of these
responsibilitiesis delegatedto thelocal databaseadministratorforeachsite.
Depending upon the design of the distributed database system, each local
administrator may have a different degree of autonomy which is often a
majoradvantageofdistributeddatabases.
ReliabilityandAvailability:
If one site fails in distributed system, the remaining sites may be able to
continue operating. In particular, if data are replicated in several sites,
transaction needing a particulardataitemmayfindit inseveralsites.Thus,
thefailureofasitedoesnotnecessarilyimplytheshutdownofthesystem.
Although recoveryfromfailureismore complexindistributedsystemsthan
in a centralized system, the ability of most of the systems to continue to
operate despite failure of one site, results in increased availability.
Availability is crucial for database systems used for realtime applications.
Loss of access to data, for example, in an airline may result in the loss of
potentialticketbuyerstocompetitors.
SpeedupQueryProcessing:
If aqueryinvolves data atseveralsites,itmaybepossibletosplitthequery
intosubqueriesthatcanbeexecutedinparallelbyseveralsites.Suchparallel
computation allowsforfasterprocessingof ausers query. Inthosecasesin
which data is replicated, queries may bedirectedbythe system totheleast
heavilyloadedsites.
Disadvantagesofdistributeddatabasesystemsare:
*Complexity(greaterpotentialforbugsinsoftware)
*Costly.
*Distributionofcontrol(nosingledatabaseadministratorcontrolstheDDB)
*Security
*Difficulttochange
*Lackofexperience
kcbijay123@gmail.com


WhatisEER?
The Extended EntityRelationship (EER) model is a conceptual (or
semantic)datamodel,capableof describingthedatarequirementsforanew
informationsysteminadirectandeasytounderstandgraphicalnotation.
Data requirements for a database are described in terms of a conceptual
schema,usingtheEERmodel.
EERschemataarecomparabletoUMLclassdiagrams.
The EER model introduces the additional concepts of subclasses, superclasses,
specialization generalization, and attributes inheritance. The resulting model is
called the enhancedER or Extended ER model. It is used to model applications
more completely and accurately if needed. It includes some objectoriented
concepts,suchasinheritance.
WhyExtendtheERModel?
ERissuitablefortraditionalbusinessapplications
ERisnotsemanticallyrichenoughforadvancedapplications
ApplicationswhereERisinadequate

Geographicalinformationsystems
Searchengines
Datamining
Multimedia
CAD/CAM
Softwaredevelopment
Engineeringdesign...andothers

ERtoRelationalMappingAlgorithm(steps)
*WeusetheCOMPANYdatabaseexampletoillustratethemappingprocedure.
*TheCOMPANYERschemaisshowninFigure9.1,andthecorresponding
COMPANYrelationaldatabaseschemaisshowninFigure9.2toillustratethe
mappingsteps.
*Weassumethatthemappingwillcreatetableswithsimplesinglevalued
attributes.Therelationalmodelconstraints,whichincludeprimarykeys,unique
kcbijay123@gmail.com

keys(ifany),andreferentialintegrityconstraintsontherelations,willalsobe
specifiedinthemappingresults.

Step1:MappingofRegularEntityTypes.

For each regular (strong) entity type


E
in the ER schema,create arelation
R
that
includes all the simple attributes of
E
. Include only the simple component
attributes of a composite attribute. Choose one of the key attributes of
E
as the
primary key for
R
. If the chosen key of
E
is a composite, then the set of simple
attributesthatformitwilltogetherformtheprimarykeyof
R
.
If multiplekeyswereidentifiedfor
E
duringtheconceptualdesign,theinformation
describing the attributes that form each additional key is kept in order to specify
secondary (unique) keys of relation
R
. Knowledge about keys is also kept for
indexing purposes and other types of analyses. In our example, we create the
relationsEMPLOYEE,DEPARTMENT,andPROJECTinFigure
9.2 to correspond to the regular entity types EMPLOYEE, DEPARTMENT, and
PROJECTin Figure9.1.Theforeignkeyandrelationshipattributes,ifany,arenot
includedyettheywillbeaddedduringsubsequentsteps.

kcbijay123@gmail.com


These include the attributes Super_ssn and Dno of EMPLOYEE, Mgr_ssn and
Mgr_start_date of DEPARTMENT, and Dnum ofPROJECT.Inourexample, we
choose Ssn, Dnumber, and Pnumber as primary keys for the relations
EMPLOYEE, DEPARTMENT, and PROJECT, respectively. Knowledge that
Dnameof DEPARTMENTandPnameofPROJECTaresecondarykeysiskeptfor
possibleuselaterinthe design.Therelationsthatarecreatedfromthemappingof
entitytypesaresometimescalled
entityrelations
becauseeachtuplerepresentsan
entityinstance.TheresultafterthismappingstepisshowninFigure9.3(a).

Step2:MappingofWeakEntityTypes.
For each weak entitytype
W
intheERschemawithowner entitytype
E
,createa
relation
R
and include all simple attributes (or simple components of composite
attributes) of
W
as attributesof
R
. Inaddition,includeasforeignkeyattributes of
kcbijay123@gmail.com

R
,theprimarykeyattribute(s)oftherelation(s)thatcorrespondtotheownerentity
type(s) this takes care of mapping the identifying relationship type of
W
. The
primarykeyof
R
is thecombination oftheprimarykey(s) oftheowner(s)andthe
partialkeyoftheweakentitytype
W
,ifany.
If there is a weak entity type
E2
whoseowner isalsoaweakentitytype
E
1,then
E
1should bemappedbefore
E
2todetermineitsprimarykeyfirst.Inourexample,
we create the relation DEPENDENT in this step tocorrespondto theweak entity
type DEPENDENT (see Figure 9.3(b)).We include the primary key Ssn of the
EMPLOYEE relationwhich corresponds to the owner entity typeasaforeign
key attribute of DEPENDENTwe rename itEssn,althoughthisis notnecessary.
The primary key of the DEPENDENT relation is the combination {Essn,
Dependent_name},becauseDependent_name(alsorenamedfrom NameinFigure
9.1) is the partial key of DEPENDENT. It is common to choose the propagate
(CASCADE) option for the referential triggered action (see Section 4.2) on the
foreign key in the relation corresponding to the weak entity type, since a weak
entity has an existence dependency onitsowner entity.Thiscanbeused forboth
ONUPDATEandONDELETE.

kcbijay123@gmail.com

Step3:MappingofBinary1:1RelationshipTypes.

For each binary 1:1relationshiptypeR intheER schema,identifytherelationsS


and T that correspond to the entity types participating in R. There are three
possibleapproaches:(1)theforeign
key approach, (2) the merged relationshipapproach,and(3) thecrossreferenceor
relationshiprelationapproach.Thefirstapproachisthemostusefulandshouldbe
followedunlessspecialconditionsexist,aswediscussbelow.

1. Foreign key approach:


Choose one of the relationsS, sayand include as a
foreignkeyinStheprimarykeyofT.Itisbettertochooseanentitytypewithtotal
participation in R in the role of S. Include all the simple attributes (or simple
components of composite attributes)ofthe 1:1relationship type Ras attributesof
S. In our example, we mapthe1:1relationshiptypeMANAGES fromFigure 9.1
by choosingtheparticipatingentitytypeDEPARTMENTtoservein the role ofS
because its participation in the MANAGES relationship type is total (every
department has a manager). We include the primary key of the EMPLOYEE
relationasforeign key intheDEPARTMENTrelationandrenameitMgr_ssn.We
also includethesimpleattributeStart_date oftheMANAGESrelationshiptypein
the DEPARTMENT relation and rename it Mgr_start_date (see Figure9.2). Note

kcbijay123@gmail.com

that it is possible to include the primary key of S as a foreign key in T instead.

In our example, this amounts to having a foreign key attribute, say


Department_managed in theEMPLOYEErelation,butit will haveaNULLvalue
for employee tuples who do not manage a department. If only 2 percent of
employees manage a department, then 98 percent of the foreign keys would be
NULL in this case. Another possibilityis tohaveforeignkeysinbothrelationsS
andTredundantly,butthiscreatesredundancyandincursapenaltyforconsistency
maintenance.

2. Merged relation approach:


An alternative mapping ofa1:1relationshiptypeis
to merge the two entity types and the relationship into a single relation. This is
possible when both participations are total, as this would indicate that the two
tableswillhavetheexactsamenumberoftuplesatalltimes.

3.Crossreferenceorrelationshiprelationapproach:
The third optionistosetupa
third relation R for the purpose of crossreferencing the primary keys of the two
relations S and T representing the entity types.As we will see, this approach is
requiredforbinaryM:Nrelationships.TherelationRis
kcbijay123@gmail.com

called a relationship relation (orsometimes alookuptable),becauseeachtuplein


R represents a relationship instance that relates one tuple from S with one tuple
from T. TherelationRwillincludetheprimarykeyattributesofSandTasforeign
keystoSandT.TheprimarykeyofRwillbeoneofthetwoforeignkeys,andthe
other foreign key will be a unique key of R. The drawback is having an extra
relation,andrequiringanextrajoinoperation whencombiningrelatedtuplesfrom
thetables.

Step4:MappingofBinary1:NRelationshipTypes.
For each regular binary 1:N relationship type R, identify the relation S that
represents the participating entity type at the Nside of the relationship type.
Include as foreign key in S the primary key of the relation T that represents the
other entitytypeparticipatinginR wedothisbecauseeachentity instanceonthe
Nside is related to at most one entity instance on the 1side of the relationship
type.Includeanysimple attributes(orsimple components ofcompositeattributes)
ofthe 1:NrelationshiptypeasattributesofS.Inourexample,wenowmapthe1:N
relationship types WORKS_FOR,CONTROLS, andSUPERVISION fromFigure
9.1. For WORKS_FOR we include the primary key Dnumber of the
DEPARTMENT relation as foreign key in the EMPLOYEE relation and call it
Dno.ForSUPERVISIONweincludethe primarykey oftheEMPLOYEErelation
as foreign key in the EMPLOYEE relation itselfbecause the relationship is
recursive and call it Super_ssn. The CONTROLS relationship is mapped to the
foreign key attribute Dnum of PROJECT, which references the primary key
Dnumber oftheDEPARTMENTrelation.These foreign keys are showninFigure
9.2. An alternative approach is to use the relationship relation (crossreference)
option as in the third option for binary 1:1 relationships. We create a separate
relation R whose attributes are the primary keys of S and T, which will also be
foreignkeystoSandT.TheprimarykeyofRisthesameastheprimarykeyofS.
This option can be used if few tuples in S participate inthe relationship toavoid
excessiveNULLvaluesintheforeignkey.

Step5:MappingofBinaryM:NRelationshipTypes.
For each binary M:N relationship type R, create a new relation S to represent R.
Include as foreign key attributes in S the primary keys of the relations that
represent the participating entity types their combination will form the primary
keyof S.AlsoincludeanysimpleattributesoftheM:Nrelationshiptype(orsimple
components of composite attributes) as attributes of S. Notice that we cannot
kcbijay123@gmail.com

represent an M:N relationship type by a single foreign keyattributein one ofthe


participating relations (as we didfor1:1 or1:Nrelationshiptypes)becauseof the
M:N cardinality ratio we must create a separate relationship relation S. In our
example, we map the M:N relationship type WORKS_ON from Figure 9.1 by
creating the relation WORKS_ON in Figure 9.2.We include the primary keys of
the PROJECT and EMPLOYEE relations as foreign keys in WORKS_ON and
rename them Pno and Essn, respectively.We also include an attribute Hours in
WORKS_ONtorepresentthe Hoursattributeoftherelationshiptype.Theprimary
key of the WORKS_ON relation is the combination of the foreign key attributes
{Essn, Pno}. This relationship relation is shown in Figure 9.3(c). The propagate
(CASCADE)optionforthereferential triggeredaction (see Section4.2)shouldbe
specifiedontheforeignkeysintherelationcorrespondingtothe
relationship R, since each relationship instance has an existence dependency on
each of the entities it relates. This can be used for both ON UPDATE and ON
DELETE. Notice that we can always map 1:1 or 1:N relationships in a manner
similar to M:N relationships by using the crossreference (relationship relation)
approach, as we discussedearlier.This alternativeis particularly usefulwhen few
relationshipinstances exist, inorder toavoidNULLvaluesinforeignkeys.Inthis
case, the primary key of the relationship relation will be only one of the foreign
keys that reference the participating entity relations. For a 1:N relationship, the
primary key of the elationship relation will be the foreign key that referencesthe
entity relation ontheNside. For a1:1 relationship,eitherforeign keycanbeused
astheprimarykeyoftherelationshiprelation.

Step6:MappingofMultivaluedAttributes.
For each multivalued attribute A, create a new relation R. This relation R will
include an attribute corresponding to A, plus the primary key attribute Kas a
foreignkeyin Roftherelationthatrepresentstheentitytypeorrelationshiptype
thathasAasamultivaluedattribute.TheprimarykeyofRisthecombinationofA
andK.If themultivaluedattributeiscomposite,weincludeitssimplecomponents.
Inour example, wecreatearelationDEPT_LOCATIONS(seeFigure9.3(d)).The
attribute Dlocation represents the multivalued attribute LOCATIONS of
DEPARTMENT, while Dnumberas foreignkeyrepresents theprimarykeyof
the DEPARTMENT relation. The primary key of DEPT_LOCATIONS is the
combination of {Dnumber, Dlocation}. A separate tuple will exist in
DEPT_LOCATIONS for each location that a department has. The propagate
(CASCADE) option for the referential triggeredaction shouldbespecifiedonthe
foreign key in the relation R corresponding to the multivalued attribute for both
kcbijay123@gmail.com

10

ON UPDATE and ON DELETE. We should also note that the key of R when
mapping acomposite,multivaluedattributerequires someanalysisof themeaning
of the component attributes. In some cases, when a multivalued attribute is
composite, onlysomeofthecomponentattributesarerequiredtobepartofthekey
of R these attributes are similar to a partial key of a weak entity type that
corresponds to the multivalued attribute. Figure 9.2 shows the COMPANY
relational databaseschemaobtainedwithsteps1through6,andFigure3.6showsa
sample database state. Notice that we did not yet discuss the mapping of nary
relationship types (n > 2)becausenone existinFigure9.1 theseare mapped ina
similarwayto M:Nrelationshiptypesbyincludingthefollowingadditionalstepin
themappingalgorithm.

Step7:MappingofNaryRelationshipTypes.
For each nary relationship type R, where n > 2, create a new relation S to
represent R. Include asforeignkeyattributesinStheprimarykeysoftherelations
that represent the participating entity types. Also include any simpleattributesof
the nary relationship type (or simple components of composite attributes) as
attributes of S. The primary key of S is usually a combination of all the foreign
keys that reference the relations representing the participating entity types.
However,if the cardinalityconstraintson any oftheentitytypesEparticipatingin
R is 1, then the primarykeyof Sshould not includetheforeignkeyattributethat
references the relation E_ corresponding to E (seethediscussion inSection7.9.2
concerningconstraintsonnaryrelationships).
For example, consider the relationship type SUPPLY in Figure 7.17.Thiscanbe
mapped to the relation SUPPLY shown in Figure 9.4, whose primary key is the
combinationofthethreeforeignkeys{Sname,Part_no,Proj_name}.

0691.)Explainthefollowingterms
DataMining
ECAmodel

Spatialdatabase

Spatial databases provide concepts for databases that keep track of objects in a
multidimensionalspace.

kcbijay123@gmail.com

11


For example,
cartographic databases that store maps include
twodimensional spatialdescriptions oftheirobjectsfromcountriesandstatesto
rivers,cities,roads,seas,andsoon.Thesedatabasesareusedinmanyapplications,
suchasenvironmental,emergency,andbattlemanagement.

Otherdatabases, such asmeteorologicaldatabasesforweatherinformation,


arethreedimensional,sincetemperaturesandothermeteorologicalinformationare
relatedtothreedimensionalspatialpoints.

Ingeneral,aspatialdatabasestores objects that havespatialcharacteristics


that describe them. Thespatialrelationshipsamongtheobjectsare important,and
theyareoftenneededwhen queryingthedatabase.Althoughaspatialdatabasecan
ingeneral refertoanndimensionalspaceforanyn,wewilllimitourdiscussionto
twodimensionsasanillustration.

Themainextensionsthatareneededforspatialdatabasesaremodelsthatcan
interpretspatialcharacteristics. Inaddition,special indexingandstoragestructures
areoftenneededtoimproveperformance.

SpecializationandgeneralizationinanERRmodel

The ER Model has the power of expressing database entities in a conceptual


hierarchical manner. As thehierarchygoesup,it generalizes theview ofentities,
andaswegodeepinthehierarchy,itgivesusthedetailofeveryentityincluded.
Generalization
Theprocessof generalizingentities,wherethe
generalized entities contain the properties of
all the generalized entities, is called
generalization. In generalization, a number of

kcbijay123@gmail.com

12

entities are brought together into one generalized entity based on their similar
characteristics. For example, pigeon, house sparrow, crow and dove can all be
generalizedasBirds.
Specialization
Specialization is the opposite of generalization. In
specialization, a group of entities is divided into
subgroups based on their characteristics. Take a
groupPersonfor example. Apersonhasname,date
ofbirth, gender,etc. Thesepropertiesarecommonin
allpersons,humanbeings.Butinacompany,persons
canbe identifiedasemployee,employer,customer,orvendor,basedonwhatrole
they play in the company.Similarly, in a school database, persons can be
specializedasteacher,student,orastaff,basedonwhatroletheyplayinschoolas
entities.

XMLandHTML

KeyDifference:HTMLisamarkuplanguagethatisusedtodesignwebpages.Itis
writteninpredefinedtagelements.Itsprimarypurposeistodisplaydatawithfocus
on how the data looks. XML is a markup language whose primary purpose is to
transport and storedata. Itisalanguagethatcanbeusedtodevelopnewlanguages
anddefineotherlanguages.Itdoesnothaveapredefinedsetoftags,andallowsthe
developertocustomizetags.

kcbijay123@gmail.com

13

HyperTextMarkupLanguage (HTML)isa wellknown markup languageusedto


develop web pages. It has been around for a long time and is commonly used in
webpage design. XML or Extensible Markup Language defines a set of rulesfor
encodingdocumentsinaformatthatcanbereadbyboth,humanandcomputer.

HTML is written using HTML elements, which consist of tags, primarily an


opening tag and a closing tag. The databetweenthesetagsisusually thecontent.
Themain objectiveofHTMListoallowwebbrowserstointerpretanddisplaythe
content written between the tags. The tags are designed to describe the page
content.HTML comeswithpredefinedtags.Thesedays,webpagesarerarelyonly
designedusingHTML.

Definition

HTML

XML

Markuplanguage
fordisplayingweb
pagesinaweb
browser.Designed
todisplaydatawith
focusonhowthe
datalooks

Markuplanguagedefinesasetof
rulesforencodingdocumentsthat
canbereadbybothhumansand
machines.Designedwithfocuson
storingandtransportingdata.

Datewheninvented 1990

1996

Extendedfrom

SGML

SGML

Type

Static

Dynamic

Usage

Displayawebpage Transportdatabetweenthe
applicationandthedatabase.To
developothermarkuplanguages.

Processing/Rules

Nostrictrules.
Strictrulesmustbefollowedor
Browserwillstill
processorwillterminateprocessing
generatedatatothe thefile
bestofitsability

kcbijay123@gmail.com

14

Languagetype

Presentation

Neitherpresentation,nor
programming

Tags

Predefined

Customtagscanbecreatedbythe
author

WhiteSpace

Cannotpreserve
whitespace

Preserveswhitespace

Limitations

Datadoesnotknow
itselfverywell.
Datacannotchange
inresponseto
environment.Data
cannotbeeasily
maintained.Cannot
storeorcallon
variables.Lacksthe
capabilitytodefine
newstructuresby
defining
relationships
betweenclasses.
Tagsarenotuseful
forexchangingthe
documentbetween
applications.

Cannotbeusedasasubtypeofa
sql_variantinstance.
Doesnotsupportcastingor
convertingtoeithertextornon
text.Doesnotsupportthe
followingcolumnandtable
constraints.XMLprovidesitsown
encoding.Collationsapplyto
stringtypesonly.Cannotbe
comparedorsorted.Cannotbe
usedinDistributedPartitioned
Views.Notwellsupportedby
browsers.

GIS

DataMining:
Data Mining is the analytic Process. It isdesigned toexplorethedatausually big
data in search of consistent patterns and/or systematic relationships between
kcbijay123@gmail.com

15

variables and then tovalidatethefindingsbyapplyingthedetectedpatternstonew


subsets of data.Data mining refersto theminingor discoveryof newinformation
in terms of patterns or rules from vast amounts of data. To be practically useful,
dataminingmustbecarriedout efficientlyonlargefilesanddatabases.Todate,it
isnotwellintegratedwithdatabasemanagementsystems.

ECAModel
Themodelthathas beenusedforspecifying activedatabaserules isreferredto as
the EventConditionAction, or ECA model. A rule in the ECA model has three
components:
1. 1. The event (or events) that trigger the rule: These events are usually
database update operations that are explicitly applied to the database.
However, in the general model,theycouldalsobetemporaleventsor other
kindsofexternalevents.
2. The condition that determines whether the rule action should be executed:
Once the triggering event has occurred, an optional condition may be
evaluated. If no condition is specified, theactionwillbeexecuted oncethe
event occurs. If a condition is specified, it is first evaluated, and only if it
evaluatestotruewilltheruleactionbeexecuted.
3. Theactiontobetaken: The actionis usuallya sequenceofSQLstatements,
butitcouldalsobeadatabasetransactionoranexternalprogramthatwillbe
automaticallyexecuted.

SpatialDatabase
Spatial databases provide concepts for databases that keep track of objects in a
multi
dimensionalspace.
For example, cartographic databases that store maps include
twodimensional spatial descriptions of their objectsfrom countries and
states to rivers, cities, roads, seas, and so on. These databases are used in
many applications, such as environmental, emergency, and battle
management.
Other databases, such as meteorological databasesfor weatherinformation,
are threedimensional, since temperatures and other meteorological
informationarerelatedtothreedimensionalspatialpoints.
In general, a spatial database stores objects that havespatialcharacteristics
that describe them. The spatial relationships among the objects are
important,andthey areoften neededwhenqueryingthedatabase.Although
kcbijay123@gmail.com

16

a spatial database can in general refer toanndimensionalspaceforanyn,


wewilllimitourdiscussiontotwodimensionsasanillustration.
The main extensions that are needed for spatial databases are models that
caninterpretspatialcharacteristics.Inaddition,specialindexingandstorage
structuresareoftenneededtoimproveperformance.

Q071,6)whataretheadvantageanddisadvantageofOODBMS?

Advantages

1.Improvedsoftwaredevelopmentproductivity:
Objectoriented programming is modular, as it provides separation of duties in
objectbasedprogramdevelopment.Itisalsoextensible,asobjectscanbeextended
to include new attributes and behaviors. Objects can also be reused within an
across applications. Becauseofthese threefactorsmodularity, extensibility, and
reusability

objectoriented
programming
provides
improved
softwaredevelopment productivity over traditionalprocedurebasedprogramming
techniques.

2.Improvedsoftwaremaintainability:
For the reasons mentioned above, object oriented software is also easier to
maintain.Since thedesignis modular,partofthesystemcanbeupdatedincaseof
issueswithoutaneedtomakelargescalechanges.

3.Fasterdevelopment:
Reuse enables faster development. Objectoriented programming languagescome
withrichlibrariesofobjects,andcodedevelopedduringprojectsisalsoreusablein
futureprojects.

4.Lowercostofdevelopment:
The reuse ofsoftwarealsolowersthecostof development. Typically, moreeffort
is put into theobjectorientedanalysisanddesign,whichlowerstheoverallcostof
development.

5.Higherqualitysoftware:
Faster development of software and lower cost of developmentallowsmoretime
and resources to be used in the verification of the software. Although quality is
kcbijay123@gmail.com

17

dependentupontheexperienceoftheteams,objectorientedprogrammingtendsto
resultinhigherqualitysoftware.

6.
Moreexpressivequerylanguage
Navigational accessfrom theobjectisthemostcommon formofdataaccessinan
OODBMS. ThisisincontrasttotheassociativeaccessofSQL(thatis,declarative
statementswithselection basedon one ormorepredicates).Navigationalaccessis
moresuitableforhandlingpartsexplosion,recursivequeries,andsoon.

7.Capableofhandlingalargevarietyofdatatypes
Unliketraditional databases(suchashierarchical,networkorrelational),theobject
oriented database are capable of storing different types of data, for example,
pictures,voicevideo,includingtext,numbersandsoon.
DisadvantagesofOODBMSs
TherearefollowingdisadvantagesofOODBMSs:
1. Lack of universal data model:
There is no universally agreeddatamodel
for an OODBMS, and most models lack a theoretical foundation. This
.disadvantage is seen as a significant drawback, and is comparable to
prerelationalsystems.
2. Lack of experience: In comparison to RDBMSs the use of OODBMS is
still relatively limited. This means that we do not yet have the level of
experience that we have with traditional systems. OODBMSs are stillvery
much geared towards the programmer, rather thanthe naveenduser.Also
there is a resistance to the acceptance of the technology. While the
OODBMS is limited to a small nichemarket,thisproblem will continueto
exist

kcbijay123@gmail.com

18

3. Lack ofstandards:There isagenerallackofstandardsofOODBMSs.We


have already mentioned that there is not universally agreed data model.
Similarly,thereisnostandardobjectorientedquerylanguage.
4. Competition:PerhapsoneofthemostsignificantissuesthatfaceOODBMS
vendors is the competition posed by the RDBMS and the emerging
ORDBMS products. These products have an established user base with
significant experience available. SQL is an approved standard and the
relational data model has a solid theoretical formation and relational
productshavemanysupportingtoolstohelp.bothendusersanddevelopers.
5. Query optimization compromises encapsulations: Query optimization
requires. An understanding of the underlying implementation to access the
database efficiently. However, this compromises the concept of
encapsulation.
6. Complexity: The increased functionality provided by the OODBMS (such
as the illusion of a singlelevel storage model, pointer sizzling,
longduratipntransactions,
version
management,
and
schema
evolutionmakesthe systemmorecomplexthanthatof traditionalDBMSs.
In complexity leads to products that are more expensive andmoredifficult
touse.
7. Larger program size: Objectoriented programs typically involve more
linesofcodethanproceduralprograms.
8. Lack of support for views: Currently, most OODBMSs do not provide a
view mechanism, which, as we have seen previously, provides many
advantages such as data independence, security, reduced complexity, and
customization.
9. Lack of support for security:
Currently, OODBMSs do not provide
adequate security mechanisms. The user cannot grant access rights on
individualobjectsorclasses.
10.Not suitable for all types of problems: There are problems that lend
themselves well to functionalprogramming style,logicprogrammingstyle,
or procedurebased programming style, and applying objectoriented
programminginthosesituationswillnotresultinefficientprograms.
kcbijay123@gmail.com

19

Q 069,8070,4) Differentiate between object oriented database and relational


database.
RelationalvsObjectOriented
RDs:
Mature
Extensivelytested
Vastamountsofdatainthisformatalready
Programmersknowhowtooptimizeforhighspeedretrieval

OODs:
New
hereisageneralshortageofexperienced,qualityprogrammers
Lackconsensusonstandards,definitions,etc.
Performanceconcerns

Q071,3)Distinguishbetweenpersistentandtransientobjects.

PersistentObject

TransientObject

A
persistentobjectisaninstanceofa
class in the domain model that
represents
some
information
extractedfromthedatabase.

A
transientobject isan instanceofa
class in the domain model, which is
createdinmemory

Persistent objects have permanent Transient objects are the objects


memory they remain in memory which lie in application memory,
untiltheyareexplicitly
kcbijay123@gmail.com

20

removed.

once application is ended this object


alsogetvanished.

Persistentobjects areobjectsthatare Transient objects cannot be


boundtoDBObject.
converted to persistent objects as
theyhave theirlifetimedefinedatthe
timeoftheirinstantiation.
Persistence means, usingserializable Transients are non serializable
interface,
storing
objects objects.
permanentlyintheharddisk
Data that is not changed and where Data is stored in the class so the
static binding is applied is called object of that class having dynamic
persistentbaseclassobject.
binding is called transient class
object.
Persistentisrelatedtostatic.

Transientisrelatedtodynamic.

Persistentobjectsareonheap.

Transient objects are in the transient


memory.

Note: Persistentobjectswhen calltransient objects,firstit isloadedintomemory.


Afterprocessatransientobjectscanbestoredaspersistentobjectsinharddisk.

Q 2070 5) discuss some application of active database. How do spatial


databasedifferfromregulardatabase?

Anactivedatabasesystem(ADBS)isaDBSthatmonitorssituations
ofinterestand,whentheyoccur,triggersanappropriateresponseina
timelymanner.

kcbijay123@gmail.com

21

The desired behavior is


expressed in production rules
(alsocalled
eventconditionaction rules),
which are defined and stored in
theDBS.
This has the benefits that the
rules can be shared by many
application
programs, and the DBS can
optimizetheirimplementation.

Applications
Productioncontrol,e.g.,powerplants,...
Maintenancetasks,e.g.,inventorycontrol,...
Financialapplications,e.g.,stock&bondtrading,...
Networkmanagement
Airtrafficcontrol
Programtrading
ComputerIntegratedManufacturing(CIM)

Q 071 ,4)Discusshowtimeisrepresentedin temporaldatabase andcompare


thedifferenttimedimensions.

Fortemporaldatabases, timeisconsideredto bean


orderedsequence
of
points
in
some
granularity
thatisdeterminedbytheapplication.Forexample,supposethat
some temporal applicationneverrequirestime unitsthatare less than one second.
Then, each time point represents one second in time using this granularity. In
reality, each second is a(short)
timeduration,
notapoint,since itmaybe further
dividedintomilliseconds,microseconds,andsoon.

kcbijay123@gmail.com

22

Because there is no known beginning or ending of time, one needs a reference


point from which to measure specific time points. Various calendars are used by
variouscultures.
InSQL2,thetemporaldatatypesincludeDATE(specifyingYear,Month,andDay
as YYYYMMDD), TIME (specifying Hour, Minute, and Second as
HH:MM:SS), TIMESTAMP (specifying a Date/Time combination, with options
forincludingsubseconddivisionsiftheyareneeded),INTERVAL(arelativetime
duration, such as 10 days or 250 minutes), and PERIOD (an
anchored
time
durationwithafixedstartingpoint,suchasthe10dayperiodfromJanuary1,1999
toJanuary10,1999,inclusive).

TimeDimensions
Themost naturalinterpretationisthattheassociated timeisthetimethattheevent
occurred,or the periodduringwhichthefactwasconsideredto betrue
in thereal
world.
If this interpretation is used, the associated time is oftenreferredto asthe
valid time.
A temporal database using this interpretation is called a valid
time
database.
However,a differentinterpretationcanbeused,wheretheassociatedtimerefersto
thetimewhen theinformation was actually storedin thedatabasethatis,itis the
value ofthesystemtimeclockwhenthe information isvalid
inthe system
.Inthis
case,theassociatedtime iscalledthe
transactiontime.
Atemporaldatabaseusing
thisinterpretationiscalleda
transactiontimedatabase.
Other interpretations can also be intended, but these two areconsidered tobethe
most common ones, and they are referred to as
time dimensions.
In some
applications, only one of the dimensions is needed and in other cases both time
dimensions are required, in which case the temporal database is called a
bitemporal database.
If other interpretations are intended for time, the user can
define the semantics andprogramtheapplicationsappropriately,andit iscalled a
userdefinedtime.

kcbijay123@gmail.com

23

070 10) Enumerate the limitation of conventional database compared to


multimediadatabase
The incorporation of multimedia database systems will improve the quantity and
qualityof information manipulatedby computerusersinallfields,computeraided
design, and information retrieval. The area of intelligent multimedia content
analysis and retrieval techniques is an emerging discipline. Techniques for
representing and extracting semantic information from media such as speech,
images,andvideoarerequired.
Whenamultimediaapplicationlacksa database,thedatastructure isburiedinthe
script, where all of its value is lost. This omission also makes the script more
complicated and less flexible. Using a multimedia database makes the data
structure logic available to othermultimediaapplicationsandsimplifies thescript
so that manyscriptscansharethesamemultimediametadata.Inaddition, whena
multimedia or abstract data database is organized and annotated for one
application,otherapplicationscanusethoseannotationswithoutgoingthroughthe
same timeconsumingprocess.This capabilityaddsgreat valuetothedatathrough
reuseandcontrolledredundancy.
When multimedia application content is controlled by the multimedia database,
multimedia content can be added, deleted, or modified without modifying the
application script. For example, interactive kiosks that display, describe, and
demonstrate products can be updated automatically without reprogramming the
application script. Furthermore, a multimedia application such as a multimedia
textbook canactuallycontroltheoperation ofbooktopicsthathavethesamelook
andfeel.Thiscontrolletsthescriptperformasatemplate:Anentireseriesofmath
textbooks (algebra, calculus, trigonometry, and geometry), including text and
video, can use the same multimedia application because all data is physically
separate.
Search and retrieval operations are critical in interactive multimedia applications
they must be equally efficient and powerful. Search and retrieval of multimedia
andabstractdatais challenging,butmultimediadatabasesmakeitfeasiblethrough
internal storage formatflexibilityandefficient operation. The DBMS shouldhave
kcbijay123@gmail.com

24

significantknowledgeaboutthedataandits structureto enablepowerfulsemantic


optimizationsand intelligentsearches.Searchandretrievaloperationsalsogivethe
application access to media components so that they can be dynamically and
seamlesslyprocessedwhennecessary.

Q model 069,9070,8) What is data warehouse? listthecharacteristicofdata


warehouse?howitisdifferfromdatabases.

A datawarehouse isacentralrepository forallor significantparts ofthedatathat


anenterprise'svariousbusinesssystemscollect. Datawarehousingemphasizesthe
capture of data from diverse sources for useful analysis and access, but does not
generally start from the pointofview of the end user who may need access to
specialized, sometimes local databases. The latter ideaisknown asthedatamart.
Typically, a data warehouse is housed on an enterprise mainframe server or
increasingly,in thecloud. Datafromvariousonlinetransactionprocessing(OLTP)
applications and other sources is selectively extracted for use by analytical
applicationsanduserqueries.
characteristicofdatawarehouse
Subject Oriented A data warehouse is subject oriented because it
provides information around a subject rather than the organization's
ongoing operations. These subjects can be product, customers, suppliers,
sales, revenue, etc. A data warehouse does not focus on the ongoing
operations, rather it focusesonmodellingand analysisofdatafordecision
making.

kcbijay123@gmail.com

25

Integrated A data warehouse is constructed by integrating data from


heterogeneous sources such as relational databases, flat files, etc. This
integrationenhancestheeffectiveanalysisofdata.
Time VariantThedatacollected inadatawarehouseis identifiedwitha
particular time period. The data in a data warehouse provides information
fromthehistoricalpointofview.
Nonvolatile Nonvolatile means the previous data is not erased when
new data is added to it. A data warehouse is kept separate from the
operationaldatabaseandtherefore frequentchangesinoperationaldatabase
isnotreflectedinthedatawarehouse.
DatawarehouseVSDatabase
Sr.N

DataWarehouse(OLAP)

OperationalDatabase(OLTP)

o.

It involves historical processing Itinvolvesdaytodayprocessing.


ofinformation.

OLAP systems are used by

OLTPsystemsareusedbyclerks,

knowledge workers such as DBAs,ordatabaseprofessionals.


executives,

managers,

and

analysts.

kcbijay123@gmail.com

26

Itisusedtoanalyzethebusiness. Itisusedtorunthebusiness.

ItfocusesonInformationout.

ItfocusesonDatain.

It is based on Star Schema,

It isbased onEntityRelationship

Snowflake Schema, and Fact Model.


ConstellationSchema.

ItfocusesonInformationout.

Itisapplicationoriented.

Itcontainshistoricaldata.

Itcontainscurrentdata.

It provides summarized and It provides primitive and highly


consolidateddata.

10

11

detaileddata.

It provides summarized and It provides detailed and flat


multidimensionalviewofdata.

relationalviewofdata.

The number of users is in

The number of users is in

hundreds.

thousands.

The number of records accessed The number of records accessed


isinmillions.

kcbijay123@gmail.com

isintens.

27

12

13

Thedatabasesizeisfrom100GB

The database size is from 100

to100TB.

MBto100GB.

Thesearehighlyflexible.

Itprovideshighperformance.

06910)Explainmobilecomputingarchitecturewithsuitablediagram
The general architecture of a mobile platform is illustrated in Figure 29.1. It is a
distributed architecture where a number of computers, generally referred to as
Fixed Hosts and Base Stations, are interconnected through a highspeed wired
network.Fixed hostsaregeneralpurposecomputersthatarenottypicallyequipped
to manage mobile units but can be configured to do
so.
Base stations functionas
gateways to the fixed network for the Mobile Units. They are equipped with
wireless interfaces and offer network access services of which mobile units are
clients.
Wireless Communications. The wireless medium on whichmobileunitsandbase
stations communicate have bandwidths significantly lower than those of a wired
network. The current generation of wireless technology has data rates that range
from thetenstohundredsofkilobitsper second(2Gcellulartelephony)to tens of
megabits per second (wireless Ethernet, popularly known as WiFi). Modem
(wired) Ethernet, by comparison, provides data rates on the order of hundreds of
megabitspersecond.
Besides data rates, other characteristics also distinguish wireless connectivity
options. Some of these characteristics include range, interference, locality of
access, and support for packet switching. Some wireless access options allow
seamless roaming throughout a geographical region (e.g., cellular networks),
whereas WiFi networks are localized around a base station. Some wireless
networks, such as WiFi and Bluetooth, use unlicensed areas of the frequency

kcbijay123@gmail.com

28

spectrum, which may cause interference with other appliances, such as cordless
telephones. Finally, modem wireless networks can transfer data in units called
packets, that are commonly used in wired networks in order to conserve
bandwidth. Wireless applications must consider these characteristics when
choosing a communication option. For example, physical objects block infrared
frequencies. While inconvenient for some applications, such blockage allows for
secure
wireless
communications within a
closedroom.

Client/Network
Relationships.
Mobile
units canmovefreelyina
geographic
mobility

domain, an area that is


circumscribed by wireless
network coverage. To
manage the mobility of
units,
the
entire
geographic
mobility
domainisdividedintoone
or more smaller domains, called cells, each of which is supported byatleastone
basestation.The
mobile discipline requires that the movement of mobile units be unrestricted
throughout the cells of a geographic mobility domain, while maintaining
informationaccesscontiguityLe.,movement,especiallyintercellmovement,does
not negatively affect the data retrieval process. The communication architecture
just described is designed to give the
mobile unit the impression that it is
attachedtoafixednetwork,emulating
a traditionalclientserverarchitecture.

kcbijay123@gmail.com

29

Wireless communications, however, make other architectures possible. One


alternative is a mobile adhoc network (MANET), illustrated in Figure 29.2.In a
MANET,colocatedmobile unitsdonotneedtocommunicateviaafixednetwork,
butinstead, formtheirownusing costeffectivetechnologiessuch asBluetooth.In
a MANET, mobile units are responsible for routing their own data, effectively
actingasbasestationsaswellasclients.Moreoever,theymustberobustenoughto
handle changes in the network topology, such as the arrival ordeparture ofother
mobileunits.MANETapplicationscanbeconsideredaspeertopeer,meaningthat
a mobile unit is simultaneously a client and a server. Transaction processingand
data consistency control becomemore difficult sincethereis nocentralcontrolin
this architecture. Resource discovery and data routing by mobile units make
computingin aMANETevenmorecomplicated.SampleMANETapplicationsare
multiusergames,sharedwhiteboards,distributedcalendars,andbattleinformation
sharing. The expectation is that these networks and related applications will
becomedominant inafewyears.CurrentlyMANETsareanactiveresearchareain
both academia and industry. This research is still in its infancy, so the following
discussion will focus on the basic mobile computing architecture described
previously.

0719)Describethecharacteristicsofmobilecomputingenvironmentindetail.
As we discussed in the previous section, the characteristics of mobile computing
include high communication latency, intermittent wireless connectivity, limited
battery life, and, of course, changing client location. Latency is caused by the
processes unique tothewirelessmedium,suchascodingdataforwirelesstransfer,
andtrackingandfilteringwireless
signalsat thereceiver.Batterylifeisdirectlyrelatedto batterysize,andindirectly
related to the mobile device's capabilities. Intermittent connectivity can be
intentionalor unintentional. Unintentionaldisconnectionshappeninareaswireless
signals cannot reach, e.g., elevator shafts or subway tunnels. Intentional
disconnectionsoccurbyuserintent,

kcbijay123@gmail.com

30

e.g., during an airplane takeoff, or when the mobile device is powered down.
Finally, clients are expected tomove,whichaltersthenetworktopologyandmay
cause their data requirements to change. All of these characteristics impact data
management, and robust mobile applications must consider them in their design.
Tocompensateforhighlatenciesandunreliableconnectivity,clientscachereplicas
of important, frequently accessed data, and work offline, if necessary. Besides
increasing data availability and response time, caching can also reduce client
powerconsumptionby
eliminating the need to make energyconsuming wireless data transmissions for
eachdata access.On theother hand,theservermaynotbeabletoreachaclient.A
client may be unreachable because it is dozingin an energyconserving state in
which many subsystems are shut downor because it is out of range of a base
station. In either case, neither client nor server can reach the other, and
modifications must be made to the architecture in order to compensate for this
case.Proxiesforunreachablecomponentsareaddedtothearchitecture.Foraclient
(andsymmetricallyforaserver),theproxycan
cache updates intended for the server. When a connectionbecomes available, the
proxyautomaticallyforwardsthesecachedupdatestotheirultimatedestination.As
suggestedabove,mobilecomputing poseschallengesforserversaswellasclients.
The latency involved in wireless communication makes scalability a problem.
Becauselatencydueto wirelesscommunicationsincreasesthetimetoserviceeach
client request, the server can handle fewer clients. One way servers relieve this
problemisbybroadcastingdatawheneverpossible.Broadcasttakesadvantageofa
natural characteristic of radio communications, and is scalable because a single
broadcast of a data item can satisfy all outstanding requests for it. For example,
insteadof sending weather informationtoallclients inacellindividually,aserver
cansimplybroadcastitperiodically. Broadcastalsoreducestheloadontheserver,
asclientsdonothavetomaintainactiveconnectionstoit.
Client mobility also poses many data management challenges.First, servers must
keep track of client locations in order to efficiently route messages to them.
Second, client data should be stored in the network location that minimizes the
kcbijay123@gmail.com

31

traffic necessary to access it. Keeping data in a fixed location increases access
latency if the client moves "far away" from it.Finally, asstated above,the actof
movingbetweencells mustbe transparenttothe client.Theservermustbeableto
gracefullydiverttheshipment ofdatafromonebasestationtoanother,withoutthe
client noticing. Client mobility also allows new applications that are
locationbased.
For example, consideranelectronicvaletapplicationthatcantella
user the location of the nearest restaurant. Clearly, "nearest" is relative to the
client'scurrentposition,andmovement
can invalidate any previously cached responses. Upon movement,theclient must
efficientlyinvalidatepartsofitscacheandrequestupdateddatafromthedatabase.

071 10) Differentiate between XML schema and XML DTD with suitable
example.
The critical difference between DTDs and XML Schema is that XML Schema
utilizean XMLbased syntax,whereasDTDs haveauniquesyntaxheldoverfrom
SGML DTDs. Although DTDs areoften criticizedbecauseof thisneed tolearn a
new syntax, the syntaxitself isquiteterse.Theoppositeistruefor XMLSchema,
which are verbose, but also make use of tags and XML so that authors of XML
shouldfindthesyntaxofXMLSchemalessintimidating.
The goal of DTDs was to retain a level of compatibility with SGML for
applications that mightwantto convert SGMLDTDsintoXML DTDs.However,
inkeepingwithoneofthegoalsofXML,"tersenessinXMLmarkupisofminimal
importance,"thereisnorealconcernwithkeepingthesyntaxbrief.
LIST1isanexampleusing DTDandprovidingaschemadefinitionforthecontent
above, while LIST2 is an example using XML Schema to provide a schema
definition(employee.xs).
LIST1:EmployeeInformationDTD

kcbijay123@gmail.com

32

<!ELEMENTEmployee_Info(Employee)*>
<!ELEMENTEmployee(Name,Department,Telephone,Email)>
<!ELEMENTName(#PCDATA)>
<!ELEMENTDepartment(#PCDATA)>
<!ELEMENTTelephone(#PCDATA)>
<!ELEMENTEmail(#PCDATA)>
<!ATTLISTEmployeeEmployee_NumberCDATA#REQUIRED>

LIST2EmployeeInformationXMLSchemaemployee.xs
<?xmlversion="1.0"?>
<xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:elementname="Employee_Info"type="EmployeeInfoType"/>
<xs:complexTypename="EmployeeInfoType">
<xs:sequence>
<xs:elementref="Employee"minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:elementname="Employee"type="EmployeeType"/>
<xs:complexTypename="EmployeeType">
<xs:sequence>
<xs:elementref="Name"/>
<xs:elementref="Department"/>
<xs:elementref="Telephone"/>
<xs:elementref="Email"/>
</xs:sequence>

kcbijay123@gmail.com

33

<xs:attributename="Employee_Number"type="xs:int"
use="required"/>
</xs:complexType>
<xs:elementname="Name"type="xs:string"/>
<xs:elementname="Department"type="xs:string"/>
<xs:elementname="Telephone"type="xs:string"/>
<xs:elementname="Email"type="xs:string"/>
</xs:schema>

As we see, the syntax is completely different between the two. For the DTD, a
unique syntax is written, whereas the XML Schema is written in XML format
conforming to XML 1.0 syntax. LIST3 is an example of a valid XML document
fortheLIST2XMLSchema(employee.xml).
For DTD, a DOCTYPE declaration isusedto associatewiththeXMLdocument
but,inthecaseof XMLSchema,the specificationdoesnotparticularlydetermine
anything with respect to the association of the XML document. Accordingly, the
implementation method ofthe validationtoolactuallyused isfollowed.However,
under the XMLSchemaspecification,thereis adefinedmethodfor writing ahint
to associate with the XML document. The following content is inserted into the
rootelementoftheXMLdocument.

071
1) Explainthefollowingterms:
a) DataWarehouse
A data warehouse isacentralrepository forallor significantparts of
the data that an enterprise's various business systems collect. Data
kcbijay123@gmail.com

34

warehousing emphasizes the captureofdatafromdiversesourcesfor


useful analysis and access, but does not generally start from the
pointofview of the end user who may need access to specialized,
sometimes local databases. Thelatterideaisknownas thedata mart.
Typically, a data warehouse is housed on an enterprise mainframe
server or increasingly, in the cloud. Data from various online
transaction processing (OLTP) applications and other sources is
selectively extracted for use by analytical applications and user
queries.
b) DistributionTransparency
Distribution transparency allows the user to perceive the database as a
single, logical entity. If a DDBMS exhibits distribution transparency, then
the user does not need to know the data is fragrances (fragmentation
transparency) or the location of data items (Local transparency).
Distribution transparency can be classified into:
Fragmentation transparency
Fragmentation is the highest level of distribution transparency. If
fragmentation transparency is provided by the DDBMS, then the user does
not need to know that the data is fragmented, As a result, database
accesses are based on the global schema,. so the user does not need to
specify fragment names or data locations.
Location transparency
Location is the middle level of distribution transparency. With location
transparency, the user must know how the data has been fragmented but
still does not have to know the location of the data.
Replication transparency
Closely related to location transparency is replication transparency, which
means that the user is unaware of the replication of fragments. Replication
transparency is implied' by location transparency.
Local mapping transparency

kcbijay123@gmail.com

35

This is the lowest level of distribution transparency. With local mapping


transparency, user needs to specify both fragment names and the location
of data items, taking into consideration any replication that may exists.
Clearly, this is a more complex and time-consuming query for the user to
enter than the first. It is unlikely that a system that provides only this level
of transparency would be acceptable to end-users.
Naming transparency
As a corollary to the above distribution transparencies, we have naming
transparency. As in a centralized database, each item in a distributed
database must. have a unique name. Therefore, the DDBMS must ensure
that no two sites create a database object with the same name. One
solution to this problem is to create a central name server, which has the
responsibility to ensure uniqueness of all names in the system. However,
this approach results in:
Loss of some local autonomy;
Performance problems, if the central site becomes a bottleneck;
Low availability; .if the central site fails the remaining sites cannot
create any .new database objects.
An alternatively solution is to prefix an object , with the identifier of the
site that created it For example, the relation branch created at site S1
might be named S1.Branch. Similarly, we need to be able to identify each
fragment and each of its copies. Thus, copy 2 of fragment 3 of the Branch
relation created at site S1 might be referred to as S1.Branch.F3.C2.
However, this results in loss of distribution transparency.
An
approach that resolves the problems with both these solution uses
aliases (sometimes called synonyms) for each database object. Thus, S
1.Branch.F3.C2 might be known as Local Branch by the user at site S1. The
DDBMS has the task of mapping an alias to the appropriate database
object.

c) XQuery
XQueryisaquery and functionalprogramming languagethatqueries
andtransformscollectionsofstructuredandunstructureddata,usually
in the form of XML, text and with vendorspecific extensions for

kcbijay123@gmail.com

36

other data formats (JSON,binary,etc.).Thelanguageisdevelopedby


theXMLQueryworkinggroupoftheW3C.

d) Distributiontransaction
A distributed transaction includes one or more statements that,
individually or as agroup,update dataontwoormoredistinctnodes
ofadistributeddatabase
A distributed transaction is composed of several subtransactions,
eachrunningonadifferentsite.
Eachdatabasemanager(DM)candecidetoabort(thevetoproperty).
AnAtomicCommitmentProtocol(ACP)isrunbyeachoftheDMsto
ensure that all the subtransactions are consistently committed or
aborted.

e) Knowledgebase
In general, a knowledge base is a centralized repository for information: a
public library, a database of related information about a particular subject,
and whatis.In general, a knowledge base is a centralized repository for
information: a public library, a database of related information about a
particular subject,andwhatis.com couldallbeconsideredtobeexamplesof
knowledge bases. In relation to information technology (IT), a knowledge
base is a machinereadable resource for the dissemination of information,
generallyonlineorwiththecapacitytobeputonline.Anintegralcomponent
of knowledge management systems, a knowledge base is used to optimize
informationcollection, organization,andretrieval foranorganization,orfor
thegeneralpublic.
f) Classificationandclustering
CLASSIFICATION
We have a Training set containing data that have been previously
categorized

kcbijay123@gmail.com

37

Based on this training set, the algorithms finds the category that the
newdatapointsbelongto
Since a Training set exists, we describe thistechnique asSupervised
learning
Example:We use training dataset which categorized customers that
havechurned.Now basedonthistrainingset,wecanclassifywhether
acustomerwillchurnornot.
Clustering
Wedonotknowthecharacteristicsofsimilarityofdatainadvance
Using statisticalconcepts,wesplitthedatasetsintosubdatasetssuch
thattheSubdatasetshaveSimilardata
Since Training set is not used, we describe this technique as
Unsupervisedlearning
Example:We use a dataset of customers and split them into
subdatasets of customers with similar characteristics. Now this
information can be used to marketa product toaspecificsegment of
customersthathasbeenidentifiedbyclusteringalgorithm

2.)DistinguishmultipleinheritanceandselectiveinheritanceinOOconcepts.
Multiple inheritances in a type hierarchy occurs when a certain subtype T is a
subtypeoftwo(or
more)typesandhence inheritsthefunctions(attributesandmethods)ofbothsuper
types.
For example, we may create a subtype ENGINEERING_MANAGER that is a
subtypeofboth
MANAGERand ENGINEER.Thisleadstothecreationofatypelatticeratherthan
atypehierarchy.

070
1.)Explainthefollowingterms:
kcbijay123@gmail.com

38

Extent

Temporaldatabase

A temporal database is a database that has certain features that support


timesensitive status for entries. Where some databases are considered current
databases and only support factual data considered valid at the time of use, a
temporal database can establish at what times certain entries are accurate. For
temporal databases, time is considered to be an
ordered sequence
of
points
in
some
granularity
thatisdeterminedbytheapplication.Forexample,supposethat
some temporal applicationneverrequirestime unitsthatare less than one second.
Then, each time point represents one second in time using this granularity. In
reality, each second is a(short)
timeduration,
notapoint,since itmaybe further
dividedintomilliseconds,microseconds,andsoon.
Because there is no known beginning or ending of time, one needs a reference
point from which to measure specific time points. Various calendars are used by
variouscultures.
DegreeofhomogeneityofDBMS

XPath

XPath is a syntax for defining parts of


anXMLdocument
kcbijay123@gmail.com

39

XPathusespathexpressionstonavigateinXMLdocuments
XPathcontainsalibraryofstandardfunctions
XPathisamajorelementinXSLT
XPathisaW3Crecommendation
OLAP
OLAP(onlineanalyticalprocessing)enablesa user toeasily andselectively
extract and view data from different pointsofview.OLAP (online analytical
processing) is computer processing that enables a user to easily and selectively
extract and view data from different points of view. For example, a user can
request that data be analyzed to displayaspreadsheetshowingall ofacompany's
beach ball products soldin FloridainthemonthofJuly,comparerevenuefigures
withthosefor thesame productsinSeptember,andthenseeacomparisonofother
productsales inFloridainthesame time period.Tofacilitatethiskindofanalysis,
OLAPdatais storedinamultidimensionaldatabase.Whereasarelationaldatabase
canbe thoughtofastwodimensional,amultidimensionaldatabaseconsiderseach
data attribute (such as product, geographic sales region, and time period) as a
separate"dimension."OLAPsoftwarecanlocatetheintersectionofdimensions(all
products sold in the Eastern region above a certain price during a certain time
period)anddisplaythem.Attributes such astimeperiodscanbebrokendowninto
subattributes.

2.)DrawanERDiagramforahospitalwithasetofpatientsandsetofdoctors
associated with each patient a log of various tests and examinations
conducted.

kcbijay123@gmail.com

40


(Addappropriateattributesfortheentitiesyourselforseebelow)

6.) Write a schema that provides tags for a persons first name, last name,
weight, and shoe size. Weight and shoe size tags should have attributes to
designatemeasuringsystems.
<?xmlversion="1.0"encoding="UTF8"?>
<xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:elementname="person">
<xs:complexType>
<xs:sequence>
<xs:elementname="firstname"type="xs:string"/>
<xs:elementname="lastname"type="xs:string"/>
<xs:elementname="weight"type="xs:positiveInteger">
kcbijay123@gmail.com

41

<xs:complexType>
<xs:attributename="unit"type="xs:string"use="required"/>
</xs:complexType>
<xs:element>
<xs:elementname="shoesize"type="xs:positiveInteger">
<xs:complexType>
<xs:attributename="unit"type="xs:string"use="required"/>
</xs:complexType>
<xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

9.) What are the advantages and disadvantages of extending the relational
datamodelbymeansofORDBMS?
5.) What is the difference between structured and unstructured complex
object?Differentiateidenticalversusequalobjectswithexamples.
7.)Whatarethedifferencesandsimilaritiesbetweenobjectsandliteralsinthe
ODMGobjectmodel?

kcbijay123@gmail.com

42

You might also like