Sie sind auf Seite 1von 18

Visit www.aucse.com A website on big ideas!

RDBMS Concepts
1. What is database? A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

2. What is DBMS? It is a collection of programs that enables user to create and maintain a database. In other words it is general purpose software that pro!ides the users with the processes of defining, constructing and manipulating the database for !arious applications. 3. What is a Database system? "he database and DBMS software together is called as Database system. 4. ". d!antages of DBMS? Redundancy is controlled. #nauthorised access is restricted. $ro!iding multiple user interfaces. %nforcing integrity constraints. $ro!iding bac&up and reco!ery. Disad!antage in #ile $rocessing System? Data redundancy ' inconsistency. Difficult in accessing data. Data isolation. Data integrity. Concurrent access is not possible. Security $roblems.

%. Describe the three le!els of data abstraction? "he are three le!els of abstraction( $hysical le!el& "he lowest le!el of abstraction describes how data are stored. 'ogical le!el& "he ne)t higher le!el of abstraction, describes what data are stored in database and what relationship among those data. (ie) le!el& "he highest le!el of abstraction describes only part of entire database. *. Define the +integrity rules+ "here are two Integrity rules. ,ntity -ntegrity& States that *$rimary &ey cannot ha!e +#,, !alue-

Visit www.aucse.com A website on big ideas! .eferential -ntegrity& States that */oreign 0ey can be either a +#,, !alue or should be $rimary 0ey !alue of other relation. /. What is e0tension and intension? ,0tension It is the number of tuples present in a table at any instance. "his is time dependent. -ntension It is a constant !alue that gi!es the name, structure of table and the constraints laid on it. 1. What is System .? What are its t)o ma2or subsystems? System R was designed and de!eloped o!er a period of .123 21 at IBM San 4ose Research Center. It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life en!ironment to sol!e real life problems, with performance at least comparable to that of e)isting system. Its two subsystems are Research Storage System Relational Data System. 13. 4o) is the data structure of System . different from the relational structure? #nli&e Relational systems in System R Domains are not supported %nforcement of candidate &ey uni5ueness is optional %nforcement of entity integrity is optional Referential integrity is not enforced 11. What is Data -ndependence? Data independence means that *the application is independent of the storage structure and access strategy of data-. In other words, "he ability to modify the schema definition in one le!el should not affect the schema definition in the ne)t higher le!el. "wo types of Data Independence( $hysical Data Independence( Modification in physical le!el should not affect the logical le!el. ,ogical Data Independence( Modification in logical le!el should affect the !iew le!el. 567,& 'ogical Data -ndependence is more difficult to achie!e 12. What is a !ie)? 4o) it is related to data independence? A !iew may be thought of as a !irtual table, that is, a table that does not really e)ist in its own right but is instead deri!ed from one or more underlying base table. In other words, there is no stored file that direct represents the !iew instead a definition of !iew is stored in data dictionary.

Visit www.aucse.com A website on big ideas! 7rowth and restructuring of base tables is not reflected in !iews. "hus the !iew can insulate users from the effects of restructuring and growth in the database. 8ence accounts for logical data independence. 13. What is Data Model? A collection of conceptual tools for describing data, data relationships data semantics and constraints. 14. What is ,8. model? "his data model is based on real world that consists of basic ob9ects called entities and of relationship among these ob9ects. %ntities are described in a database by a set of attributes. 1". What is 6b2ect 6riented model? "his model is based on collection of ob9ects. An ob9ect contains !alues stored in instance !ariables with in the ob9ect. An ob9ect also contains bodies of code that operate on the ob9ect. "hese bodies of code are called methods. :b9ects that contain same types of !alues and the same methods are grouped together into classes. 1%. What is an ,ntity? It is a ;thing; in the real world with an independent e)istence. 1*. What is an ,ntity type? It is a collection <set= of entities that ha!e same attributes. 1/. What is an ,ntity set? It is a collection of all entities of particular entity type in the database. 11. What is an ,0tension of entity type? "he collections of entities of a particular entity type are grouped together into an entity set. 23. What is Wea9 ,ntity set? An entity set may not ha!e sufficient attributes to form a primary &ey, and its primary &ey compromises of its partial &ey and primary &ey of its parent entity, then it is said to be >ea& %ntity set. 21. What is an attribute? It is a particular property, which describes the entity. 22. What is a .elation Schema and a .elation? A relation Schema denoted by R<A., A6, ?, An= is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. ,et r be the relation which contains set tuples <t., t6, t@, ..., tn=. %ach tuple is an ordered list of n !alues tA<!.,!6, ..., !n=.

