Professional Documents
Culture Documents
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.
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.
kcbijay123@gmail.com
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
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
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.
Themainextensionsthatareneededforspatialdatabasesaremodelsthatcan
interpretspatialcharacteristics. Inaddition,special indexingandstoragestructures
areoftenneededtoimproveperformance.
SpecializationandgeneralizationinanERRmodel
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
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
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
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
19
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
20
removed.
Transientisrelatedtodynamic.
Persistentobjectsareonheap.
Anactivedatabasesystem(ADBS)isaDBSthatmonitorssituations
ofinterestand,whentheyoccur,triggersanappropriateresponseina
timelymanner.
kcbijay123@gmail.com
21
Applications
Productioncontrol,e.g.,powerplants,...
Maintenancetasks,e.g.,inventorycontrol,...
Financialapplications,e.g.,stock&bondtrading,...
Networkmanagement
Airtrafficcontrol
Programtrading
ComputerIntegratedManufacturing(CIM)
kcbijay123@gmail.com
22
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
24
kcbijay123@gmail.com
25
DataWarehouse(OLAP)
OperationalDatabase(OLTP)
o.
OLTPsystemsareusedbyclerks,
managers,
and
analysts.
kcbijay123@gmail.com
26
Itisusedtoanalyzethebusiness. Itisusedtorunthebusiness.
ItfocusesonInformationout.
ItfocusesonDatain.
It isbased onEntityRelationship
ItfocusesonInformationout.
Itisapplicationoriented.
Itcontainshistoricaldata.
Itcontainscurrentdata.
10
11
detaileddata.
relationalviewofdata.
hundreds.
thousands.
kcbijay123@gmail.com
isintens.
27
12
13
Thedatabasesizeisfrom100GB
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
kcbijay123@gmail.com
29
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
kcbijay123@gmail.com
35
c) XQuery
XQueryisaquery and functionalprogramming languagethatqueries
andtransformscollectionsofstructuredandunstructureddata,usually
in the form of XML, text and with vendorspecific extensions for
kcbijay123@gmail.com
36
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
XPath
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