Dbms Question Bank2 Marks 16 Marks
Transcript of Dbms Question Bank2 Marks 16 Marks
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
1/31
CS6302 DATABASE MANAGEMENT SYSTEMS L T P C
3 0 0 3
OBJECTIVES:
To expose the students to the fundamentals of Database Management Systems.
To make the students understand the relational model.
To familiarize the students with ER diagrams.
To expose the students to SQ.
To make the students to understand the fundamentals of Transa!tion "ro!essing and Query
"ro!essing.
To familiarize the students with the different types of databases.
To make the students understand the Se!urity #ssues in Databases.
UNIT I INTRODUCTION TO DBMS 10
$ile Systems %rganization & Se'uential( "ointer( #ndexed( Dire!t & "urpose of Database System&
Database System Terminologies&Database !hara!teristi!s& Data models ) Types of data models )
*omponents of D+MS& Relational ,lgebra. %-#*, D,T,+,SE DES#-/ Relational
D+MS &*odd0s Rule & Entity&Relationship model & Extended ER ormalization ) $un!tional
Dependen!ies(,nomaly& 1$ to 2$& Domain 3ey ormal $orm ) Denormalization
UNIT II SQL & QUERY OPTIMIZATION 8
SQ Standards & Data types & Database %b4e!ts& DD&DM&D*&T*&Embedded SQ&Stati!5s Dynami! SQ & Q6ER7 %"T#M#8,T#%/ Query "ro!essing and %ptimization & 9euristi!s
and *ost Estimates in Query %ptimization.
UNIT III TRANSACTION PROCESSING AND CONCURRENCY CONTROL 8
#ntrodu!tion&"roperties of Transa!tion& Serializability& *on!urren!y *ontrol ) o!king
Me!hanisms&Two "hase *ommit "roto!ol&Dead lo!k.
UNIT IV TRENDS IN DATABASE TECHNOLOGY 10
%:er:iew of "hysi!al Storage Media ) Magneti! Disks ) R,#D ) Tertiary storage ) $ile
%rganization )%rganization of Re!ords in $iles ) #ndexing and 9ashing )%rdered #ndi!es ) +;
tree #ndex $iles ) + tree #ndex $iles ) Stati! 9ashing ) Dynami! 9ashing & #ntrodu!tion to
Distributed Databases& *lient ser:er te!hnology& Multidimensional and "arallel databases&
Spatial and multimedia databases&Mobile and web databases& Data
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
2/31
UNIT V ADVANCED TOPICS
D,T,+,SE SE*6R#T7/ Data *lassifi!ation&Threats and risks ) Database a!!ess *ontrol )
Types of "ri:ileges )*ryptography& Statisti!al Databases.& Distributed Databases&,r!hite!ture&
Transa!tion "ro!essing&Data Database System *on!epts?( Sixth
Edition( Tata M! -raw 9ill( @A11.
@. *.C.Date( ,.3annan and S.Swamynathan( >,n #ntrodu!tion to Database Systems?( Eighth
Edition( "earson Edu!ation( @AA.
. ,tul 3ahate( >#ntrodu!tion to Database Management Systems?( "earson Edu!ation( ew
Delhi(@AA.
F. ,lexis eon and Mathews eon( >Database Management Systems?( 5ikas "ublishing 9ouse
"ri:ate imited( ew Delhi( @AA.
2. Raghu Ramakrishnan( >Database Management Systems?( $ourth Edition( Tata M! -raw 9ill(
@A1A.
. -.3.-upta( >Database Management Systems?( Tata M! -raw 9ill( @A11.
G. Rob *ornell( >Database Systems Design and #mplementation?( *engage earning( @A11.
@
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
3/31
ANAND INSTITUTE O4 HIGHER TECHNOLOGY
DEPARTMENT O4 COMPUTER SCIENCE AND ENGINEERING
CS63025DATABASE MANAGEMENT SYSTEMS
PARTA
UNIT I
INTRODUCTION TO DBMS
17 D%)% '#-% 9%9%# -;-#%9<
Database management system HD+MSI is a !olle!tion of interrelated data and a set of
programs to a!!ess those data.
27 L-# ; %$# ==/*#(- () DBMS7
aI +anking
bI ,irlines
!I 6ni:ersities
dI *redit !ard transa!tions
eI Tele !ommuni!ation
fI $inan!e
gI Sales
hI Manufa!turing
iI 9uman resour!es
37 >$# ,% #$% '-'?#%- () )/% =,(*%-- -;-#%9<
The disad:antages of file pro!essing systems are
aI Data redundan!y and in!onsisten!y
bI Diffi!ulty in a!!essing data
!I Data isolation
dI #ntegrity problems
eI ,tomi!ity problems
fI *on!urrent a!!ess anomalies
!7 >$# ,% #$% '?#%- () +- DBMS<
The ad:antages of using a D+MS are
aI *ontrolling redundan!y
bI Restri!ting unauthorized a!!ess
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
4/31
!I "ro:iding multiple user interfa!es
dI Enfor!ing integrity !onstraints.
eI "ro:iding ba!k up and re!o:ery
"7 G?% #$% /%?%/- () '# -#,*#(<
aI "hysi!al le:el
bI logi!al le:el
!I :iew le:el
67 D%)% -#*% ' -*$%9<
I-#*%: *olle!tion of data stored in the data base at a parti!ular moment is !alled an
#nstan!e of the database.
S*$%9: The o:erall design of the data base is !alled the data base s!hema.
@7 D%)% #$% #%,9- 1 =$;-*/ -*$%9 2 /(*/ -*$%97
P$;-*/ -*$%9: The physi!al s!hema des!ribes the database design at the physi!al
le:el( whi!h is the lowest le:el of abstra!tion des!ribing how the data are a!tually stored.
L(*/ -*$%9: The logi!al s!hema des!ribes the database design at the logi!al le:el(
whi!h des!ribes what data are stored in the database and what relationship exists among the
data.
87 >$# - *(*%=#+/ -*$%9<
The s!hemas at the :iew le:el are !alled subs!hemas that des!ribe different :iews
of the database.
7 D%)% '# 9('%/<
, data model is a !olle!tion of !on!eptual tools for des!ribing data( data relationships(
data semanti!s and !onsisten!y !onstraints.
107 >$# - -#(,% 9%,<
, storage manager is a program module that pro:ides the interfa!e between the low le:el
data stored in a database and the appli!ation programs and 'ueries submitted to the system.
117 >$# ,% #$% *(9=(%#- () -#(,% 9%,<
The storage manager !omponents in!lude
aI ,uthorization and integrity manager
bI Transa!tion manager
!I $ile manager
F
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
5/31
dI +uffer manager
127 >$# - #$% =+,=(-% () -#(,% 9%,<
The storage manager is responsible for the following
aI #ntera!tion with he file manager
bI Translation of DM !ommands in to low le:el file system !ommands
!I Storing( retrie:ing and updating data in the database
137 L-# #$% '# -#,+*#+,%- 9=/%9%#%' ; #$% -#(,% 9%,.
The storage manager implements the following data stru!ture
aI Data files
bI Data di!tionary
!I indi!es
1!7 >$# - '# '*#(,;<
, data di!tionary is a data stru!ture whi!h stores meta data about the stru!ture of the
database ie. the s!hema of the database.
1"7 >$# - %##; ,%/#(-$= 9('%/<
The entity relationship model is a !olle!tion of basi! ob4e!ts !alled entities and
relationship among those ob4e!ts. ,n entity is a thing or ob4e!t in the real world that is
distinguishable from other ob4e!ts.
167 >$# ,% ##,+#%-< G?% %9=/%-7
,n entity is represented by a set of attributes. ,ttributes are des!ripti:e properties
possessed by ea!h member of an entity set.
E9=/%: possible attributes of !ustomer entity are !ustomer name( !ustomer id(
!ustomer street( !ustomer !ity.
1@7 >$# - ,%/#(-$=< G?% %9=/%-7
, relationship is an asso!iation among se:eral entities.
E9=/%: , depositor relationship asso!iates a !ustomer with ea!h a!!ount that heJshe has.
187 D%)% #$% #%,9- E##; -%# R%/#(-$= -%#
E##; -%#: The set of all entities of the same type is termed as an entity set.
R%/#(-$= -%#/ The set of all relationships of the same type is termed as a
relationship set.
17 D%)% -/% ?/+%' ' 9+/#?/+%' ##,+#%-7
2
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
6/31
• S/% ?/+%' ##,+#%-/ attributes with a single :alue for a parti!ular entity are !alled
single :alued attributes.
• M+/#?/+%' ##,+#%-/ ,ttributes with a set of :alue for a parti!ular entity are !alled
multi:alued attributes.
207 >$# ,% -#(,%' ' '%,?%' ##,+#%-<
• S#(,%' ##,+#%-/ The attributes stored in a data base are !alled stored attributes.
• D%,?%' ##,+#%-: The attributes that are deri:ed from the stored attributes are
!alled deri:ed attributes.
217 >$# ,% *(9=(-#% ##,+#%-<
*omposite attributes !an be di:ided in to sub parts.
227 D%)% +// ?/+%-7
#n some !ases a parti!ular entity may not ha:e an appli!able :alue for an attribute or if
we do not know the :alue of an attribute for a parti!ular entity. #n these !ases null :alue is used.
237 D%)% #$% #%,9- E##; #;=% E##; -%#
• E##; #;=%: ,n entity type defines a !olle!tion of entities that ha:e the same attributes.
• E##; -%#: The set of all entities of the same type is termed as an entity set.
2!7 >$# - 9%# ; #$% '%,%% () ,%/#(-$= -%#<
The degree of relationship type is the number of parti!ipating entity types.
2"7 D%)% #$% #%,9- %; ##,+#% V/+% -%#
%; ##,+#%/ ,n entity type usually has an attribute whose :alues are distin!t from ea!h
indi:idual entity in the !olle!tion. Su!h an attribute is !alled a key attribute.
V/+% -%#: Ea!h simple attribute of an entity type is asso!iated with a :alue set that
spe!ifies the set of :alues that may be assigned to that attribute for ea!h indi:idual entity.
267 D%)% % ' -#,( %##; -%#-<
>% %##; -%#/ entity set that do not ha:e key attribute of their own are !alled weak
entity sets.
S#,( %##; -%#/ Entity set that has a primary key is termed a strong entity set.
2@7 >$# '(%- #$% *,'/#; ,#( -=%*);<
Mapping !ardinalities or !ardinality ratios express the number of entities to whi!h
another entity !an be asso!iated. Mapping !ardinalities must be one of the following/
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
7/31
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
8/31
3@7 >$# - -+=%, %;<
, super key is a set of one or more attributes that !olle!ti:ely allows us to identify
uni'uely an entity in the entity set.
387 D%)% ,%/#(/ /%,7
The relational algebra is a pro!edural 'uery language. #t !onsists of a set of operations
that take one or two relation as input and produ!e a new relation as output.
37 >$# - SELECT (=%,#(<
The select operation sele!ts tuples that satisfy a gi:en predi!ate. $# - PROJECT (=%,#(<
The pro4e!t operation is a unary operation that returns its argument relation with !ertain
attributes left out. "ro4e!tion is denoted by pi HFI.
!17 D%)% )+*#(/ '%=%'%*;7
, fun!tional dependen!y is a !onstraint between two sets of attributes from the data base.
, fun!tional dependen!y ( denoted by
= 7
+etween two sets of attributes = and 7 that are subsets of R spe!ifies a !onstraint on the possible
tuples that !an form a relation instan!e r of R.RL ,1(,@(N(,nO.
!27 D%)% (,9/#(. ormalization of data is a pro!ess during whi!h unsatisfa!tory relation s!hemas are
de!omposed by breaking up their attributes into smaller relation shemas that possess desirable
properties.
!37 D%)% 1N47
1$ states that the domains of attributes must in!lude only atomi! :alues and that the
:alue of any attribute in a tuple must be a single :alue from the domain of that attribute. #t
disallows multi:alued attributes( !omposite attributes and their !ombinations.
!!7 D%)% 2N47
, relation shema R is in @$ if e:ery nonprime attribute , in R is fully fun!tionally
dependent on the primary key. , fun!tional dependen!y = 7 is a full fun!tional dependen!y if
remo:al of any attribute , from = means that the dependen!y does not hold any moreP that is( for
any attribute ,∈=( H=&,OI = 7.
B
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
9/31
!"7 D%)% 3N47
, relation shema R is in $ if it is in @$ and no nonprime attribute of R is transiti:ely
dependent on the primary key. , funtional dependen!y = 7 in arelation shema R is a
transiti:e dependen!y if ther is a set of attributes 8 that is not a subset of any key of R( and both
=7 and 87 hold.
!67 >$# - %%' )(, (,9/#(.
• To ensure that the update anomalies do not o!!ur.
• ormal forms pro:ide a formal frame work for analyzing relation shemas based on
their keys and on the fun!tional dependen!ies among their attributes.
• , series of tests that !an be !arried out on indi:idual relation s!hemas so that the
relation database !an be normalized to any degree. $# - (''#?% =,(=%,#;7
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
10/31
ossless 4oin property or nonadditi:e property ensures that no spurious tuplesHtuples
!ontaining wrong informationI are generated when a natural 4oin operation is applied to the
relations in the de!omposition.
"07 E=/ BCN4 #$ %9=/%K(, H( #( *(?%,# ,%/#( #( BCN47
+oy!e&*odd ormal form/ #t is stri!ter than $( meaning that e:ery relation in +*$ is
also in $P howe:er a relation in $ is not ne!essarily in +*$. , relation is in +*$ if and
only if e:ery determinant is a !andidate key Hi.eI a relatioln s!hema R is in +*$ if whene:er a
fun!tional dependen!y =&, holds in R( then = is a superkey of R
"17 >$; ,% *%,# )+*#(/ '%=%'%*%- *//%' #,?/ )+*#(/ '%=%'%*%-<
, multi:aluedd fun!tional dependen!y x&7 in R is !alled a tri:ial M5D if
K Y - -+-%# () (,
K UYR
e.g.( the $D ename pname is tri:ial
"27 >$; ,% *%,# )+*#(/ '%=%'%*%- *//%' (#,?/ )+*#(/ '%=%'%*%-<
, multi:alued fun!tional dependen!y x 7 in R is !alled a no&tri:ial M5D if it does
not satisfy the following/
HaI 7 is subset of =HbI =67LR
Ename Eno Dob Dno Dname dmgrno
"37 >$# ,% =#)//- ,%/#(/ '#-% '%-<
• Repetition of informaition
• #nability to represent !ertain information
• oss of information
"!7 E=/ #$% '%-,/% =,(=%,#%- () '%*(9=(-#(7
ossless&4oin de!omposition
Dependen!y preser:ation
Repetition of information
""7 >$# ,% #$% +-%- () )+*#(/ '%=%'%*%-<
Ename "name
1A
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
11/31
To test relations to see whether they are legal under a gi:en set of fun!tional
dependen!ies.
To spe!ify !onstraints on the set of legal relations.
"67 E=/ #,?/ '%=%'%*;<
$un!tional dependen!y of the form U &V. is tri:ial if U * V. Tri:ial fun!tional
dependen!ies are satisfied by all the relations.
UNIT II
SQL & QUERY OPTIMIZATION
17 >$# ,% #$% =,#- () SQL /+%<
The SQ language has se:eral parts/
data & definitition language
Data manipulation language
5iew definition
Transa!tion !ontrol
Embedded SQ
#ntegrity
,uthorization
27 >$# ,% #$% *#%(,%- () SQL *(99'<
SQ !ommands are di:ided in to the following !ategories/
1. Data & Definitition anguage
@. Data Manipulation language
. Data Query anguage
F. Data *ontrol anguage
2. Data ,dministration Statements
. Transa!tion *ontrol Statements
37 >$# ,% #$% #$,%% */--%- () SQL %=,%--(<
SQ expression !onsists of three !lauses/
Sele!t
$rom
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
12/31
!7 G?% #$% %%,/ )(,9 () SQL +%,;<
Sele!t ,1( ,@NNNN.( ,n
$rom R1( R@NNNNN( Rm
$# - #$% +-% () ,%9% (=%,#(<
Rename operation is used to rename both relations and a attributes.#t uses the as !lause(
taking the form/
%ld&name - new&name
67 L-# #$% -#, (=%,#(- -+==(,#%' ; SQL<
1I "attern mat!hing %peration
@I *on!atenation
I Extra!ting !hara!ter strings
FI *on:erting between upper!ase and lower !ase letters.
@7 L-# #$% -%# (=%,#(- () SQL<
1I 6nion
@I #nterse!t operation
I The ex!ept operation
87 >$# - #$% +-% () U( ' #%,-%*#( (=%,#(<
U(/ The result of this operation in!ludes all tuples that are either in r1 or in r@ or in
both r1 and [email protected]!ate tuples are automati!ally eliminated.
I#%,-%*#(: The result of this relation in!ludes all tuples that are in both r1 andr@.
7 >$# ,% ,%#% )+*#(-< A' /-# #$% ,%#% )+*#(- -+==(,#%' ;
SQL<
,ggregate fun!tions are fun!tions that take a !olle!tion of :alues as input and return a
single :alue.
,ggregate fun!tions supported by SQ are
,:erage/ a:g
Minimum/ min
Maximum/ max
Total/ sum
*ount/ !ount
1@
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
13/31
107 >$# - #$% +-% () ,(+= ; */+-%<
G,(+= ; !lause is used to apply aggregate fun!tions to a set of tuples. The attributes
gi:en in the ,(+= ; !lause are used to form groups. Tuples with the same :alue on all
attributes in the ,(+= ; !lause are pla!ed in one group.
117 >$# - #$% +-% () -+ +%,%-<
, sub 'uery is a sele!t&from&where expression that is nested with in another 'uery. ,
!ommon use of sub 'ueries is to perform tests for set membership( make set !omparisions( and
determine set !ardinality.
127 >$# - ?% SQL< H( - # '%)%'<
,ny relation that is not part of the logi!al model( but is made :isible to a user as a :irtual
relation is !alled a :iew.
137
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
14/31
1I*harHnI @I :ar!harHnI I int FI numeri!Hp(dI 2I floatHnI I date.
17 >$# - #$% +-% () #%,#; *(-#,#-<
#ntegrity !onstraints ensure that !hanges made to the database by authorized users do not
result in a loss of data !onsisten!y. Thus integrity !onstraints guard against a!!idental damage to
the database.
207 M%#( #$% 2 )(,9- () #%,#; *(-#,#- ER 9('%/<
• 3ey de!larations
• $orm of a relationship
217 >$# - #,%,<
Triggers are statements that are exe!uted automati!ally by the system as the side effe!t of
a modifi!ation to the database.
227 >$# ,% '(9 *(-#,#-<
, domain is a set of :alues that may be assigned to an attribute .all :alues that appear in a
!olumn of a relation must be taken from the same domain.
237 >$# ,% ,%)%,%#/ #%,#; *(-#,#-<
, :alue that appears in one relation for a gi:en set of attributes also appears for a !ertain
set of attributes in another relation.
2!7 >$# - --%,#(< M%#( #$% )(,9- ?//%7
,n assertion is a predi!ate expressing a !ondition that we wish the database always to
satisfy.
2"7 G?% #$% -;# () --%,#(<
C,%#% --%,#( Wassertion name*$%* Wpredi!ate
267 >$# - #$% %%' )(, #,%,-<
Triggers are useful me!hanisms for alerting humans or for starting !ertain tasks
automati!ally when !ertain !onditions are met.
2@7 L-# #$% ,%+,%9%#- %%'%' #( '%- #,%,7
The re'uirements are
• Spe!ifying when a trigger is to be exe!uted.
• Spe!ify the a!tions to be taken when the trigger exe!utes.
287 G?% #$% )(,9- () #,%,-<
• The triggering e:ent !an be insert or delete.
1F
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
15/31
• $or updated the trigger !an spe!ify !olumns.
• The referen!ing old row as !lause
• The referen!ing new row as !lause
• The triggers !an be initiated before the e:ent or after the e:ent.
27 >$# '(%- '#-% -%*+,#; ,%)%, #(<
Database se!urity refers to the prote!tion from unauthorized a!!ess and mali!ious
destru!tion or alteration.
307 L-# -(9% -%*+,#; ?(/#(- K(, 9% ; )(,9- () 9/*(+- **%--7
• 6nauthorized reading of data
• 6nauthorized modifi!ation of data
• 6nauthorized destru!tion of data.
317 L-# #$% #;=%- () +#$(,#(7
• Read authorization
• $# - +#$(,#( ,=$<
"assing of authorization from one user to another !an be represented by an authorization
graph.
337 L-# (+# ?,(+- +-%, +#$(,#( #( 9('); #$% '#-% -*$%97
• #ndex authorization
• Resour!e authorization
• ,lteration authorization
• Drop authorization
3!7 >$# ,% +'# #,/-<
,n audit trail is a log of all !hanges to the database along with information su!h as whi!h
user performed the !hange and when the !hange was performed.
3"7 M%#( #$% ?,(+- /%?%/- -%*+,#; 9%-+,%-7
• Database system
12
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
16/31
• %perating system
• etwork
• "hysi!al
• 9uman
367 N9% #$% ?,(+- =,?/%%- SQL<
o Delete
o Sele!t
o #nsert
o 6pdate
3@7 M%#( #$% ?,(+- +-%, =,?/%%-7
• ,ll pri:ileges dire!tly granted to the user or role.
• ,ll pri:ileges granted to roles that ha:e been granted to the user or role.
387 G?% #$% /9##(- () SQL +#$(,#(7
• The !ode for !he!king authorization be!omes intermixed with the rest of the
appli!ation !ode.
• #mplementing authorization through appli!ation !ode rather than spe!ifying it
de!larati:ely in SQ makes it hard to ensure the absen!e of loopholes.
37 L-# #$% '-'?#%- () ,%/#(/ '#-% -;-#%9
• Repetition of data
• #nability to represent !ertain information.
!07 >$# '( ;(+ 9% ; Q+%,; O=#9#(?X
#mpro:ing of the strategy for pro!essing a 'uery is !alled >Query %ptimization?. #t is the
responsibility of the system to transform the 'uery as entered by the user into an e'ui:alent
'uery whi!h !an be !omputed more effi!iently.
!17 >$# - *//%' +%,; =,(*%--<
Query pro!essing refers to the range of a!ti:ities in:ol:ed in extra!ting data froma
database.
!27 >$# ,% #$% -#%=- ?(/?%' +%,; =,(*%--<
The basi! steps are/
1
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
17/31
• parsing and translation
• optimization
• E:aluation
!37 >$# - *//%' %?/+#( =,9#?%<, relational algebra operation annotated with instru!tions on how to e:aluate is !alled an
e:aluation primiti:e.
!!7 >$# - *//%' +%,; %?/+#( =/<
, se'uen!e of primiti:e operations that !an be used to e:aluate a 'uery is a 'uery
e:aluation plan or a 'uery exe!ution plan.
!"7 >$# - *//%' +%,; %%*+#( %%<
The 'uery exe!ution engine takes a 'uery e:aluation plan( exe!utes that plan( and returns
the answers to the 'uery.
UNIT III
TRANSACTION PROCESSING AND CONCURRENCY CONTROL
17 >$# - #,-*#(<
*olle!tions of operations that form a single logi!al unit of work are !alled transa!tions.
27 >$# ,% #$% #( -##%9%#- ,%,' #,-*#(<
The two statements regarding transa!tion of the form/
+egin transa!tion
End transa!tion
37 >$# ,% #$% =,(=%,#%- () #,-*#(<
The properties of transa!tions are/
Atomicity
Consistency
Isolation
Durability
!7 >$# - ,%*(?%,; 9%9%# *(9=(%#<
Ensuring durability is the responsibility of a software !omponent of the base system
!alled the re!o:ery management !omponent.
"7 >$% - #,-*#( ,(//%' *<
1G
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
18/31
,ny !hanges that the aborted transa!tion made to the database must be undone. %n!e the
!hanges !aused by an aborted transa!tion ha:e been undone( then the transa!tion has been rolled
ba!k.
67 >$# ,% #$% -##%- () #,-*#(<
The states of transa!tion are
• ,!ti:e
• "artially !ommitted
• $ailed
• ,borted
• *ommitted
•
Terminated@7 >$# - -$'( *(=; -*$%9%<
#t is simple( but effi!ient( s!heme !alled the shadow !opy s!hemes. #t is based on making
!opies of the database !alled shadow !opies that one transa!tion is a!ti:e at a time. The s!heme
also assumes that the database is simply a file on disk.
87 G?% #$% ,%-(- )(, //( *(*+,,%*;<
The reasons for allowing !on!urren!y is if the transa!tions run serially( a short transa!tion
may ha:e to wait for a pre!eding long transa!tion to !omplete( whi!h !an lead to unpredi!table
delays in running a transa!tion. So !on!urrent exe!ution redu!es the unpredi!table delays in
running transa!tions.
7 >$# - ?%,% ,%-=(-% #9%<
The a:erage response time is that the a:erage time for a transa!tion to be !ompleted after
it has been submitted.
107 >$# ,% #$% #( #;=%- () -%,//#;<
The two types of serializability is
*onfli!t serializability
5iew serializability
117 D%)% /(*<
o!k is the most !ommon used to implement the re'uirement is to allow a transa!tion to
a!!ess a data item only if it is !urrently holding a lo!k on that item.
1B
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
19/31
127 >$# ,% #$% '))%,%# 9('%- () /(*<
The modes of lo!k are/
Shared
Ex!lusi:e
137 D%)% '%'/(*<
either of the transa!tion !an e:er pro!eed with its normal exe!ution. This situation is
!alled deadlo!k.
1!7 D%)% #$% =$-%- () #( =$-% /(* =,(#(*(/
-rowing phase/ a transa!tion may obtain lo!ks but not release any lo!k.
Shrinking phase/ a transa!tion may release lo!ks but may not obtain any new
lo!ks.
1"7 D%)% +=,'% ' '(,'%<
• #t pro:ides a me!hanism for !on:ersion from shared lo!k to ex!lusi:e lo!k is
known as upgrade.
• #t pro:ides a me!hanism for !on:ersion from ex!lusi:e lo!k to shared lo!k is
known as downgrade.
167 >$# - '#-% ,=$<
The partial ordering implies that the set D may now be :iewed as a dire!ted a!y!li!
graph( !alled a database graph.
1@7 >$# ,% #$% #( 9%#$('- )(, '%/ '%'/(* =,(/%9<
The two methods for dealing deadlo!k problem is '%'/(* '%#%*#( and '%'/(*
,%*(?%,;.
187 >$# - ,%*(?%,; -*$%9%<
,n integral part of a database system is a re!o:ery s!heme that !an restore the database to
the !onsistent state that existed before the failure.
17 >$# ,% #$% #( #;=%- () %,,(,-<
The two types of errors are/
ogi!al error
System error
207 >$# - 9%# ; /(-%' ,%*(?%,;<
1
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
20/31
The most widely used stru!tures for re!ording database modifi!ations is the log.The log
is a se'uen!e of log re!ords( re!ording all the update a!ti:ities in the database. There are se:eral
types of log re!ords.
217 >$# ,% +*(99##%' 9(')*#(-<
The immediate&modifi!ation te!hni'ue allows database modifi!ations to be output to the
database while the transa!tion is still in the a!ti:e state. Data modifi!ations written by a!ti:e
transa!tions are !alled un!ommitted modifi!ations.
227 D%)% -$'( =7
,n alternati:e to log&based !rash re!o:ery te!hni'ue is shadow paging. This te!hni'ue
needs fewer disk a!!esses than do the log&based methods.
237 D%)% =%7
The database is partitioned into some number of fixed&length blo!ks( whi!h are referred
to as pages.
2!7 >$# ,% #$% ',*- () -$'(= #%*$+%<
*ommit %:erhead
Data fragmentation
-arbage !olle!tion
2"7 D))%,%##% -#,*# #( =$-% /(* =,(#(*(/ ' ,(,(+- #( =$-% /(*
=,(#(*(/7
• S#,*# #( =$-% /(* =,(#(*(/ all ex!lusi:e mode lo!ks taken by a
transa!tion is held until that transa!tion !ommits.
• R(,(+- #( =$-% /(* =,(#(*(/ re'uires that all lo!ks be held until the
transa!tion !ommits.
267 H( #$% #9% -#9=- ,% 9=/%9%#%'<
• 6se the :alue of the system !lo!k as the time stamp. That is a transa!tionYs time
stamp is e'ual to the :alue of the !lo!k when the transa!tion enters the system.
• 6se a logi!al !ounter that is in!remented after a new timestamp has been assignedP
that is the time stamp is e'ual to the :alue of the !ounter.
2@7 >$# ,% #$% #9% -#9=- --(*#%' #$ %*$ '# #%9<
@A
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
21/31
• $# - 9%# ; P$;-*/ /(*-<
The input and output operations are done in blo!k units. The blo!ks residing on the disk
are referred to as physi!al blo!ks.
!7 >$# - 9%# ; +))%, /(*-<
The blo!ks residing temporarily in main memory are referred to as buffer blo!ks.
"7 >$# - 9%# ; '- +))%,<
The area of memory where blo!ks reside temporarily is !alled the disk buffer.
67 D%)% ,% *(//%*#(7
-arbage may be !reated also as a side effe!t of !rashes. "eriodi!ally( it is ne!essary to
find all the garbage pages and to add them to the list of free pages. This pro!ess is !alled garbage
!olle!tion.
@7 >$# - '%<
,n index is a stru!ture that helps to lo!ate desired re!ords of a relation 'ui!kly(without
examining all re!ords.
87 D%)% +%,; (=#9#(7
Query optimization refers to the pro!ess of finding the lowest )!ost method of e:aluating
a gi:en 'uery.
7 >$# ,% #$% #;=%- () -#(,% '%?*%-<
@1
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
22/31
"rimary storage
Se!ondary storage
Tertiary storage
5olatile storage
on:olatile storage
107 >$# - *//%' ,%9== () ' -%*#(,-<
#f the !ontroller dete!ts that a se!tor is damaged when the disk is initially formatted( or
when an attempt is made to write the se!tor( it !an logi!ally map the se!tor to a different physi!al
lo!ation.
117 D%)% **%-- #9%7
,!!ess time is the time from when a read or write re'uest is issued to when data transfer
begins.
127 D%)% -%% #9%7
The time for repositioning the arm is !alled the seek time and it in!reases with the
distan!e that the arm is !alled the seek time.
137 D%)% ?%,% -%% #9%7
The a:erage seek time is the a:erage of the seek times( measured o:er a se'uen!e of
random re'uests.
1!7 D%)% ,(##(/ /#%*; #9%7
The time spent waiting for the se!tor to be a!!essed to appear under the head is !alled the
rotational laten!y time.
1"7 D%)% ?%,% /#%*; #9%7
The a:erage laten!y time of the disk is one&half the time for a full rotation of the disk.
167 >$# - 9%# ; '##,-)%, ,#%<
The data&transfer rate is the rate at whi!h data !an be retrie:ed from or stored to the disk.
1@7 >$# - 9%# ; 9% #9% #( )/+,%<The mean time to failure is the amount of time that the system !ould run !ontinuously
without failure.
187 >$# - /(* ' /(* +9%,<
@@
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
23/31
, blo!k is a !ontiguous se'uen!e of se!tors from a single tra!k of one platter.Ea!h
re'uest spe!ifies the address on the disk to be referen!ed. That address is in the form of a blo!k
number.
17 >$# ,% *//%' (+,/ )/% -;-#%9-<
$ile systems that support log disks are !alled 4ournaling file systems.
207 >$# - #$% +-% () RAID<
, :ariety of disk&organization te!hni'ues( !olle!ti:ely !alled redundant arrays of
independent disks are used to impro:e the performan!e and reliability.
217 >$# - *//%' 9,,(,<
The simplest approa!h to introdu!ing redundan!y is to dupli!ate e:ery disk. This te!hni'ue
is !alled mirroring or shadowing.
227 >$# - *//%' 9% #9% #( ,%=,<
The mean time to failure is the time it takes to repla!e a failed disk and to restore the data
on it.
237 >$# - *//%' #/%?%/ -#,=<
Data striping !onsists of splitting the bits of ea!h byte a!ross multiple disks. This is !alled
bit&le:el striping.
2!7 >$# - *//%' /(*/%?%/ -#,=<
+lo!k le:el striping stripes blo!ks a!ross multiple disks. #t treats the array of disks as a
large disk( and gi:es blo!ks logi!al numbers
2"7 >$# ,% #$% #( 9 (/- () =,//%/-9<
• oad )balan!e multiple small a!!esses( so that the throughput of su!h a!!esses
in!reases.
• "arallelize large a!!esses so that the response time of large a!!esses is redu!ed.
267 >$# ,% #$% )*#(,- #( % #% #( **(+# $% *$((- RAID /%?%/<
• Monetary !ost of extra disk storage re'uirements.
• "erforman!e re'uirements in terms of number of #J% operations
• "erforman!e when a disk has failed.
• "erforman!es during rebuild.
2@7 >$# - 9%# ; -()#,% ' $,',% RAID -;-#%9-<
@
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
24/31
R,#D !an be implemented with no !hange at the hardware le:el( using only software
modifi!ation. Su!h R,#D implementations are !alled software R,#D systems and the systems
with spe!ial hardware support are !alled hardware R,#D systems.
287 D%)% $(# -==<
9ot swapping permits the remo:al of faulty disks and repla!es it by new ones without
turning power off. 9ot swapping redu!es the mean time to repair.
27 >$# ,% #$% ;- $*$ #$% ?,/%/%#$ ,%*(,'- ,-% '#-% -;-#%9-<
• Storage of multiple re!ord types in a file.
• Re!ord types that allow :ariable lengths for one or more fields.
• Re!ord types that allow repeating fields.
307 >$# - #$% +-% () -/(##%'=% -#,+*#+,% ' $# - #$% )(,9#( =,%-%# #$%
$%'%,<
The slotted&page stru!ture is used for organizing re!ords within a single blo!k.The header
!ontains the following information.
• The number of re!ord entries in the header.
• The end of free spa!e
• ,n array whose entries !ontain the lo!ation and size of ea!h re!ord.
317 >$# ,% #$% #( #;=%- () /(*- #$% )%' /%#$ ,%=,%-%##(< D%)% #$%97
,n!hor blo!k/ *ontains the first re!ord of a !hain.
%:erflow blo!k/ *ontains the re!ords other than those that are the first re!ord of a !hain.
327 >$# - ( - $%= )/% (,#(<
#n the heap file organization( any re!ord !an be pla!ed anywhere in the file where there is
spa!e for the re!ord. There is no ordering of re!ords. There is a single file for ea!h relation.
337 >$# - ( - -%+%#/ )/% (,#(<
#n the se'uential file organization( the re!ords are stored in se'uential order(a!!ording to
the :alue of a >sear!h key? of ea!h re!ord.
3!7 >$# - $-$ )/% (,#(<
#n the hashing file organization( a hash fun!tion is !omputed on some attribute of ea!h
re!ord. The result of the hash fun!tion spe!ifies in whi!h blo!k of the file the re!ord should be
pla!ed.
@F
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
25/31
3"7 >$# - ( - */+-#%, )/% (,#(<
#n the !lustering file organization( re!ords of se:eral different relations are stored in the
same file.
367 >$# ,% #$% #;=%- () '*%-<
• %rdered indi!es
• 9ash indi!es
3@7 >$# ,% #$% #%*$+%- #( % %?/+#%' )(, (#$ (,'%,%' '% ' $-$<
• ,!!ess types
• ,!!ess time
• #nsertion time
•
Deletion time
• Spa!e o:erhead
387 >$# - ( - -%,*$ %;<
,n attribute or set of attributes used to look up re!ords in a file is !alled a sear!h key.
37 >$# - =,9,; '%<
, primary index is an index whose sear!h key also defines the se'uential order of the file.
!07 >$# ,% *//%' '%-%+%#/ )/%-<
The files that are ordered se'uentially with a primary index on the sear!h key( are !alled
index&se'uential files.
!17 >$# ,% #$% #( #;=%- () '*%-<
• Dense index
• Sparse index
!27 >$# ,% *//%' 9+/#/%?%/ '*%-<
#ndi!es with two or more le:els are !alled multile:el indi!es.
!37 >$# - BT,%%<
, +&tree eliminates the redundant storage of sear!h&key :alues .#t allows sear!h key
:alues to appear only on!e.
!!7 >$# - BT,%% '%<
, +;&Tree index takes the form of a balan!ed tree in whi!h e:ery path from the root of
the root of the root of the tree to a leaf of the tree is of the same length.
@2
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
26/31
!"7 >$# - $-$ '%<
, hash index organizes the sear!h keys( with their asso!iated pointers( into a hash file
stru!ture.
!67 >$# ,% *//%' - '% -*-<
Sear!h algorithms that use an index are referred to as index s!ans.
!@7 >$# - *//%' - %#%,/ -(,#<
Sorting of relations that do not fit into memory is !alled as external sorting.
!87 >$# - *//%' - ,%*+,-?% =,##(<
The system repeats the splitting of the input until ea!h partition of the build input fits in
the memory. Su!h partitioning is !alled re!ursi:e partitioning.
!7 >$# - *//%' - N; 9%,%<
The merge operation is a generalization of the two&way merge used by the standard in&
memory sort&merge algorithm. #t merges runs( so it is !alled an &way merge.
"07 >$# - ( - )+'% )*#(,<
The number of partitions is in!reased by a small :alue !alled the fudge fa!tor(whi!h is
usually @A per!ent of the number of hash partitions !omputed.
UNIT V
ADVANCED TOPICS
17 >$# ,% #$% */--)*#(- () #$,%#-<
• "hysi!al Threats
• ,!!idental error
• 6nauthorized a!!ess
• Mali!ious misuse
27 D%)% '# 9
Data mining is a pro!ess of extra!ting or mining knowledge from huge amount of data.
37 >$# ,% #$% -#%=- #$% '# 9 =,(*%--<
• Data !leaning
• Data integration
• Data sele!tion
• Data transformation
@
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
27/31
• Data mining
• "attern e:aluation
• 3nowledge representation
!7 >$# ,% #$% +-%- () -##-#*- '# 9< Statisti!s is used to
• To estimate the !omplexity of a data mining problemP
• suggest whi!h data mining te!hni'ues are most likely to be su!!essfulP and
• identify data fields that !ontain the most >surfa!e information?.
"7 D%)% D# C/--)*#(7
#t is a two&step pro!ess. #n the first step( a model is built des!ribing a pre&determined set
of data !lasses or !on!epts. The model is !onstru!ted by analyzing database tuples des!ribed byattributes. #n the se!ond step the model is used for !lassifi!ation.
67 >$# - A--(*#( ,+/%<
,sso!iation rule finds interesting asso!iation or !orrelation relationships among a large
set of data items( whi!h is used for de!ision&making pro!esses. ,sso!iation rules analyzes buying
patterns that are fre'uently asso!iated or pur!hased together.
@7 H( ,% --(*#( ,+/%- 9%' ),(9 /,% '#-%-<
,sso!iation rule mining is a two&step pro!ess.
• $ind all fre'uent itemsets.
• -enerate strong asso!iation rules from the fre'uent itemsets.
87 >$; '( ;(+ %%' '# ,%$(+-% /)% *;*/% =,(*%--<
Data warehouse life !y!le approa!h is essential be!ause it ensures that the pro4e!t pie!es
are brought together in the right order and at the right time.
7 >$# ,% #$% 9%,#- () D# >,%$(+-%<
• ,bility to make effe!ti:e de!isions from database
• +etter analysis of data and de!ision support
• Dis!o:er trends and !orrelations that benefits business
• 9andle huge amount of data.
107 L-# -(9% () #$% D# >,%$(+-% #((/-<
@G
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
28/31
• %," H%nline ,nalyti! "ro!essingI
• R%," HRelational %,"I
• End 6ser Data ,!!ess tool
• ,d 9o! Query tool
• Data Transformation ser:i!es
• Repli!ation
ANAND INSTITUTE O4 HIGHER TECHNOLOGY
DEPARTMENT O4 COMPUTER SCIENCE AND ENGINEERING
CS63025DATABASE MANAGEMENT SYSTEMS
PARTB
UNIT I
1. Explain in detail about file Systems %rganization with example.
@. Explain in detail about purpose of Database System
.
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
29/31
11. Explain the +oy!eJ*odd normal form with an example. ,lso state how it differs from that
of $.1@.
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
30/31
. Explain embedded SQ with suitable example.
1A. *onsider the employee database ( where the primary keys are underlined.
employeeHempname(street(!ityI
worksHempname(!ompanyname(salaryI
!ompanyH!ompanyname(!ityI
managesHempname(managementI
-i:e an expression in the relational algebra for ea!h re'uest.
1I $ind the names of all employees who work for $irst +ank *orporation.
@I $ind the names( street addresses and !ities of residen!e of all employees who work for
$irst +ank *orporation and earn more than @AAAAA per annum.
I $ind the names of all employees in this database who li:e in the same !ity as the
!ompany for whi!h they work.
FI $ind the names of all employees who earn more than e:ery employees of small +ank
*orporation.
UNIT III
1. Explain testing for Serializability with respe!t to !on!urren!y !ontrol s!hemes. 9ow will
you determine whether a s!hedule is serializable or not.
@. Explain the following proto!ols for !on!urren!y !ontrol/
i. o!k&based proto!ols.
ii. Time stamp based proto!ols.
.
-
8/18/2019 Dbms Question Bank2 Marks 16 Marks
31/31
@. Des!ribe the stru!ture of +; tree and list the !hara!teristi!s of a +; tree.
.