Visit www.aucse.com A website on big ideas! 23. What is degree of a .elation? It is the number of attribute of its relation schema. 24. What is .elationship? It is an association among two or more entities. 2". What is .elationship set? "he collection <or set= of similar relationships. 2%. What is .elationship type? Relationship type defines a set of associations or a relationship set among a gi!en set of entity types. 2*. What is degree of .elationship type? It is the number of entity type participating. 2". What is DD' :Data Definition 'anguage;? A data base schema is specifies by a set of definitions e)pressed by a special language called DD,. 2%. What is (D' :(ie) Definition 'anguage;? It specifies user !iews and their mappings to the conceptual schema. 2*. What is SD' :Storage Definition 'anguage;? "his language is to specify the internal schema. "his language may specify the mapping between two schemas. 2/. What is Data Storage 8 Definition 'anguage? "he storage structures and access methods used by database system are specified by a set of definition in a special type of DD, called data storage definition language. 21. What is DM' :Data Manipulation 'anguage;? "his language that enable user to access or manipulate data as organised by appropriate data model. $rocedural DM' or 'o) le!el& DM, re5uires a user to specify what data are needed and how to get those data. 5on8$rocedural DM' or 4igh le!el& DM, re5uires a user to specify what data are needed without specifying how to get those data. 31. What is DM' <ompiler? It translates DM, statements in a 5uery language into low le!el instruction that the 5uery e!aluation engine can understand. 32. What is =uery e!aluation engine? It e)ecutes low le!el instruction generated by compiler.

Visit www.aucse.com A website on big ideas!

33. What is DD' -nterpreter? It interprets DD, statements and record them in tables containing metadata. 34. What is .ecord8at8a8time? "he ,ow le!el or $rocedural DM, can specify and retrie!e each record from a set of records. "his retrie!e of a record is said to be Record at a time. 3". What is Set8at8a8time or Set8oriented? "he 8igh le!el or +on procedural DM, can specify and retrie!e many records in a single DM, statement. "his retrie!e of a record is said to be Set at a time or Set oriented. 3%. What is .elational lgebra? It is procedural 5uery language. It consists of a set of operations that ta&e one or two relations as input and produce a new relation. 3*. What is .elational <alculus? It is an applied predicate calculus specifically tailored for relational databases proposed by %./. Codd. %.g. of languages based on it are DS, A,$8A, B#%,. 3/. 4o) does 7uple8oriented relational calculus differ from domain8oriented relational calculus "he tuple oriented calculus uses a tuple !ariables i.e., !ariable whose only permitted !alues are tuples of that relation. %.g. B#%, "he domain oriented calculus has domain !ariables i.e., !ariables that range o!er the underlying domains instead of o!er relation. %.g. I,,, D%D#C%. 31. What is normali>ation? It is a process of analysing the gi!en relation schemas based on their /unctional Dependencies </Ds= and primary &ey to achie!e the properties MinimiCing redundancy MinimiCing insertion, deletion and update anomalies. 43. What is #unctional Dependency? A /unctional dependency is denoted by D E between two sets of attributes D and E that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. "he constraint is for any two tuples t. and t6 in r if t.FDG A t6FDG then they ha!e t.FEG A t6FEG. "his means the !alue of D component of a tuple uni5uely determines the !alue of component E. 41. When is a functional dependency # said to be minimal? %!ery dependency in / has a single attribute for its right hand side. >e cannot replace any dependency D A in / with a dependency E A where E is a proper subset of D and still ha!e a set of dependency that is e5ui!alent to /.

