You are on page 1of 13

NALANDA DEGREE COLLEGE, MIRYALGUDA

UNIT-I
Disadvantages of DBMS:
i) Higher Cost: The database system also involves higher data processing cost. There is always
increased hardware & sotware investment. !o a lot investment is needed or maintaining databases.
ii) "ac# o Training: There is again lac# o training people in the database system. $atabase e%perts
may be maintaining at higher cost.
iii) $ata Insec&rity: The database m&st be properly maintained by the a&thori'ed people. I they are
not properly maintained there are chances or opening( adding deleting the data. Th&s( there is
always a chance or data insec&rity.
iv) $ata Integration: $ierent department maintained data in dierent iles. It is diic&lt to ens&re
togetherness among the same data in all departments. It is optimised or certain #ind o
organi'ational levels.
Risk and Cost of Database:
The database systems have ive dierent drawbac#s:
i) )rganisational conlicts
ii) $evelopment proit ail&re
iii) !ystem ail&re
iv) )verhead cost
v) Need or sophisticated personnel
i O!ganisationa" Conf"i#ts: *etting data in a common database may not be politically isable in some
organisations certain gro&ps may not willing to control over there data to the e%tended needed to the
integrate data the ris# involved in data sharing i.e. one gro&p may damaged another gro&ps data s&ch people
problems co&ld prevent the eect&al implementation o a database system.
ii Deve"o$%ent &!o'e#t (ai")!e: +or variety o reasons the pro,ect to develop a database system may ail
sometimes management was not &lly satisied with the data base system a pro,ect too large in scope may be
almost impossible to complete in a reasonable time in this case a better approach may have been to divide
the data base pro,ect into several pro,ects to develop several databases or a single data base in several
stages inally d&ring the co&rse o a pro,ect( #ey personnel may &ne%pectedly leave the company i
replacement personnel cannot be o&nd( then the pro,ect might no be s&ccess&lly completed.
iii S*ste% (ai")!e: -hen the comp&ter goes down( all &sers directly involve in accessing the database
m&st wail &ntil the system is &nctions again i the system or application sotware ails ( their may be
permanent damage to the database it is very important( thereore to care&lly eval&ate all sotware that will
have a direct eect on the database to be certained that it is as ree o errors as possible a distrib&ted
database system also red&ces the ris# o hardware ail&re in a centralised database system since the
distrib&ted systems r&ns an several comp&ters.
iv Ove!+ead Cost: The database approach may re.&ire investments in both hardware and sotware. The
hardware to r&n a large $/0! m&st be eicient and will generally re.&ire more main memory 1230)
and dis# storage in addition( the $/0! itsel is a .&ite e%pensive these overhead cost may not always bring
corresponding beneit a database system with a large amo&nt i data sharing re.&ire more power&l bac#&p
and recovery proced&res.
v Need fo! So$+isti#ated &e!sona": The database administration &nction re.&ires s#illed personnel who
are capable o coordinating the need4s o dierent &ser gro&p designing database( establishing data
recovery proced&res etc.( this combination o s#ills constit&tes a personnel overhead in the adoption and
&se o database are the database administration &nctions has been established the cost o the $/3 gro&p
is an ongoing e%pense i no person having the re.&ired s#ills can be o&nd( the $/3 &nctions may not be
properly perormed this res&lts in the ail&re o a database implementation.
5
NALANDA DEGREE COLLEGE, MIRYALGUDA
UNI,-III
C"ient.Se!ve! S*ste%s:
The term client6server 1C!) is not new( since C! system involving m&ltiple comp&ters connected in a
networ# is a concept that has been aro&nd or some time.
C"ient: 3 comp&ter or wor#station attached to a networ# that is &sed to access networ# reso&rces.
Se!ve!: 3 comp&ter that &rnishes clients with services s&ch as databases( connections to a networ#( or large
dis# drives. !ervers can be mainrames( minicomp&ters( large wor#stations( or "3N devices. 0ore than
one server can be involved in providing services to clients. +ig&re below shows as C! system with two
servers( a database server and a a% server.
Database Se!ve!s: 3 program r&nning on server hardware to provide database services to client machine.
C"ient se!ve! $"atfo!%: 3 local area networ# consisting o client comp&ters which receive services
rom server comp&ter.
!&ppose that client 3 re.&ires data contained in the database server. The &ser e%presses the data
re.&est in the orm o a .&ery 1e.g.( !7") and transmits it to the database server. The database server
e%ec&tes the .&ery on its data rom the database server( and the database server may service several re.&est
in parallel.
Clients comm&nicate with servers thro&gh an application program interace 138I) sometimes called
middleware. That is( remote proced&re calls and message e%changes are handled by 38Is. 9ective 38Is
can acilitate the implementation o new applications by accommodating dierent networ# protocols and
operating systems. 3s C! technology mat&res( 38I eat&res will probably become part o operating systems.
Database A$$"i#ations: The most common client6server applications &se a relational database. The set o
transactions involved are re.&ests rom &ser and responses rom the database system. The interaction is
acilitated by sotware that enables the client to ma#e re.&est o the server4s database. 3 widely &sed
e%ample is the lang&age !7".
Deve"o$ing C"ient A$$"i#ations:
3n application development environment( power b&ilder( is a slow &sed to b&ild client side
applications that can interace over networ#s with database systems. 8ower b&ilder is a graphical application
development environment which r&ns in windows. It can be &sed to create application programs that
interace with a large no. dierent $/0!.
To create a application programs power b&ilder provide a n&mber o painters( which are interactive
s&b programs that accomplish speciic types o &nctions needed or &ll application development. The
process o developing applications in power /&ilder as +ollows:
5) +irst( a database m&st be deined. This involves giving the database name( deining tables with
their col&mns( data types( #eys( oreign #eys.
:) 3ter the database has been deined( we can start developing applications this is done &sing power
b&ilder4s painters. To develop each application we m&st perorm three ma,or steps.
5) $eine the application. This is done with application painter.
:) $eine the applications windows. This is done with the window painter.
;) The application will act a data in the database. Thereore we m&st identiy the data needed
or inp&t( the data to changed( and the data which will be o&tp&t. This data identiication is
done thro&gh data windows( which are deined in the data window painter.
:
NALANDA DEGREE COLLEGE, MIRYALGUDA
Using &o/e! B)i"de!: The main screen o the power b&ilder application development environment is
shown in ig&re below< This screen contains a title balance at the top( with a n&mber on the ne%t line( and the
=8ower /ar> on the line. The 8ower /ar shows the icons or the most o the vario&s painters which
constit&te the &nctional capabilities o power b&ilder. The /&tton in the 8ower /ar 2epresent:
5) 3pplication: This is the application painter. -e &se i to deine the general aspects o an
application( s&ch as the applications name and the opening and closing programs 1or =scripts>)( which
indicate what processing sho&ld ta#e place when the application is started and ends.
:) -indow: This painter is &sed to constr&ct windows or applications.
;) 0en&: This painter is &sed to constr&ct men&s or windows.
?) $ata -indow: This painter constr&cts data window ob,ects which are &sed to access the database
and place the res&lts in windows. The window painter will be &sed to indicate which data window
ob,ects are to be &sed in which windows.
@) !tr&ct&re: This painter is &sed to deine data str&ct&res to be &sed in scripts 18ower /&ilder
8rograms). !tr&ct&res can be tho&ght o as records 1or) gro&ps o ields constr&cted so may be
reerred to as a gro&p.
A) 8reerences: To .&ote 8ower /&ilder helps =In preerences yo& can set preerences variables or
all 8ower /&ilder> 1or) or a n&mber o the painters.
B) Help: The help b&tton is &sed to obtain e%planations inormation abo&t 8ower /&ilder eat&res.
C) $ata base: This painter is &sed to deine database.
D) 7&ery: This painter is &sed to develop !7" .&eries.
5E) +&nction: This painter is &sed to develop &ser-deined &nctions which can be &sed in 8ower
/&ilder scripts.
55) "ibrary: "ibrary controls the management o applications( windows( and other ob,ects created
&sing 8ower /&ilder.
5:) User )b,ect: This painter is &sed to create &ser ob,ects-c&stomi'ed =controls> 1b&ttons( lists( and
so on) that can be placed in windows.
5;) 2&n: 8ressing this b&tton ca&ses the c&rrent application to r&n.
;
NALANDA DEGREE COLLEGE, MIRYALGUDA
5?) $eb&g: The deb&g acility provides means o deb&gging applications. The system developer
enters the desired painter by clic#ing on the appropriate b&tton. 3s the system enters the painter
another bar o b&ttons( the =painter /ar>( is displayed.
Se!ve! Data Mani$)"ation and &!og!a%ing: !7": - !erver and oracle both provide control str&ct&res
allowing or batch- style programs in which sets 1or) batches o statements e%ec&ted with o&t interr&ption.
These control str&ct&res are part o !7" services controlFoFlow and oracles 8"6!7"
lang&ages.
Cont!o"-of-f"o/ 0o! &L.S1L:
5) /9*IN--------9N$ statements( which deine bloc#s o !7". !tatements to be treated as &nits or
e%ec&tion.
:) I+-------9"!9 statements or condition e%ec&tion.
;) -HI"9 !tatements or repeated orientation e%ec&tion.
?) /293G and C)NTINU9 !tatements or early e%it rom -HI"9 loops.
@) $9C"329 !tatements allowing deining o local variables.
A) 29TU2N !tatements
B) 82INT !tatement provide or messages to be sent to the &ser.
C) Comments which allow internal doc&mentation to be incl&ded with programs.
23 BEGIN------------END:
Condition 1I+) and interactive 1-HI"9) !tatements control the e%ec&tion o a single statement
1or) a bloc# o statements. /9*IN !7" !tatement -----------------!7" !tatement 9N$
3 !tatement bloc# is either a single !7" !tatement witho&t delimiters 1or) set o two 1or) more !7"
!tatements is limited by /9*IN-----------9N$.
43 I(-----ELSE:
!ynta%:
I+ HConditional 9I8J
H!tatement bloc#J
9"!9
H!tatement bloc#J
I can be &sed to determine conditions relative to the relation as a whole beore applying &pdater to
the relation as a whole.
53 67ILE State%ent:
3 !tatement which &ses a condition to control the iterative e%ec&tion o a !tatement bloc#
!ynta%:
-HI"9 HConditional 9I8J
H!tatement bloc#J
This statement ca&ses the statement bloc# to be repeatedly e%ec&ted( as long as the conditional
eval&ated to tr&e.
9%ample:
-HI"91 3J E )
/9*IN
!T3T909NT5
!T3T909NT:
9N$
83 BREA9 AND CON,INUE:
B!eak: A 9eyword which ca&ses e%ec&tion control to e%it rom an iterative while loop.
Contin)e: A 99K-)2$ which ca&ses e%ec&tion control to s#ip one step in the -HI"9 "))8.
Sto!ed &!o#ed)!es:
!tored 8roced&res !7" programs that are compiled the irst time they e%ec&ted and then stored or
later &se. They provide a no. o advantages over programs.
5) 8roced&res that have already compiled e%ec&te very ast.
?
NALANDA DEGREE COLLEGE, MIRYALGUDA
:) They can receive and ret&rn parameter variables &sed to pass data into and o&t o stored
proced&res.
!ynta%:
C293T9 82)C9$U29H8roced&re nameJ3!
!9"9CT L +2)0 HTable nameJ
The #ey word =3!> signals the end o the parameter deinitions and the beginning o the proced&re
deinition. 9very thing ater =3!> constit&tes the e%ec&table parts o the proced&re.
UNI,-I:
(i"e O!iented S*ste% 0O! (i"e O!ganisation
-ay o storing data or records in a ile is called +ile )rganisation. There are ? types o +ile
)rganisation:
i) !e.&ential +ile )rganisation
ii) Inde% !e.&ential +ile )rganisation
iii) 2andom 1or) $irect +ile )rganisation
i Se;)entia" (i"e O!ganisation: Here records are #ept either in ascending or descending order. Here i we
want a partic&lar record( we have to read on the record beore ac.&iring or reaching the desired record.
)rdering can be done on the basis o one #ey ield.
E<: I we ta#e the employee irst in an oice( the ordering can be done in the ascending order o employee
n&mber. The records in the iles are
stored on a magnetic tape.
a) -or#ing with se.&ential ile is simple.
b) 2ecord can be accessed easily on the basis o #ey ield 1primary #ey).
c) Cost is minimi'ed as only transaction iles are resorted.
d) 0a#ing changes in the e%isting records is some what diic&lt ,ob.
e) +or addition or deletion o records is some ile sho&ld be sorted.
ii Inde< se;)entia" (i"e O!ganisation: This +ile )rganisation enables the &ser to access ile randomly. The
inde% table is created on the dis# at the same time that
the data is recorded on the dis#. This Inde% table
stores each records #ey ield and the address o the
dis# o that record.
2eading a record in : ways
a) 2ead se.&entially rom beginning &ntil yo&
ind yo&r record.
b) "oo#ing the inde% ind the address and go
directly to that record. M&st li#e a /oo#4s inde%
which has dierent topics and their corresponding
page n&mber.
c) Immediate access to record is possible.
d)!everal iles can be &pdated sim&ltaneo&sly.
e) 3ddition and deletion o record is more comple%.
) $ata sec&rity is less.
iii Rando% (i"e O!ganisation: In this organi'ation &ser can access any report in the ile. In this
approach comp&ter can directly locate the record witho&t searching or reading the previo&s records. In
this organisation record is given a partic&lar n&mber which is called as #ey n&mber to reach directly
or a partic&lar record. This #ey n&mber is calc&lated &sing a =H3!H> techni.&e.
a) Immediate &pdating o vario&s iles is possible in lesser time.
b) 3ddition and deletion o records is very simple.
c) These iles can be opened on the devices li#e 0agnetic $is#.
Database Integ!it*:
Integrity control or constrains means restriction applied to a given set o data< &sed to minimi'e data
entry error. $atabase Integrity in $/0! is achieved by<
@
NALANDA DEGREE COLLEGE, MIRYALGUDA
5) Integrity constraints on !7"
:) Transaction processing
;) Conc&rrency control
2 Integ!it* Const!aints:
3 constraint is a r&le that restricts that the vales in a database. 2elational data model incl&des several
constraints that are &sed to veriy the validity o data in a database a well as to add meaning&l str&ct&re to
the data. Integrity constraints are o two types:
5) 9ntity Integrity: No #ey attrib&te o a row is n&ll means val&e or data sho&ld be given
:) 2eerential Integrity: 9very oreign #ey m&st either be n&ll 1or) its val&e m&st be the act&al val&e
o a #ey in another relation.
4 ,!ansa#tion Cont!o" o! &!o#essing: Transaction means a program &nit whose e%ec&tion preserves the
consistency 1being in same res&lt) o the database. I the database is in consistent beore a transaction
e%ec&tes then the database sho&ld still be in a consistent state ater its e%ec&tion.
a) 3tomic transaction: 3 transaction in which all actions associated with the transaction are
e%ec&ted to completion or none is perormed.
b) 3borted transaction: - Transaction that is canceled beore changes are applied to the database. To
s&pport the transaction processing( a $/0! m&st maintain a transaction record o every change made
to the database( s&ch record called a ")*.
c) ")*: 3 record o all transactions and the corresponding changes to the database.
I any changes are occ&rred on database i.e.( &pdation has done( then record res&lting &pdates
on the ")*.
I transaction ails( no need to write any thing on the ")*.
5 Con#)!!ent Cont!o": A common way o preventing the conc&rrencyproblem is thro&gh a simple
loc#ing policy. ")CG prevent access to a database record by a second transaction &nit the irst transaction
has completed all o it actions.
I two or more &sers are accessing the database at the same time and transaction are interleaved(
&ndesirable res&lts may occ&r. -hen irst &ser( perorming irst transaction on partic&lar record( he loc# the
record &ntil hi transaction completes( when a record &ntil I loc#ed by one &ser( no other &ser may ace it or
&pdate.
Dead "o#k: Two transactions are m&t&ally e%cl&ded rom the ne%t record re.&ired to complete their
transaction< that stat&s we called it as $eadloc#.
$eadloc# $etection: -3 periodic chec#s by the $/0! to determine i the waiting line or some
records or reso&rce e%ceeds a predetermined limit. 3nother
method o deadloc# detection is by graph called wait or
graph. 3 deadloc# e%ists in the system i and only i the wait or graph
contains a cycle. 8eriodically invo#e an algorithm that searches or a
cycle in the graph as shown in fig)!e.
5) Transaction TD is waiting or transaction T5E and T55.
:) Transaction T55 I waiting or transaction T5E.
;) Transaction T5E I waiting or transaction T5:.
Database Se#)!it*:
$atabase sec&rity is generally easier to cope with an malicio&s access to the database( which incl&des
the ollowing<
5) Thet o inormation
:) Una&thori'ed modiication o data.
;) Una&thori'ed destr&ction o data.
!o ; ways have a database sec&rity.
5) 3&thentication :) 3&thori'ation and views ;) 9ncryption
2 A)t+enti#ation:
a) +irst level o a&thentication is giving identity to the &ser by
!omething the &ser #nows( s&ch as password
A
NALANDA DEGREE COLLEGE, MIRYALGUDA
!omething the &ser processes s&ch as I$ card
8hysical representation o the &ser( s&ch a inger print or voice print.
b) 3 password scheme limits &na&thori'ed system access by creating a password that is diic&lt to
g&ess b&t still easy or the &ser to remember.
c) 3 passwords will be dierent or dierent &ser and dierent systems. !o to maintain all the
passwords( it is advisable to appoint a password s&pervisor to ens&re that password parameters are
satisied. 3ll the list o passwords will be maintained by him. I any employee terminates or
transer to other &nctional area( all the passwords will be changed by the s&pervisor.
d) +or creating passwords one scheme can be &sed is a .&estion and answer session with &ser.
e) I the &ser &nable to s&pply a valid password with in a set time or no< o trials( the sho&ld
a&tomatically logo &sers.
) Una&thori'ed system access can be &rther controlled by allowing read only &nctions.
4 A)t+o!i=ation and :ie/s:
Niews: - 3 restricted s&bset o a stored relation. -e have to irst(
a) Create Niews
b) *ive a&thori'ation to access those views.
Types o 3&thori'ation on views:-
5) 2ead a&thori'ation( which allows reading b&t not modiication o data.
:) Insert a&thori'ation( which allows insertion o new data( b&t not modiication o e%isting data.
;) Update a&thori'ation( which allows modiications( b&t not deletion o data.
?) $elete a&thori'ation( which allows deletion o data.
To give this a&thori'ation to the &sers !7" have: commands called *23NT and 29N)G9J
GRAN, statement is &sed to give a&thori'ation to the &ser.
!ynta%:
*23NT Hinsert6alter6delete6select6&pdateJ on Hview nameJ to &ser listJ
9%: - *23NT U8$3T9 on branch to U5( U:( U;.
In above e%ample branch is the view name( U5( U:( U; are the &sers name
RE:O9E command is &sed to revo#e a&thori'ation rom the &ser.
!ynta%:
29N)G9 HcommandJ on Hview6tableJ rom H&ser listJ
9%: -29N)G9 U8$3T9 )N /23NCH +2)0 U5( U: and U;.
2. Encryption:
The various authentication and authorization measures that are standard for
protecting access to databases may not be sufcient for highly sensitive data. In such
instance, it may be desirable to ENCR!T the data.
ENCR!T" It means that to convert readable te#t to unreadable te#t by use of an
algorithm$ this method is used to protect sensitive data.
%ECR!T" &ethod of converting Encrypted data to Normal te#t 'e called it as
%ecipher or
%ecryption
!lainte#t" (hich is readable te#t.
Cipher te#t" Encrypted te#t
Ex:
)*CCE)) +plainte#t,
-ecomes
T.%%/TT +cipher te#t,. -ut techni0ue 'e used is very easy. 1ny one can
decipher it.
ENCR!TI2N has many techni0ues.
2ne method or scheme is called public 3ey encryption. In this method, there are
t'o 3eys, a public 3ey and a private 3ey. Each user has a public 3ey +Ei, and private
3ey +!i,. 1ll the public 3eys are published. Each user4s private 3ey is 3no'n only to the
B
NALANDA DEGREE COLLEGE, MIRYALGUDA
user to 'hom the 3ey belongs. If user 'ants to store encrypted data, he can encrypts
it using public 3ey +Ei,. %ecryption re0uires the private 3ey +!i,.
Database Re#ove!*:
!o&rces o ail&res:
2 S*ste% E!!o!s: The system has entered an &ndesirable state( s&ch as deadloc#( which prevents the
program rom contin&ing with normal processing. This type o ail&re may or may not res&lt in corr&ption o
data iles.
4 7a!d/a!e (ai")!es: Two o the most common types o hardware ail&res are dis# ail&res and loss o
transmission capability over a transmission lin#
5 Logi#a" E!!o!s: /ad data or missing data are common conditions that may interr&pt the programs
contin&ing with normal e%ec&tion.
The inormation stored on comp&ter media is s&b,ect to loss or corr&ption by a wide range o events(
it is important to provide means or restoring correct data to the database. 2estoring the database to the same
state that e%isted at the time o system ail&re is not always possible( b&t database recovery proced&res can
restore the database to the state that e%isted shortly beore the ail&re and identiy the stat&s o transaction
processing at the time o the ail&re.
)ne o the methods in database 2ecovery is &sing ")* details. The ")* is a history o all the
changes made to the database as well as the stat&s o each transaction. ")* inormation is stored on a
mythical =stable storage> that s&rvives all ail&res.
3 recovery strategy can be p&rs&ed by one o two approaches<
5) "ogging with $eerred Updates: In this techni.&e( all data is stored in database. ater committed
statement( then &se redo 1 ) operation. To perorm commit statement again.
:) "ogging with Immediate $atabase 0odiication: -In this techni.&e( all data is &pdated on
database beore commit statement is perormed. -hen crash occ&rs beore commit statement( then
Undo operation is perormed.
UN$) 1Ti): - which restores the val&e o all data items &pdated by transaction 1Ti) to the old
val&es.
29$) 1Ti): - which sets the val&es o all data items &pdated by transaction 1Ti) to the new val&es.
These two operations are important in order to g&arantee correct behavio&r even i a ail&re occ&rs
d&ring the recovery process.
0UNI,-:
DIS,RIBU,ED DA,ABASE SYS,EMS
Need of Dist!ib)ted Databases:
3 distrib&ted database is not entirely stored in one central location b&t is distrib&ted among a
networ# o location that are geographically separated and connected by comm&nication lin#s. 9ach location
has its own database and is also to access data maintained at other locations.
5. )ten organi'ations have branches or divisions in dierent locations.
:. 3llowing each site to store and maintain its own database allows immediate and eicient access
to data that are &sed most re.&ently.
;. $istrib&ted database can &pgrade reliability. I one sites comp&ter ails( or i a comm&nication
lin# goes down( the rest o the networ# can possibly contin&e &nctioning. 0oreover( when data
are replicated at two or more sites( re.&ired data may still be available rom a site which is still
operable.
?. 3llowing local control over the data &sed most re.&ently at a site can improve &ser
satisaction with the database system.
@. The advantage o data replication is the speed gained in processing at sites where the
d&plicate data are maintained( as well as providing bac#&p copies o data in case o a
system ail&re another location.
Dist!ib)ted Database S*ste% Design:
C
NALANDA DEGREE COLLEGE, MIRYALGUDA
The design o a distrib&ted database system can be a comple% tas#. !trategies and ob,ectives: !ome
o the strategies that are common to most implementations o distrib&ted database system are:
"ocation Transparency: "ocation transparency enables a &ser to access data witho&t #nowing( or
being concerned with( the site at which the data reside. The location o the data is hidden rom the
&ser.
2eplication Transparency: 2eplication transparency means that when more than one copy o the
data e%ists( one copy m&st be chosen when retrieving data( and all copies m&st be &pdated
when changes are made.
Conig&ration Independence: Conig&ration independence enables the organi'ation to add or
replace hardware witho&t changing the e%isting sotware components o the $$/0!.
Conig&ration independence res&lts in a system that is e%pandable when its c&rrent hardware is
sat&rated. Nonhomogeneo&s $/0!s: It is sometimes desirable to integrated database maintained
by dierent $/0!s on dierent comp&ters. )ten the $/0!s are s&pplied by dierent
vendors and may s&pport dierent data models. )ne approach to integrating these databases is
to provide a single &ser interace that can be &sed to access the data maintained by the
nonhomogeneo&s $/0!s.
Data Re$"i#ation:
$ata replication occ&rs i the system maintains several identical copies o a relation( 2( with each
copy being stored at dierent site. Typically replication is introd&ced to increase the availability o the
system: when a copy is &navailable d&e to site ail&re1s)( it sho&ld be possible to access another copy.
2eplication can also improve perormance &nder ro&tine conditions( since transactions have a greater
probability o inding a copy locally. The advantages o replication are:
5. I one o the stations containing relation 2 ails( the relation can be retrieved rom another site( and
the system may contin&e any processing involving 2. th&s( database availability is enhanced.
:. I most accesses to 2 only involve a read o the relation( then several sites can process
.&eries involving r conc&rrently. The more copies o 2 there are thro&gho&t the networ#(
the better the chance that a .&ery can be e%ec&ted witho&t re.&iring data transmission between
stations. There is a corresponding cost and time saving.
Database &a!titioning:
9iciency may rom strategy that implements a partitioned database. -ith this approach( the
database is distrib&ted s&ch that there is no overlapping( or replication( o data maintained at the vario&s
locations. !ince there is no d&plication o data( the costs associated with storing and maintaining red&ndant
data are avoided. /eca&se the distrib&ted environment o the $$/0! allows the database to be physically
partitioned( data sec&rity may also be improved( partic&larly when the partitioned segments have
dierent sec&rity needs.
Data f!ag%entation:
$ata ragmentation applies to relation database systems. It reers to ways in which relations can be
s&bdivided and distrib&ted among networ# sites. This is an e%tension o the data-partitioning strategy( which
is generally concerned with locating entire relations 1or iles) rom the database at vario&s sites. I a relation
2 is ragmented( it is divided into s&bsets 1ragments) 25( 2:(O.( 2n. The &nions o these ragments
reconstr&ct the original relation 2. this ragmentation can be hori'ontal( which assigns t&ples to the vario&s
ragments< or it can be vertical( where selected attrib&tes are pro,ected onto the vario&s ragments.
Need of (!ag%entation: $atabase o airline reservations might be more eectively &sed i
database s&bsets are stored at the location o their respective light origins. !imilarly( or a
ban#ing a ban#ing database( it may be &se&l to store database s&bsets at the location o the branch
where the respective acco&nts are located. I ragmentation is allowed( a given relation is not
necessarily stored in it4s entirely at any single site. Its s&bsets may be distrib&ted among
several sites or perormance considerations. 0oreover( these s&bset may be replicated.
D
NALANDA DEGREE COLLEGE, MIRYALGUDA
,*$es of f!ag%entation:
7o!i=onta" f!ag%entation: - Hori'ontal ragmentation is the division o t&ples o a given relation
into ragments. Us&ally ragments are dis,oint and may be replicated. In this way replication is
managed at the ragmentation level and not at the level o individ&al t&ples.
:e!ti#a" f!ag%entation: - Nertical ragmentation is the division o the set o attrib&tes o an ob,ect
into possibly overlapping s&bsets. +ragments are obtained by pro,ecting the original relation over
each set o attrib&tes.
Dist!ib)ted 1)e!* &!o#essing:
!ome database system s&pport relational databases whose parts are physically separated. $ierent
relations might reside at dierent sites( m&ltiple copies o a single relation can be distrib&ted among
several sites( or one relation might be partitioned into s&brelations and these s&brelations distrib&ted. In
order to eval&ate a .&ery posed at a given site( it may be necessary to transer data between vario&s sites.
The #ey consideration here is that the time re.&ired to process s&ch a .&ery will largely be comprised o the
time spent transmitting data between sites rather than the time spent on retrieval rom secondary storage or
comp&tation.
Se%i'oins:
!&ppose the relations 2 and ! shown in ig&re below are stored at sites 5 and :( respectively.
I we wish to respond to a .&ery at site 5 which re.&ires the comp&tation:
M)IN12( !)(
-e co&ld transmit all o ! rom site : to site 5 and comp&te the ,oin at site 5. This wo&ld
involve the transmission o all :? val&es o !.
3nother way wo&ld be to comp&te
TP2 Q3:R
3t site 5< then send T 1A val&es) to site :( and comp&te
+ig: 2 and ! relations to be &sed in semi,oin e%ample
UPM)IN1T( !)<
3nd inally send U1D val&es) to site 5( we can then comp&te the desired 0(ig)!e-D
M)IN12( !)( as M)IN12( U).
These steps and their res&lts are shown in
(ig)!e-D. Note that with this approach we
have only transmitted 5@ val&es to
complete the .&ery
This e%ample provides a basis or deining
a semi,ion.
The semi,oin o 2 with ! is
!90IMI)N 12( !) PH3 pro,ection o those
attrib&tes o 2 that intersect those o !J(
which is simply that portion o 2 that ,oins
with !.
Thereore( M)IN 12( !) PM)IN 12(
1!90IM)IN 12( !)( !).
5E
NALANDA DEGREE COLLEGE, MIRYALGUDA
I 2 and ! are at dierent sites( comp&ting ,oin 12( !) as shown previo&sly saves transmitting
data whenever 2 and ! do not ,oin completely( as was demonstrated in above ig&re.
Database Re#ove!* in DDMBS:
The log plays a #ey role in ail&re recovery. The log is a history o all the changes made to the
database as well as the stat&s o each transaction. It is important that the data on the log not be lost or
destroyed.log inormation is stored on a mythical =stable storage> that s&rvives all ail&res. In distrib&ted
system( a log m&st be maintained at each site. In addition to the previo&sly speciied inormation( the site log
m&st record each message that it sends and receives. In the distrib&ted database environment there m&st be a
means o detecting ail&re and reestablishing the system stat&s at time o ail&re when the system comes
bac#&p.
DBMS Se"e#tion and I%$"e%entation
Ana"*=ing Manage%ent Info!%ation Needs:
The management inormation re.&ired by a irm providing a prod&ct that changes slowly in a
stable mar#et may be somewhat dierent rom the inormation re.&ired by a irm that is in a volatile
mar#et( or that prod&ces a variety o prod&cts s&b,ect to rapid obsolescence. The management inormation
needs o the irm sho&ld inl&ence the choice o $/0!. Characteristics o management inormation needs
that may aect the choice o $/0! co&ld incl&de the ollowing:
5. The potential need or inormation that may re.&ire data rom more than one application.
:. The n&mber o applications where the relationships among data are well established and s&b,ect to
little change.
;. The c&rrent and e%pected vol&me o insertions and deletions pertaining to e%isting and new
data str&ct&res.
?. The way in which data need to be clariied or decision ma#ing.
Dete!%ining A$$"i#ation Re;)i!e%ents:
$etermining the inormation re.&irements to be s&pported by a database system is a comple%
process that is entail in g&iding the selection o a $/0!. The analysis process can be simpliied(
however( i yo& reali'e that &ser typically all into two classes: reg&lar( repetitive &sers and occasional
&sers. The repetitive &ser is the one whose applications may be described as prod&ction systems. The
re.&irements or these transaction-driven systems are planned in advance and generally s&pport ro&tine
company operations s&ch as recording o sales( #eeping trac# o inventory( and so orth. Ideally( the $/0!
sho&ld be able to s&pport these applications in an eicient way. The occasional &sers may re.&ire the
greatest le%ibility( since their re.&irements are oten &noreseen. !&ch &sers tend to re.&ire inormation or
analysis and decision ma#ing as opposed to s&pport o ro&tine operations. This type o &ser needs power&l
capabilities or classiying and combining data( as well as an easy-to-&se .&ery lang&age.
DBMS ()n#tions and Ca$abi"ities:-To eval&ate a $/0!4s ability to service the organi'ation
inormation re.&irements( ollowing eat&res re.&ired:
23 ,+e data di#tiona!*.di!e#to!*:
3n eective database system will allow growth and modiication in the database with compromising
the integrity o its data. This eat&re is accomplished by data dictionary. The data or inormation in the data
dictionary is called metadata or =data abo&t data>. )ther beneits provided by the $$6$ incl&des
8hysical storage str&ct&res can be changed witho&t aecting the programs that &se the data.
8asswords and other sec&rity meas&res can be stored in $$6$.
Centrali'ed data deinition enables easy reporting on the stat&s o the database: whose is
responsible or vario&s data items( what programs and &sers are accessing the data.
To yield these beneits( the $$6$ incl&des the ollowing eat&res:
3 lang&age or deining entries in the $$6$.
3 manip&lation lang&age or adding( deleting( and modiying entries in the $$6$
0eans or prod&cing reports.
43 Data se#)!it* and integ!it*:
55
NALANDA DEGREE COLLEGE, MIRYALGUDA
3ccess controls: It is very important actor. It controls that limit &ser access to programs and data.
Conc&rrency control: It means that maintaining data integrity in the m&lti-&ser environment.
Controls that maintain database integrity when two or more &sers sim&ltaneo&sly re.&est a
database record.
Niew controls: - It provides an a&tomated means o limiting what a &ser is allowed to access rom a
given relation. Those controls that restrict access to views 1s&bsets o base relations).
9ncryption: 9ncoding data to ma#e them &nintelligible to &na&thori'ed persons.
/ac#&p and recovery: -Those controls that provide or restoring the database in case o system
ail&re.
53 1)e!* Data Mani$)"ation and Re$o!ting Ca$abi"ities: The $/0!4s ability to s&pport report
re.&irements( along with &sers .&ery and data manip&lation needs( is the corner tone o today4s management
system. The $/0! will provide a .&ery lang&age which is easy to learn and &se.
83 S)$$o!t of S$e#ia"i=ed &!og!a%%ing Re;)i!e%ents: -/esides ma#ing it easier or the &ser to access
the database or inormation( the $/0! commonly provides signiicant assistance to the application
programmer as well s&ch tools screen( men& and report generators< application generators< compilers<
and soon.
>3 &+*si#a" Data O!gani=ation: The irm ac.&iring a $/0! may not wish to involve itsel in the details o
physical data organi'ation. Instead( it may ga&ge the eiciency o a $/04! physical organi'ation by
r&nning sample applications.
DBMS (eat)!e Re;)i!e%ents:
The &nction and capabilities provide a g&ide to determining #ey eval&ation criteria or choosing
$/0!. Ideally( we wo&ld li#e to partition &nctions into their component parts at a level that allows
ob,ective meas&rement. +or e%ample( s&ppose that we deine the necessary sec&rity and control &nctions as
being satisied by the ollowing $/0! eat&res:
5. 3ccess control provided or programs and &sers.
:. 8assword-8rotected sec&rity tables.
;. 3bility to abort transactions in process.
?. 3&tomatic logging o ailed attempts to access data.
@. Utilities to create and maintain password tables.
/y deining re.&ired eat&res that can be veriied( the analyst avoids the ambig&ities o attempting to
eval&ate whether sec&rity capability is good( bad or somewhere between F since those terms may have
dierent meanings to dierent analysts.
C)$3!K" recommended some eat&res or &rther analysis into the ollowing categories:
5. 0andatory: - 3 $/0! eat&re that m&st be provided.
:. Important: - 3 $/0! eat&re that is not mandatory b&t ma#es the $/0! more attractive.
;. )ptional: - 3 $/0! eat&re that is o secondary importance.
?. Unnecessary: - 3 $/0! eat&re that contrib&tes nothing to the val&e o the $/0! to the irm.
@. Undesirable: -3 $/0! eat&re that detracts rom its val&e to the irm.
DBMS I%$"e%entation Iss)es:-
5) Database Ad%inist!ation:
The responsibilities or $/3 are<
!ervicing 9nd-&sers 2e.&irements:-$/3 is the responsible or trac#ing the re.&ency o
database &se by end &sers and the response times needed by their database application. He also
involved with satisying the training needs o &sers.
9ns&ring $atabase !ec&rity and Integrity:-The $/3 m&st maintain controls to restrict the &pdating
o the database to a&thori'ed &sers.
/ac# &p and 2ecovery: - $/3 has responsibility to loo# ater the database integrity and also when
dis# ail&re occ&rs.$/3 devises methods or restoring a complete and consistent database ater a
5:
NALANDA DEGREE COLLEGE, MIRYALGUDA
ail&re. 2estoration proced&res involve &tilities provided by the $/0! as part o a larger recovery
plan designed by the $/3.
4 Database ,esting:
*ood testing proced&res are needed to ens&re that the database; system &lills &ser re.&irements
and operates witho&t ma,or problems. Testing is normally oc&sed on validating the ollowing operations:
The loading o the database has been done witho&t violating the data integrity.
The application interace correctly with the database.
The perormance o the system satisies the re.&irements or which the $/0! was ac.&ired.
3nother important testing is data testing
Nal&es that have negative signs.
Invalid codes or #eys.
N&ll val&es.
3n &na&thori'ed &sers attempt to change data.
Inappropriate &nits o meas&re.
*eneration o test data that will chec# every possible &ndesired condition has been shown to be an
intractable problem.
53 Loading t+e Database:
)ten the data to be stored in the database already e%ist on some comp&ter based medi&m s&ch as
magnetic tape. I all the re.&ired data e%ist( and database loading may simply involve reconstr&cting the
e%isting data i.e.( program can be written that reads the old iles and creates the str&ct&ring needed or the
new ones. 3s time goes on slowly change the old iles to new iles.
83 Database Maintenan#e:
$atabase maintenance involves 0anaging reso&rces 1storage devices)( /ac#&p and recovery(
managing changes to the database system and $/0! monitoring acilities.
Managing Reso)!#es:
-hen new data will be added to the database( or some data may be deleted( and application will be
added and monitor s&ch changes. $atabase reso&rces s&ch as storage devices( inde%es( and
tables need to be chec#ed. This inormation will ma#e decisions abo&t &pgrading reso&rces as
well as orecasting &t&re needs.
Ba#k)$ and Re#ove!*:
!aving a copy the database at selected time intervals sho&ld be a standard bac#&p ile. I database
&sed is damaged or destroyed( it can be reloaded by &sing bac#&p copy. This will be made by
&sing an operation system &tility or $/0! &tility.
Managing C+anges to t+e Database S*ste%:
-hen changes made in database li#e attrib&tes added to tables( new tables creation( new
views creation and adding new inde%es( ma#ing the more comple% orms and application( $/0!
perormance will be degraded. !o or s&ccess&l database implementation attempt to ma#e the
process o change orderly and s&b,ect to analysis and management involvement.
DBMS Monito!ing (a#i"ities:
+ollowing are the monitoring &nctions:
Inp&t6 o&tp&t &sage by &ser
No.( o read and write operations e%ec&ted in a set time period.
No.( o completed transactions pre set time period.
8rovision o an a&dit trails or activities o interest.
5;

You might also like