Sie sind auf Seite 1von 8

7. Define the "integrity rules"?

There are two Integrity rules.


1. Entity Integrity: States that "Primary key cannot have NULL value"
2. Referential Integrity: States that "Foreign ey can !e either a NULL value or shoul"
!e Primary ey value o# other relation.
8. What is extension and intension?
1. Extension: It is the num!er o# tu$les $resent in a ta!le at any instance. This is time
"e$en"ent.
2. Intension: It is a constant value that gives the name% structure o# ta!le an" the
constraints lai" on it.
9. What is System R? What are its to ma!or su"systems?
System & was "esigne" an" "evelo$e" over a $erio" o# 1'()*(' at I+, San -ose &esearch
.enter. It is a $rototy$e an" its $ur$ose was to "emonstrate that it is $ossi!le to !uil" a
&elational System that can !e use" in a real li#e environment to solve real li#e $ro!lems% with
$er#ormance at least com$ara!le to that o# e/isting system.
Its two su!systems are
1. &esearch Storage
2. System &elational 0ata System.
#$. %o is the data stru&ture of System R different from the relational stru&ture?
Unlike &elational systems in System &
1. 0omains are not su$$orte"
2. 1n#orcement o# can"i"ate key uni2ueness is o$tional
3. 1n#orcement o# entity integrity is o$tional
). &e#erential integrity is not en#orce"
##. What is Data Inde'enden&e?
0ata in"e$en"ence means that "the a$$lication is in"e$en"ent o# the storage structure an"
access strategy o# "ata". In other wor"s% The a!ility to mo"i#y the schema "e#inition in one
level shoul" not a##ect the schema "e#inition in the ne/t higher level.
Two ty$es o# 0ata In"e$en"ence4
1. (hysi&al Data Inde'enden&e: ,o"i#ication in $hysical level shoul" not a##ect the
logical level.
2. )ogi&al Data Inde'enden&e: ,o"i#ication in logical level shoul" a##ect the view level.
N5T14 Logical 0ata In"e$en"ence is more "i##icult to achieve
#*. What is a +ie? %o it is related to data inde'enden&e?
6 view may !e thought o# as a virtual ta!le% that is% a ta!le that "oes not really e/ist in its own
right !ut is instea" "erive" #rom one or more un"erlying !ase ta!le. In other wor"s% there is
no store" #ile that "irect re$resents the view instea" a "e#inition o# view is store" in "ata
"ictionary.
7rowth an" restructuring o# !ase ta!les is not re#lecte" in views. Thus the view can insulate
users #rom the e##ects o# restructuring an" growth in the "ata!ase. 8ence accounts #or logical
"ata in"e$en"ence.
#,. What is Data -odel?
6 collection o# conce$tual tools #or "escri!ing "ata% "ata relationshi$s "ata semantics an"
constraints.
#.. What is E/R model?
This "ata mo"el is !ase" on real worl" that consists o# !asic o!9ects calle" entities an" o#
relationshi$ among these o!9ects. 1ntities are "escri!e" in a "ata!ase !y a set o# attri!utes.
#0. What is 1"!e&t 1riented model?
This mo"el is !ase" on collection o# o!9ects. 6n o!9ect contains values store" in instance
varia!les with in the o!9ect. 6n o!9ect also contains !o"ies o# co"e that o$erate on the o!9ect.
These !o"ies o# co"e are calle" metho"s. 5!9ects that contain same ty$es o# values an" the
same metho"s are grou$e" together into classes.
#2. What is an Entity?
It is a :thing: in the real worl" with an in"e$en"ent e/istence.
#7. What is an Entity ty'e?
It is a collection ;set< o# entities that have same attri!utes.
#8. What is an Entity set?
It is a collection o# all entities o# $articular entity ty$e in the "ata!ase.
#9. What is an Extension of entity ty'e?
The collections o# entities o# a $articular entity ty$e are grou$e" together into an entity set.
*$. What is Wea3 Entity set?
6n entity set may not have su##icient attri!utes to #orm a $rimary key% an" its $rimary key
com$romises o# its $artial key an" $rimary key o# its $arent entity% then it is sai" to !e =eak
1ntity set.
*#. What is an attri"ute?
It is a $articular $ro$erty% which "escri!es the entity.
**. What is a Relation S&hema and a Relation?
6 relation Schema "enote" !y &;61% 62% ...% 6n< is ma"e u$ o# the relation name & an" the list
o# attri!utes 6i that it contains. 6 relation is "e#ine" as a set o# tu$les. Let r !e the relation
which contains set tu$les ;t1% t2% t3% ...% tn<. 1ach tu$le is an or"ere" list o# n*values
t>;v1%v2% ...% vn<.
*,. What is degree of a Relation?
It is the num!er o# attri!ute o# its relation schema.
*.. What is Relationshi'?
It is an association among two or more entities.
*0. What is Relationshi' set?
The collection ;or set< o# similar relationshi$s.
*2. What is Relationshi' ty'e?
&elationshi$ ty$e "e#ines a set o# associations or a relationshi$ set among a given set o# entity
ty$es.
*7. What is degree of Relationshi' ty'e?
It is the num!er o# entity ty$e $artici$ating.
*8. What is DD) 4Data Definition )anguage5?
6 "ata !ase schema is s$eci#ies !y a set o# "e#initions e/$resse" !y a s$ecial language calle"
00L.
*9. What is 6D) 46ie Definition )anguage5?
It s$eci#ies user views an" their ma$$ings to the conce$tual schema.
,$. What is SD) 4Storage Definition )anguage5?
This language is to s$eci#y the internal schema. This language may s$eci#y the ma$$ing
!etween two schemas.
,#. What is Data Storage / Definition )anguage?
The storage structures an" access metho"s use" !y "ata!ase system are s$eci#ie" !y a set o#
"e#inition in a s$ecial ty$e o# 00L calle" "ata storage*"e#inition language.
,*. What is D-) 4Data -ani'ulation )anguage5?
This language that ena!le user to access or mani$ulate "ata as organise" !y a$$ro$riate "ata
mo"el.
1. (ro&edural D-) or )o le+el: 0,L re2uires a user to s$eci#y what "ata are nee"e"
an" how to get those "ata.
2. 7on/(ro&edural D-) or %igh le+el: 0,L re2uires a user to s$eci#y what "ata are
nee"e" without s$eci#ying how to get those "ata.
,,. What is D-) 8om'iler?
It translates 0,L statements in a 2uery language into low*level instruction that the 2uery
evaluation engine can un"erstan".
,.. What is 9uery e+aluation engine?
It e/ecutes low*level instruction generate" !y com$iler.
,0. What is DD) Inter'reter?
It inter$rets 00L statements an" recor" them in ta!les containing meta"ata.
,2. What is Re&ord/at/a/time?
The Low level or Proce"ural 0,L can s$eci#y an" retrieve each recor" #rom a set o# recor"s.
This retrieve o# a recor" is sai" to !e &ecor"*at*a*time.
,7. What is Set/at/a/time or Set/oriented?
The 8igh level or Non*$roce"ural 0,L can s$eci#y an" retrieve many recor"s in a single 0,L
statement. This retrieve o# a recor" is sai" to !e Set*at*a*time or Set*oriente".
,8. What is Relational :lge"ra?
It is $roce"ural 2uery language. It consists o# a set o# o$erations that take one or two relations
as in$ut an" $ro"uce a new relation.
,9. What is Relational 8al&ulus?
It is an a$$lie" $re"icate calculus s$eci#ically tailore" #or relational "ata!ases $ro$ose" !y 1.F.
.o"". 1.g. o# languages !ase" on it are 0SL 6LP86% ?U1L.
.$. %o does ;u'le/oriented relational &al&ulus differ from domain/oriented
relational &al&ulus?
1. The tu'le/oriented &al&ulus uses a tu$le varia!les i.e.% varia!le whose only $ermitte"
values are tu$les o# that relation. 1.g. ?U1L
2. The domain/oriented &al&ulus has "omain varia!les i.e.% varia!les that range over the
un"erlying "omains instea" o# over relation. 1.g. ILL% 010U.1.
.#. What is normali<ation?
It is a $rocess o# analysing the given relation schemas !ase" on their Functional 0e$en"encies
;F0s< an" $rimary key to achieve the $ro$erties
;1<.,inimi@ing re"un"ancy% ;2<. ,inimi@ing insertion% "eletion an" u$"ate anomalies.
.*. What is =un&tional De'enden&y?
6 Functional "e$en"ency is "enote" !y A B !etween two sets o# attri!utes A an" B that are
su!sets o# & s$eci#ies a constraint on the $ossi!le tu$le that can #orm a relation state r o# &.
The constraint is #or any two tu$les t1 an" t2 in r i# t1CAD > t2CAD then they have t1CBD > t2CBD.
This means the value o# A com$onent o# a tu$le uni2uely "etermines the value o# com$onent B.
.,. What is )ossless !oin 'ro'erty?
It guarantees that the s$urious tu$le generation "oes not occur with res$ect to relation
schemas a#ter "ecom$osition.
... What is # 7= 47ormal =orm5?
The "omain o# attri!ute must inclu"e only atomic ;sim$le% in"ivisi!le< values.
.0. What is =ully =un&tional de'enden&y?
It is !ase" on conce$t o# #ull #unctional "e$en"ency. 6 #unctional "e$en"ency A B is #ull
#unctional "e$en"ency i# removal o# any attri!ute 6 #rom A means that the "e$en"ency "oes
not hol" any more.
.2. What is *7=?
6 relation schema & is in 2NF i# it is in 1NF an" every non*$rime attri!ute 6 in & is #ully
#unctionally "e$en"ent on $rimary key.
.7. What is ,7=?
6 relation schema & is in 3NF i# it is in 2NF an" #or every F0 A 6 either o# the #ollowing is true
1. A is a Su$er*key o# &.
2. 6 is a $rime attri!ute o# &.
In other wor"s% i# every non $rime attri!ute is non*transitively "e$en"ent on $rimary key.
.8. What is >87= 4>oy&e/8odd 7ormal =orm5?
6 relation schema & is in +.NF i# it is in 3NF an" satis#ies an a""itional constraint that #or
every F0 A 6% A must !e a can"i"ate key.
.9. What is .7=?
6 relation schema & is sai" to !e in )NF i# #or every ,ultivalue" "e$en"ency A B that hol"s
over &% one o# #ollowing is true.
1.< A is su!set or e2ual to ;or< AB > &.
2.< A is a su$er key.
0$. What is 07=?
6 &elation schema & is sai" to !e ENF i# #or every 9oin "e$en"ency F&1% &2% ...% &nG that hol"s
&% one the #ollowing is true 1.< &i > & #or some i.
2.< The 9oin "e$en"ency is im$lie" !y the set o# F0% over & in which the le#t si"e is key o# &.
0#. What is Domain/?ey 7ormal =orm?
6 relation is sai" to !e in 0NF i# all constraints an" "e$en"encies that shoul" hol" on the the
constraint can !e en#orce" !y sim$ly en#orcing the "omain constraint an" key constraint on the
relation.
0*. What are 'artial@ alternate@@ artifi&ial@ &om'ound and natural 3ey?
1. (artial ?ey: It is a set o# attri!utes that can uni2uely i"enti#y weak entities an" that
are relate" to same owner entity. It is sometime calle" as 0iscriminator.
2. :lternate ?ey: 6ll .an"i"ate eys e/clu"ing the Primary ey are known as 6lternate
eys.
3. :rtifi&ial ?ey: I# no o!vious key% either stan" alone or com$oun" is availa!le% then the
last resort is to sim$ly create a key% !y assigning a uni2ue num!er to each recor" or
occurrence. Then this is known as "evelo$ing an arti#icial key.
). 8om'ound ?ey: I# no single "ata element uni2uely i"enti#ies occurrences within a
construct% then com!ining multi$le elements to create a uni2ue i"enti#ier #or the
construct is known as creating a com$oun" key.
E. 7atural ?ey: =hen one o# the "ata elements store" within a construct is utili@e" as the
$rimary key% then it is calle" the natural key.
0,. What is indexing and hat are the different 3inds of indexing?
In"e/ing is a techni2ue #or "etermining how 2uickly s$eci#ic "ata can !e #oun".
Ty$es4
1. +inary search style in"e/ing
2. +*Tree in"e/ing
3. Inverte" list in"e/ing
). ,emory resi"ent ta!le
E. Ta!le in"e/ing
0.. What is system &atalog or &atalog relation? %o is "etter 3non as?
6 &0+,S maintains a "escri$tion o# all the "ata that it contains% in#ormation a!out every
relation an" in"e/ that it contains. This in#ormation is store" in a collection o# relations
maintaine" !y the system calle" meta"ata. It is also calle" "ata "ictionary.
00. What is meant "y Auery o'timi<ation?
The $hase that i"enti#ies an e##icient e/ecution $lan #or evaluating a 2uery that has the least
estimate" cost is re#erre" to as 2uery o$timi@ation.
02. What is dura"ility in D>-S?
5nce the 0+,S in#orms the user that a transaction has success#ully com$lete"% its e##ects
shoul" $ersist even i# the system crashes !e#ore all its changes are re#lecte" on "isk. This
$ro$erty is calle" "ura!ility.
07. What do you mean "y atomi&ity and aggregation?
1. :tomi&ity: 1ither all actions are carrie" out or none are. Users shoul" not have to
worry a!out the e##ect o# incom$lete transactions. 0+,S ensures this !y un"oing the
actions o# incom$lete transactions.
2. :ggregation: 6 conce$t which is use" to mo"el a relationshi$ !etween a collection o#
entities an" relationshi$s. It is use" when we nee" to e/$ress a relationshi$ among
relationshi$s.
08. What is a (hantom Deadlo&3?
In "istri!ute" "ea"lock "etection% the "elay in $ro$agating local in#ormation might cause the
"ea"lock "etection algorithms to i"enti#y "ea"locks that "o not really e/ist. Such situations are
calle" $hantom "ea"locks an" they lea" to unnecessary a!orts.
09. What is a &he&3'oint and When does it o&&ur?
6 .heck$oint is like a sna$shot o# the 0+,S state. +y taking check$oints% the 0+,S can
re"uce the amount o# work to !e "one "uring restart in the event o# su!se2uent crashes.
2$. What are the different 'hases of transa&tion?
0i##erent $hases are
1.< 6nalysis $hase%
2.< &e"o Phase%
3.< Un"o $hase.
2#. What do you mean "y flat file data"ase?
It is a "ata!ase in which there are no $rograms or user access languages. It has no cross*#ile
ca$a!ilities !ut is user*#rien"ly an" $rovi"es user*inter#ace management.
2*. What is "trans'arent D>-S"?
It is one% which kee$s its Physical Structure hi""en #rom user.
2,. What is a Auery?
6 2uery with res$ect to 0+,S relates to user comman"s that are use" to interact with a "ata
!ase. The 2uery language can !e classi#ie" into "ata "e#inition language an" "ata mani$ulation
language.
2.. What do you mean "y 8orrelated su"Auery?
Su!2ueries% or neste" 2ueries% are use" to !ring !ack a set o# rows to !e use" !y the $arent
2uery. 0e$en"ing on how the su!2uery is written% it can !e e/ecute" once #or the $arent 2uery
or it can !e e/ecute" once #or each row returne" !y the $arent 2uery. I# the su!2uery is
e/ecute" #or each row o# the $arent% this is calle" a correlate" su!2uery.
6 correlate" su!2uery can !e easily i"enti#ie" i# it contains any re#erences to the $arent
su!2uery columns in its =81&1 clause. .olumns #rom the su!2uery cannot !e re#erence"
anywhere else in the $arent 2uery. The #ollowing e/am$le "emonstrates a non*correlate"
su!2uery.
1/am$le4 Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER Where
CUST.CNUM = ORDER.CNUM)
20. What are the 'rimiti+e o'erations &ommon to all re&ord management systems?
6""ition% "eletion an" mo"i#ication.
22. 7ame the "uffer in hi&h all the &ommands that are ty'ed in are stored?
:1"it: +u##er.
27. What are the unary o'erations in Relational :lge"ra?
P&5-1.TI5N an" S1L1.TI5N.
28. :re the resulting relations of (R1DB8; and C1I7 o'eration the same?
No.
(R1DB8;4 .oncatenation o# every row in one relation with every row in another.
C1I74 .oncatenation o# rows #rom one relation an" relate" rows #rom another.
29. What is RD>-S ?ER7E)?
Two im$ortant $ieces o# &0+,S architecture are the kernel% which is the so#tware% an" the
"ata "ictionary% which consists o# the system*level "ata structures use" !y the kernel to
manage the "ata!ase Bou might think o# an &0+,S as an o$erating system ;or set o#
su!systems<% "esigne" s$eci#ically #or controlling "ata accessH its $rimary #unctions are
storing% retrieving% an" securing "ata. 6n &0+,S maintains its own list o# authori@e" users an"
their associate" $rivilegesH manages memory caches an" $agingH controls locking #or
concurrent resource usageH "is$atches an" sche"ules user re2uestsH an" manages s$ace
usage within its ta!le*s$ace structures.
7$. 7ame the su"/systems of a RD>-S.
II5% Security% Language Processing% Process .ontrol% Storage ,anagement% Logging an"
&ecovery% 0istri!ution .ontrol% Transaction .ontrol% ,emory ,anagement% Lock ,anagement.
7#. Whi&h 'art of the RD>-S ta3es &are of the data di&tionary? %o?
0ata "ictionary is a set o# ta!les an" "ata!ase o!9ects that is store" in a s$ecial area o# the
"ata!ase an" maintaine" e/clusively !y the kernel.
7*. What is the !o" of the information stored in data/di&tionary?
The in#ormation in the "ata "ictionary vali"ates the e/istence o# the o!9ects% $rovi"es access to
them% an" ma$s the actual $hysical storage location.
7,. %o do you &ommuni&ate ith an RD>-S?
Bou communicate with an &0+,S using Structure" ?uery Language ;S?L<.
7.. Define S9) and state the differen&es "eteen S9) and other &on+entional
'rogramming )anguages.
S?L is a non$roce"ural language that is "esigne" s$eci#ically #or "ata access o$erations on
normali@e" relational "ata!ase structures. The $rimary "i##erence !etween S?L an" other
conventional $rogramming languages is that S?L statements s$eci#y what "ata o$erations
shoul" !e $er#orme" rather than how to $er#orm them.
70. 7ame the three ma!or set of files on dis3 that &om'ose a data"ase in 1ra&le.
There are three ma9or sets o# #iles on "isk that com$ose a "ata!ase. 6ll the #iles are !inary.
These are
1.< 0ata!ase #iles
2.< .ontrol #iles
3.< &e"o logs
The most im$ortant o# these are the "ata!ase #iles where the actual "ata resi"es. The control
#iles an" the re"o logs su$$ort the #unctioning o# the architecture itsel#. 6ll three sets o# #iles
must !e $resent% o$en% an" availa!le to 5racle #or any "ata on the "ata!ase to !e usea!le.
=ithout these #iles% you cannot access the "ata!ase% an" the "ata!ase a"ministrator might
have to recover some or all o# the "ata!ase using a !acku$% i# there is one.
72. What is data"ase ;rigger?
6 "ata!ase trigger is a PLIS?L !lock that can "e#ine" to automatically e/ecute #or insert%
u$"ate% an" "elete statements against a ta!le. The trigger can e "e#ine" to e/ecute once #or
the entire statement or once #or every row that is inserte"% u$"ate"% or "elete". For any one
ta!le% there are twelve events #or which you can "e#ine "ata!ase triggers. 6 "ata!ase trigger
can call "ata!ase $roce"ures that are also written in PLIS?L.
77. What are stored/'ro&edures? :nd hat are the ad+antages of using them?
Store" $roce"ures are "ata!ase o!9ects that $er#orm a user "e#ine" o$eration. 6 store"
$roce"ure can have a set o# com$oun" S?L statements. 6 store" $roce"ure e/ecutes the S?L
comman"s an" returns the result to the client. Store" $roce"ures are use" to re"uce network
tra##ic.
78. What is Storage -anager?
It is a $rogram mo"ule that $rovi"es the inter#ace !etween the low*level "ata store" in
"ata!ase% a$$lication $rograms an" 2ueries su!mitte" to the system.
79. What is >uffer -anager?
It is a $rogram mo"ule% which is res$onsi!le #or #etching "ata #rom "isk storage into main
memory an" "eci"ing what "ata to !e cache in memory.
8$. What is ;ransa&tion -anager?
It is a $rogram mo"ule% which ensures that "ata!ase% remains in a consistent state "es$ite
system #ailures an" concurrent transaction e/ecution $rocee"s without con#licting.
8#. What is =ile -anager?
It is a $rogram mo"ule% which manages the allocation o# s$ace on "isk storage an" "ata
structure use" to re$resent in#ormation store" on a "isk.
8*. What is :uthori<ation and Integrity manager?
It is the $rogram mo"ule% which tests #or the satis#action o# integrity constraint an" checks the
authority o# user to access "ata.
8,. What are stand/alone 'ro&edures?
Proce"ures that are not $art o# a $ackage are known as stan"*alone !ecause they
in"e$en"ently "e#ine". 6 goo" e/am$le o# a stan"*alone $roce"ure is one written in a
S?LJForms a$$lication. These ty$es o# $roce"ures are not availa!le #or re#erence #rom other
5racle tools. 6nother limitation o# stan"*alone $roce"ures is that they are com$ile" at run
time% which slows e/ecution.
8.. What are &ursors gi+e different ty'es of &ursors?
PLIS?L uses cursors #or all "ata!ase in#ormation accesses statements. The language su$$orts
the use two ty$es o# cursors
1.< Im$licit
2.< 1/$licit
80. What is &old "a&3u' and hot "a&3u' 4in &ase of 1ra&le5?
1. 8old >a&3u': It is co$ying the three sets o# #iles ;"ata!ase #iles% re"o logs% an" control
#ile< when the instance is shut "own. This is a straight #ile co$y% usually #rom the "isk
"irectly to ta$e. Bou must shut "own the instance to guarantee a consistent co$y. I# a
col" !acku$ is $er#orme"% the only o$tion availa!le in the event o# "ata #ile loss is
restoring all the #iles #rom the latest !acku$. 6ll work $er#orme" on the "ata!ase since
the last !acku$ is lost.
2. %ot >a&3u': Some sites ;such as worl"wi"e airline reservations systems< cannot shut
"own the "ata!ase while making a !acku$ co$y o# the #iles. The col" !acku$ is not an
availa!le o$tion.
82. What is meant "y (roa&ti+e@ Retroa&ti+e and Simultaneous B'date.
1. (roa&ti+e B'date: The u$"ates that are a$$lie" to "ata!ase !e#ore it !ecomes
e##ective in real worl".
2. Retroa&ti+e B'date: The u$"ates that are a$$lie" to "ata!ase a#ter it !ecomes
e##ective in real worl".
3. Simulatneous B'date: The u$"ates that are a$$lie" to "ata!ase at the same time
when it !ecomes e##ective in real worl".

Das könnte Ihnen auch gefallen