Visit www.aucse.com A website on big ideas! >e cannot remo!e any dependency from / and still ha!e set of dependency that is e5ui!alent to /. 42. What is Multi!alued dependency? Multi!alued dependency denoted by D E specified on relation schema R, where D and E are both subsets of R, specifies the following constraint on any relation r of R( if two tuples t. and t6 e)ist in r such that t.FDG A t6FDG then t@ and t3 should also e)ist in r with the following properties t@F)G A t3FDG A t.FDG A t6FDG t@FEG A t.FEG and t3FEG A t6FEG t@FIG A t6FIG and t3FIG A t.FIG where FI A <R <D # E== G 43. What is 'ossless 2oin property? It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition. 44. What is 1 5# :5ormal #orm;? "he domain of attribute must include only atomic <simple, indi!isible= !alues. 4". What is #ully #unctional dependency? It is based on concept of full functional dependency. A functional dependency D E is full functional dependency if remo!al of any attribute A from D means that the dependency does not hold any more. 4%. What is 25#? A relation schema R is in 6+/ if it is in .+/ and e!ery non prime attribute A in R is fully functionally dependent on primary &ey. 4*. What is 35#? A relation schema R is in @+/ if it is in 6+/ and for e!ery /D D A either of the following is true D is a Super &ey of R. A is a prime attribute of R. In other words, if e!ery non prime attribute is non transiti!ely dependent on primary &ey. 4/. What is B<5# :Boyce8<odd 5ormal #orm;? A relation schema R is in BC+/ if it is in @+/ and satisfies an additional constraint that for e!ery /D D A, D must be a candidate &ey. 41. What is 45#? A relation schema R is said to be in 3+/ if for e!ery Multi!alued dependency D E that holds o!er R, one of following is true D is subset or e5ual to <or= DE A R. D is a super &ey. J

Visit www.aucse.com A website on big ideas!

"3. What is "5#? A Relation schema R is said to be H+/ if for e!ery 9oin dependency KR., R6, ..., RnL that holds R, one the following is true Ri A R for some i. "he 9oin dependency is implied by the set of /D, o!er R in which the left side is &ey of R. "1. What is Domain8?ey 5ormal #orm? A relation is said to be in D0+/ if all constraints and dependencies that should hold on the the constraint can be enforced by simply enforcing the domain constraint and &ey constraint on the relation. "2. What are partial@ alternate@@ artificial@ compound and natural 9ey? $artial ?ey& It is a set of attributes that can uni5uely identify wea& entities and that are related to same owner entity. It is sometime called as Discriminator. lternate ?ey& All Candidate 0eys e)cluding the $rimary 0ey are &nown as Alternate 0eys. rtificial ?ey( If no ob!ious &ey, either stand alone or compound is a!ailable, then the last resort is to simply create a &ey, by assigning a uni5ue number to each record or occurrence. "hen this is &nown as de!eloping an artificial &ey. <ompound ?ey: If no single data element uni5uely identifies occurrences within a construct, then combining multiple elements to create a uni5ue identifier for the construct is &nown as creating a compound &ey. 5atural ?ey: >hen one of the data elements stored within a construct is utiliCed as the primary &ey, then it is called the natural &ey. "3. What is inde0ing and )hat are the different 9inds of inde0ing? Inde)ing is a techni5ue for determining how 5uic&ly specific data can be found. "ypes( Binary search style inde)ing B "ree inde)ing In!erted list inde)ing Memory resident table "able inde)ing "4. What is system catalog or catalog relation? 4o) is better 9no)n as? A RDBMS maintains a description of all the data that it contains, information about e!ery relation and inde) that it contains. "his information is stored in a collection of relations maintained by the system called metadata. It is also called data dictionary. 2

Visit www.aucse.com A website on big ideas!

"". What is meant by Auery optimi>ation? "he phase that identifies an efficient e)ecution plan for e!aluating a 5uery that has the least estimated cost is referred to as 5uery optimiCation. "%. What is 2oin dependency and inclusion dependency? Boin Dependency& A 4oin dependency is generaliCation of Multi!alued dependency.A 4D KR., R6, ..., RnL is said to hold o!er a relation R if R., R6, R@, ..., Rn is a lossless 9oin decomposition of R . "here is no set of sound and complete inference rules for 4D. -nclusion Dependency& An Inclusion Dependency is a statement of the form that some columns of a relation are contained in other columns. A foreign &ey constraint is an e)ample of inclusion dependency. "*. What is durability in DBMS? :nce the DBMS informs the user that a transaction has successfully completed, its effects should persist e!en if the system crashes before all its changes are reflected on dis&. "his property is called durability. "/. What do you mean by atomicity and aggregation? tomicity& %ither all actions are carried out or none are. #sers should not ha!e to worry about the effect of incomplete transactions. DBMS ensures this by undoing the actions of incomplete transactions. ggregation& A concept which is used to model a relationship between a collection of entities and relationships. It is used when we need to e)press a relationship among relationships. "1. What is a $hantom Deadloc9? In distributed deadloc& detection, the delay in propagating local information might cause the deadloc& detection algorithms to identify deadloc&s that do not really e)ist. Such situations are called phantom deadloc&s and they lead to unnecessary aborts. %3. What is a chec9point and When does it occur? A Chec&point is li&e a snapshot of the DBMS state. By ta&ing chec&points, the DBMS can reduce the amount of wor& to be done during restart in the e!ent of subse5uent crashes. %1. What are the different phases of transaction? Different phases are Analysis phase Redo $hase

Visit www.aucse.com A website on big ideas! #ndo phase %2. What do you mean by flat file database? It is a database in which there are no programs or user access languages. It has no cross file capabilities but is user friendly and pro!ides user interface management. %3. What is +transparent DBMS+? It is one, which &eeps its $hysical Structure hidden from user. %4. Brief theory of 5et)or9@ 4ierarchical schemas and their properties +etwor& schema uses a graph data structure to organiCe records e)ample for such a database management system is C"C7 while a hierarchical schema uses a tree data structure e)ample for such a system is IMS. %". What is a Auery? A 5uery with respect to DBMS relates to user commands that are used to interact with a data base. "he 5uery language can be classified into data definition language and data manipulation language. %%. What do you mean by <orrelated subAuery? Sub5ueries, or nested 5ueries, are used to bring bac& a set of rows to be used by the parent 5uery. Depending on how the sub5uery is written, it can be e)ecuted once for the parent 5uery or it can be e)ecuted once for each row returned by the parent 5uery. If the sub5uery is e)ecuted for each row of the parent, this is called a correlated subAuery. A correlated sub5uery can be easily identified if it contains any references to the parent sub5uery columns in its >8%R% clause. Columns from the sub5uery cannot be referenced anywhere else in the parent 5uery. "he following e)ample demonstrates a non correlated sub5uery. %.g. Select N /rom C#S" >here ;.OPO@P.11O; I+ <Select :DA"% /rom :RD%R >here C#S".C+#M A :RD%R.C+#M= %*. What are the primiti!e operations common to all record management systems? Addition, deletion and modification. %/. 5ame the buffer in )hich all the commands that are typed in are stored Edit Buffer %1. What are the unary operations in .elational lgebra? $R:4%C"I:+ and S%,%C"I:+. *3. re the resulting relations of $.6DC<7 and B6-5 operation the same? +o. $.6DC<7( Concatenation of e!ery row in one relation with e!ery row in another. B6-5( Concatenation of rows from one relation and related rows from another.

Visit www.aucse.com A website on big ideas!

*1. What is .DBMS ?,.5,'? "wo important pieces of RDBMS architecture are the &ernel, which is the software, and the data dictionary, which consists of the system le!el data structures used by the &ernel to manage the database Eou might thin& of an RDBMS as an operating system <or set of subsystems=, designed specifically for controlling data accessQ its primary functions are storing, retrie!ing, and securing data. An RDBMS maintains its own list of authoriCed users and their associated pri!ilegesQ manages memory caches and pagingQ controls loc&ing for concurrent resource usageQ dispatches and schedules user re5uestsQ and manages space usage within its table space structures . *2. 5ame the sub8systems of a .DBMS IP:, Security, ,anguage $rocessing, $rocess Control, Storage Management, ,ogging and Reco!ery, Distribution Control, "ransaction Control, Memory Management, ,oc& Management *3. Which part of the .DBMS ta9es care of the data dictionary? 4o) Data dictionary is a set of tables and database ob9ects that is stored in a special area of the database and maintained e)clusi!ely by the &ernel. *4. What is the 2ob of the information stored in data8dictionary? "he information in the data dictionary !alidates the e)istence of the ob9ects, pro!ides access to them, and maps the actual physical storage location. *". 5ot only .DBMS ta9es care of locating data it also determines an optimal access path to store or retrie!e the data *%. 4o) do you communicate )ith an .DBMS? Eou communicate with an RDBMS using Structured Buery ,anguage <SB,= **. Define S=' and state the differences bet)een S=' and other con!entional programming 'anguages SB, is a nonprocedural language that is designed specifically for data access operations on normaliCed relational database structures. "he primary difference between SB, and other con!entional programming languages is that SB, statements specify what data operations should be performed rather than how to perform them. */. 5ame the three ma2or set of files on dis9 that compose a database in 6racle
"here are three ma9or sets of files on dis& that compose a database. All the files are binary. "hese are

Database files Control files Redo logs "he most important of these are the database files where the actual data resides. "he control files and the redo logs support the functioning of the architecture itself.

.O

Visit www.aucse.com A website on big ideas!


All three sets of files must be present, open, and a!ailable to :racle for any data on the database to be useable. >ithout these files, you cannot access the database, and the database administrator might ha!e to reco!er some or all of the database using a bac&up, if there is one.

*1. What is an 6racle -nstance? "he :racle system processes, also &nown as :racle bac&ground processes, pro!ide functions for the user processesRfunctions that would otherwise be done by the user processes themsel!es :racle database wide system memory is &nown as the S7A, the system global area or shared global area. "he data and control structures in the S7A are shareable, and all the :racle bac&ground processes and user processes can use them. "he combination of the S7A and the :racle bac&ground processes is &nown as an 6racle instance /3. What are the four 6racle system processes that must al)ays be up and running for the database to be useable "he four :racle system processes that must always be up and running for the database to be useable include DBW. <Database >riter=, 'DW. <,og >riter=, SM65 <System Monitor=, and $M65 <$rocess Monitor=. /1. What are database files@ control files and log files. 4o) many of these files should a database ha!e at least? Why? Database #iles "he database files hold the actual data and are typically the largest in siCe. Depending on their siCes, the tables <and other ob9ects= for all the user accounts can go in one database fileRbut that;s not an ideal situation because it does not ma&e the database structure !ery fle)ible for controlling access to storage for different users, putting the database on different dis& dri!es, or bac&ing up and restoring 9ust part of the database. Eou must ha!e at least one database file but usually, more than one files are used. In terms of accessing and using the data in the tables and other ob9ects, the number <or location= of the files is immaterial. "he database files are fi)ed in siCe and ne!er grow bigger than the siCe at which they were created <ontrol #iles "he control files and redo logs support the rest of the architecture. Any database must ha!e at least one control file, although you typically ha!e more than one to guard against loss. "he control file records the name of the database, the date and time it was created, the location of the database and redo logs, and the synchroniCation information to ensure that all three sets of files are

..

Visit www.aucse.com A website on big ideas! always in step. %!ery time you add a new database or redo log file to the database, the information is recorded in the control files. .edo 'ogs Any database must ha!e at least two redo logs. "hese are the 9ournals for the databaseQ the redo logs record all changes to the user ob9ects or system ob9ects. If any type of failure occurs, the changes recorded in the redo logs can be used to bring the database to a consistent state without losing any committed transactions. In the case of non data loss failure, :racle can apply the information in the redo logs automatically without inter!ention from the DBA. "he redo log files are fi)ed in siCe and ne!er grow dynamically from the siCe at which they were created. /2. What is .6W-D? "he R:>ID is a uni5ue database wide physical address for e!ery row on e!ery table. :nce assigned <when the row is first inserted into the database=, it ne!er changes until the row is deleted or the table is dropped. "he R:>ID consists of the following three components, the combination of which uni5uely identifies the physical storage location of the row. :racle database file number, which contains the bloc& with the rows :racle bloc& address, which contains the row "he row within the bloc& <because each bloc& can hold many rows= "he R:>ID is used internally in inde)es as a 5uic& means of retrie!ing rows with a particular &ey !alue. Application de!elopers also use it in SB, statements as a 5uic& way to access a row once they &now the R:>ID /3. What is 6racle Bloc9? <an t)o 6racle Bloc9s ha!e the same address? :racle SformatsS the database files into a number of :racle bloc&s when they are first createdRma&ing it easier for the RDBMS software to manage the files and easier to read data into the memory areas. "he bloc& siCe should be a multiple of the operating system bloc& siCe. Regardless of the bloc& siCe, the entire bloc& is not a!ailable for holding dataQ :racle ta&es up some space to manage the contents of the bloc&. "his bloc& header has a minimum siCe, but it can grow. "hese :racle bloc&s are the smallest unit of storage. Increasing the :racle bloc& siCe can impro!e performance, but it should be done only when the database is first created. %ach :racle bloc& is numbered se5uentially for each database file starting at .. "wo bloc&s can ha!e the same bloc& address if they are in different database files. /4. What is database 7rigger? A database trigger is a $,PSB, bloc& that can defined to automatically e)ecute for insert, update, and delete statements against a table. "he trigger can e defined to e)ecute once for the entire statement or once for e!ery row that is inserted, updated, or deleted. /or any one table, there are twel!e e!ents for which you can .6

Visit www.aucse.com A website on big ideas! define database triggers. A database trigger can call database procedures that are also written in $,PSB,. /". 5ame t)o utilities that 6racle pro!ides@ )hich are use for bac9up and reco!ery. Along with the RDBMS software, :racle pro!ides two utilities that you can use to bac& up and restore the database. "hese utilities are ,0port and -mport. "he ,0port utility dumps the definitions and data for the specified part of the database to an operating system binary file. "he -mport utility reads the file produced by an e)port, recreates the definitions of ob9ects, and inserts the data If %)port and Import are used as a means of bac&ing up and reco!ering the database, all the changes made to the database cannot be reco!ered since the e)port was performed. "he best you can do is reco!er the database to the time when the e)port was last performed. /%. What are stored8procedures? nd )hat are the ad!antages of using them. Stored procedures are database ob9ects that perform a user defined operation. A stored procedure can ha!e a set of compound SB, statements. A stored procedure e)ecutes the SB, commands and returns the result to the client. Stored procedures are used to reduce networ& traffic. /*. 4o) are e0ceptions handled in $'ES='? Di!e some of the internal e0ceptionsF name $,PSB, e)ception handling is a mechanism for dealing with run time errors encountered during procedure e)ecution. #se of this mechanism enables e)ecution to continue if the error is not se!ere enough to cause procedure termination. "he e)ception handler must be defined within a subprogram specification. %rrors cause the program to raise an e)ception with a transfer of control to the e)ception handler bloc&. After the e)ception handler e)ecutes, control returns to the bloc& in which the handler was defined. If there are no more e)ecutable statements in the bloc&, control returns to the caller. Cser8Defined ,0ceptions $,PSB, enables the user to define e)ception handlers in the declarations area of subprogram specifications. #ser accomplishes this by naming an e)ception as in the following e)ample( otTfailure %DC%$"I:+Q In this case, the e)ception name is otTfailure. Code associated with this handler is written in the %DC%$"I:+ specification area as follows( %DC%$"I:+ when :"T/AI,#R% then outTstatusTcode (A gToutTstatusTcodeQ outTmsg (A gToutTmsgQ
"he following is an e)ample of a subprogram e)ception(

%DC%$"I:+ when +:TDA"AT/:#+D then gToutTstatusTcode (A ;/AI,;Q RAIS% otTfailureQ

.@

Visit www.aucse.com A website on big ideas! >ithin this e)ception is the RAIS% statement that transfers control bac& to the otTfailure e)ception handler. "his techni5ue of raising the e)ception is used to in!o&e all user defined e)ceptions. System8Defined ,0ceptions %)ceptions internal to $,PSB, are raised automatically upon error. +:TDA"AT/:#+D is a system defined e)ception. "able below gi!es a complete list of internal e)ceptions. $'ES=' internal e0ceptions. Exception Name C#RS:RTA,R%ADET:$%+ D#$TUA,T:+TI+D%D I+UA,IDTC#RS:R I+UA,IDT+#MB%R ,:7I+TD%+I%D +:TDA"AT/:#+D +:"T,:77%DT:+ $R:7RAMT%RR:R S":RA7%T%RR:R "IM%:#"T:+TR%S:#RC% "::TMA+ETR:>S "RA+SAC"I:+TBAC0%DT:#" UA,#%T%RR:R I%R:TDIUID% Oracle Error :RA OJH.. :RA OOOO. :RA O.OO. :RA O.266 :RA O.O.2 :RA O.3O@ :RA O.O.6 :RA OJHO. :RA OJHOO :RA OOOH. :RA O.366 :RA OOOJ. :RA OJHO6 :RA O.32J

In addition to this list of e)ceptions, there is a catch all e)ception named 674,.S that traps all errors for which specific error handling has not been established. //. Does $'ES=' support +o!erloading+? ,0plain "he concept of o!erloading in $,PSB, relates to the idea that you can define procedures and functions with the same name. $,PSB, does not loo& only at the referenced name, howe!er, to resol!e a procedure or function call. "he count and data types of formal parameters are also considered.
$,PSB, also attempts to resol!e any procedure or function calls in locally defined pac&ages before loo&ing at globally defined pac&ages or internal functions. "o further ensure calling the proper procedure, you can use the dot notation. $refacing a procedure or function name with the pac&age name fully 5ualifies any procedure or function reference.

/1. 7ables deri!ed from the ,.D a= Are totally unnormalised b= Are always in .+/ c= Can be further denormalised d= May ha!e multi !alued attributes <b= Are always in .+/

.3

Visit www.aucse.com A website on big ideas! 13. Spurious tuples may occur due to i. Bad normali>ation ii. 7heta 2oins iii. Cpdating tables from 2oin a= i ' ii b= ii ' iii c= i ' iii d= ii ' iii <a= i ' iii because theta 9oins are 9oins made on &eys that are not primary &eys. 11. B < is a set of attributes. 7he functional dependency is as follo)s B 8G B < 8G < < 8G B a= is in .+/ b= is in 6+/ c= is in @+/ d= is in BC+/

<a= is in .+/ since <AC=V A K A, B, CL hence AC is the primary &ey. Since C B is a /D gi!en, where neither C is a 0ey nor B is a prime attribute, this it is not in @+/. /urther B is not functionally dependent on &ey AC thus it is not in 6+/. "hus the gi!en /Ds is in .+/. 12. -n mapping of ,.D to D#D a= entities in %RD should correspond to an e)isting entityPstore in D/D b= entity in D/D is con!erted to attributes of an entity in %RD c= relations in %RD has . to . correspondence to processes in D/D d= relationships in %RD has . to . correspondence to flows in D/D <a= entities in %RD should correspond to an e)isting entityPstore in D/D 13. dominant entity is the entity a= on the + side in a . ( + relationship b= on the . side in a . ( + relationship c= on either side in a . ( . relationship d= nothing to do with . ( . or . ( + relationship <b= on the . side in a . ( + relationship 14. Select F56.74F@ <CS76M,. #rom <CS7HD7'S Where .,D-65 I F5F 6rder By <CS76M,. Cnion Select F, S7F@ <CS76M,. #rom <CS7HD7'S Where .,D-65 I F,F 6rder By <CS76M,. "he abo!e is a= +ot an error

.H

Visit www.aucse.com A website on big ideas! b= %rror the string in single 5uotes ;+:R"8; and ;S:#"8; c= %rror the string should be in double 5uotes d= %rror :RD%R BE clause <d= %rror the :RD%R BE clause. Since :RD%R BE clause cannot be used in #+I:+S 1". What is Storage Manager? It is a program module that pro!ides the interface between the low le!el data stored in database, application programs and 5ueries submitted to the system. 1%. What is Buffer Manager? It is a program module, which is responsible for fetching data from dis& storage into main memory and deciding what data to be cache in memory. 1*. What is 7ransaction Manager? It is a program module, which ensures that database, remains in a consistent state despite system failures and concurrent transaction e)ecution proceeds without conflicting. 1/. What is #ile Manager? It is a program module, which manages the allocation of space on dis& storage and data structure used to represent information stored on a dis&. 11. What is uthori>ation and -ntegrity manager? It is the program module, which tests for the satisfaction of integrity constraint and chec&s the authority of user to access data. 133. What are stand8alone procedures? $rocedures that are not part of a pac&age are &nown as stand alone because they independently defined. A good e)ample of a stand alone procedure is one written in a SB,N/orms application. "hese types of procedures are not a!ailable for reference from other :racle tools. Another limitation of stand alone procedures is that they are compiled at run time, which slows e)ecution. 131. What are cursors gi!e different types of cursors. $,PSB, uses cursors for all database information accesses statements. "he language supports the use two types of cursors -mplicit ,0plicit 132. What is cold bac9up and hot bac9up :in case of 6racle;? <old Bac9up& It is copying the three sets of files <database files, redo logs, and control file= when the instance is shut down. "his is a straight file copy, usually from

.J

Visit www.aucse.com A website on big ideas! the dis& directly to tape. Eou must shut down the instance to guarantee a consistent copy. If a cold bac&up is performed, the only option a!ailable in the e!ent of data file loss is restoring all the files from the latest bac&up. All wor& performed on the database since the last bac&up is lost. 4ot Bac9up& Some sites <such as worldwide airline reser!ations systems= cannot shut down the database while ma&ing a bac&up copy of the files. "he cold bac&up is not an a!ailable option. So different means of bac&ing up database must be used R the hot bac&up. Issue a SB, command to indicate to :racle, on a tablespace by tablespace basis, that the files of the tablespace are to bac&ed up. "he users can continue to ma&e full use of the files, including ma&ing changes to the data. :nce the user has indicated that hePshe wants to bac& up the tablespace files, hePshe can use the operating system to copy those files to the desired bac&up destination. "he database must be running in ARC8IU%,:7 mode for the hot bac&up option. If a data loss failure does occur, the lost database files can be restored using the hot bac&up and the online and offline redo logs created since the bac&up was done. "he database is restored to the most consistent state without any loss of committed transactions. 133. What are rmstrong rules? 4o) do )e say that they are complete andEor sound "he well &nown inference rules for /Ds Refle)i!e rule ( If E is subset or e5ual to D then D E. Augmentation rule( If D E then DI EI. "ransiti!e rule( If KD E, E IL then D I. Decomposition rule ( If D EI then D E. #nion or Additi!e rule( If KD E, D IL then D EI. $seudo "ransiti!e rule ( If KD E, >E IL then >D I. :f these the first three are &nown as Amstrong Rules. "hey are sound because it is enough if a set of /Ds satisfy these three. "hey are called complete because using these three rules we can generate the rest all inference rules. 134. 4o) can you find the minimal 9ey of relational schema? Minimal &ey is one which can identify each tuple of the gi!en relation schema uni5uely. /or finding the minimal &ey it is re5uired to find the closure that is the set of all attributes that are dependent on any gi!en set of attributes under the gi!en set of functional dependency. .2

Visit www.aucse.com A website on big ideas! Algo. I Determining DV, closure for D, gi!en set of /Ds / .. Set DV A D 6. Set :ld DV A DV @. /or each /D E I in / and if E belongs to D V then add I to DV 3. Repeat steps 6 and @ until :ld DV A DV Algo.II Determining minimal 0 for relation schema R, gi!en set of /Ds / .. Set 0 to R that is ma&e 0 a set of all attributes in R 6. /or each attribute A in 0 a. Compute <0 W A=V with respect to / b. If <0 W A=V A R then set 0 A <0 W A=V 13". What do you understand by dependency preser!ation? 7i!en a relation R and a set of /Ds /, dependency preser!ation states that the closure of the union of the pro9ection of / on each decomposed relation Ri is e5ual to the closure of /. i.e., <<R.</== # ? # <Rn</===V A /V if decomposition is not dependency preser!ing, then some dependency is lost in the decomposition. 13%. What is meant by $roacti!e@ .etroacti!e and Simultaneous Cpdate. $roacti!e Cpdate& "he updates that are applied to database before it becomes effecti!e in real world . .etroacti!e Cpdate& "he updates that are applied to database after it becomes effecti!e in real world . Simulatneous Cpdate& "he updates that are applied to database at the same time when it becomes effecti!e in real world . 13*. What are the different types of B6-5 operations? ,Aui Boin& "his is the most common type of 9oin which in!ol!es only e5uality comparisions. "he disad!antage in this type of 9oin is that there

.M

Das könnte Ihnen auch gefallen