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 provides the users with the processes of defining, constructing and manipulating the database for various applications. 3. What is a Database system? The database and DBM software together is called as Database system. 4. d!antages of DBMS? !edundancy is controlled. "nauthori#ed access is restricted. $roviding multiple user interfaces. %nforcing integrity constraints. $roviding bac&up and recovery. ". Disad!antage in #ile $rocessing System? Data redundancy ' inconsistency. Difficult in accessing data. Data isolation. Data integrity. (oncurrent access is not possible. ecurity $roblems. %. Describe the three le!els of data abstraction? There are three levels of abstraction) $hysical le!el& The lowest level of abstraction describes how data are stored. 'ogical le!el& The ne*t higher level of abstraction, describes what data are stored in database and what relationship among those data. (ie) le!el& The highest level of abstraction describes only part of entire database. *. Define the +integrity rules+ There are two Integrity rules. ,ntity -ntegrity& tates that +$rimary &ey cannot have ,"-- value. .eferential -ntegrity& tates that +/oreign 0ey can be either a ,"-- value or should be $rimary 0ey value of other relation. /. What is e0tension and intension? ,0tension - It is the number of tuples present in a table at any instance. This is time dependent. -ntension - It is a constant value that gives the name, structure of table and the constraints laid on it. 1. What is System .? What are its t)o ma2or subsystems? ystem ! was designed and developed over a period of 1234-32 at IBM an 5ose !esearch (enter. It is a prototype and its purpose was to demonstrate that it is possible to build a !elational ystem that can be used in a real life environment to solve real life problems, with performance at least comparable to that of e*isting system. Its two subsystems are !esearch torage ystem !elational Data ystem. 13. 4o) is the data structure of System . different from the relational structure? "nli&e !elational systems in ystem ! Domains are not supported %nforcement of candidate &ey uni6ueness is optional %nforcement of entity integrity is optional !eferential 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, the ability to modify the schema definition in one level should not affect the schema definition in the ne*t higher level. Two types of Data Independence) $hysical Data Independence) Modification in physical level should not affect the logical level. -ogical Data Independence) Modification in logical level should affect the view level. 567,& 'ogical Data -ndependence is more difficult to achie!e 12. What is a !ie)? 4o) it is related to data independence? A view may be thought of as a virtual table, that is, a table that does not really e*ist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary. 7rowth and restructuring of base tables is not reflected in views. Thus the view 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? This 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? This model is based on collection of ob9ects. An ob9ect contains values stored in instance variables with in the ob9ect. An ob9ect also contains bodies of code that operate on the ob9ect. These bodies of code are called methods. :b9ects that contain same types of values 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 have 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? The 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 have 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 chema denoted by ! <A1, A?, @, An= is made up of the relation name ! 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 <t1, t?, tA, ..., tn=. %ach tuple is an ordered list of n-values tB<v1,v?, ..., vn=. 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? The collection <or set= of similar relationships. 2%. What is .elationship type? !elationship type defines a set of associations or a relationship set among a given 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 database schema is specified by a set of definitions e*pressed by a special language called DD-. 2%. What is (D' :(ie) Definition 'anguage;? It specifies user views and their mappings to the conceptual schema. 2*. What is SD' :Storage Definition 'anguage;? This language is to specify the internal schema. This language may specify the mapping between two schemas. 2/. What is Data Storage 8 Definition 'anguage? The 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;? This language that enable user to access or manipulate data as organi#ed by appropriate data model. $rocedural DM' or 'o) le!el& DM- re6uires a user to specify what data are needed and how to get those data. 5on8$rocedural DM' or 4igh le!el& DM- re6uires 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 6uery language into low-level instruction that the 6uery evaluation engine can understand. 32. What is =uery e!aluation engine? It e*ecutes low-level instruction generated by compiler. 33. What is DD' -nterpreter? It interprets DD- statements and records them in tables containing metadata. 34. What is .ecord8at8a8time? The -ow level or $rocedural DM- can specify and retrieve each record from a set of records. This retrieve of a record is said to be !ecord-at-a-time. 3". What is Set8at8a8time or Set8oriented? The 8igh level or ,on-procedural DM- can specify and retrieve many records in a single DM- statement. This retrieve of a record is said to be et-at-a-time or et- oriented. 3%. What is .elational lgebra? It is procedural 6uery 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 %./. (odd. %.g. of languages based on it are D- A-$8A, C"%-. 3/. 4o) does 7uple8oriented relational calculus differ from domain8oriented relational calculus The tuple-oriented calculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relation. %.g. C"%- The domain-oriented calculus has domain variables i.e., variables that range over the underlying domains instead of over relation. %.g. I--, D%D"(%. 31. What is normali>ation? It is a process of analy#ing the given relation schemas based on their /unctional Dependencies </Ds= and primary &ey to achieve the properties Minimi#ing redundancy Minimi#ing 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 ! specifies a constraint on the possible tuple that can form a relation state r of !. The constraint is for any two tuples t1 and t? in r if t1FDG B t?FDG then they have t1FEG B t?FEG. This means the value of D component of a tuple uni6uely determines the value of component E. 41. When is a functional dependency # said to be minimal? %very 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 have a set of dependency that is e6uivalent to /. >e cannot remove any dependency from / and still have set of dependency that is e6uivalent to /. 42. What is multi!alued dependency? Multivalued dependency denoted by D E specified on relation schema !, where D and E are both subsets of !, specifies the following constraint on any relation r of !) if two tuples t1 and t? e*ist in r such that t1FDG B t?FDG then tA and t4 should also e*ist in r with the following properties tAF*G B t4FDG B t1FDG B t?FDG tAFEG B t1FEG and t4FEG B t?FEG tAFHG B t?FHG and t4FHG B t1FHG >here FH B <!-<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;? The domain of attribute must include only atomic <simple, indivisible= values. 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 removal of any attribute A from D means that the dependency does not hold any more. 4%. What is 25#? A relation schema ! is in ?,/ if it is in 1,/ and every non-prime attribute A in ! is fully functionally dependent on primary &ey. 4*. What is 35#? A relation schema ! is in A,/ if it is in ?,/ and for every /D D A either of the following is true D is a uper-&ey of !. A is a prime attribute of !. In other words, if every non prime attribute is non-transitively dependent on primary &ey. 4/. What is B<5# :Boyce8<odd 5ormal #orm;? A relation schema ! is in B(,/ if it is in A,/ and satisfies an additional constraint that for every /D D A, D must be a candidate &ey.
41. What is 45#? A relation schema ! is said to be in 4,/ if for every Multivalued dependency D E that holds over !, one of following is true D is subset or e6ual to <or= DE B !. D is a super &ey. "3. What is "5#? A !elation schema ! is said to be I,/ if for every 9oin dependency J!1, !?,... !nK that holds !, one the following is true !i B ! for some i. The 9oin dependency is implied by the set of /D, over ! in which the left side is &ey of !. "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 uni6uely identify wea& entities and that are related to same owner entity. It is sometime called as Discriminator. lternate ?ey& All (andidate 0eys e*cluding the $rimary 0ey are &nown as Alternate 0eys. rtificial ?ey) If no obvious &ey, either stand alone or compound is available, then the last resort is to simply create a &ey, by assigning a uni6ue number to each record or occurrence. Then this is &nown as developing an artificial &ey. <ompound ?ey: If no single data element uni6uely identifies occurrences within a construct, then combining multiple elements to create a uni6ue identifier for the construct is &nown as creating a compound &ey. 5atural ?ey: >hen one of the data elements stored within a construct is utili#ed 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 techni6ue for determining how 6uic&ly specific data can be found. Types) Binary search style inde*ing B-Tree inde*ing Inverted list inde*ing Memory resident table Table inde*ing "4. What is system catalog or catalog relation? 4o) is better 9no)n as? A !DBM maintains a description of all the data that it contains, information about every relation and inde* that it contains. This information is stored in a collection of relations maintained by the system called metadata. It is also called data dictionary. "". What is meant by Auery optimi>ation? The phase that identifies an efficient e*ecution plan for evaluating a 6uery that has the least estimated cost is referred to as 6uery optimi#ation. "%. What is 2oin dependency and inclusion dependency? Boin Dependency& A 5oin dependency is generali#ation of Multivalued dependency. A 5D J!1, !?,... !nK is said to hold over a relation ! if !1, !?, !A,... !n is a lossless-9oin decomposition of ! . There is no set of sound and complete inference rules for 5D. -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 DBM informs the user that a transaction has successfully completed, its effects should persist even if the system crashes before all its changes are reflected on dis&. This 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 have to worry about the effect of incomplete transactions. DBM 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. uch situations are called phantom deadloc&s and they lead to unnecessary aborts. %3. What is a chec9point and When does it occur? A (hec&point is li&e a snapshot of the DBM state. By ta&ing chec&points, the DBM can reduce the amount of wor& to be done during restart in the event of subse6uent crashes. %1. What are the different phases of transaction? Different phases are Analysis phase !edo $hase "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 provides user-interface management. %3. What is +transparent DBMS+? It is one, which &eeps its $hysical tructure hidden from user. %4. Brief theory of 5et)or9@ 4ierarchical schemas and their properties ,etwor& schema uses a graph data structure to organi#e records e*ample for such a database management system is (T(7 while a hierarchical schema uses a tree data structure e*ample for such a system is IM. %". What is a Auery? A 6uery with respect to DBM relates to user commands that are used to interact with a data base. The 6uery language can be classified into data definition language and data manipulation language. %%. What do you mean by <orrelated subAuery? ub6ueries, or nested 6ueries, are used to bring bac& a set of rows to be used by the parent 6uery. Depending on how the sub6uery is written, it can be e*ecuted once for the parent 6uery or it can be e*ecuted once for each row returned by the parent 6uery. If the sub6uery is e*ecuted for each row of the parent, this is called a correlated subAuery. A correlated sub6uery can be easily identified if it contains any references to the parent sub6uery columns in its >8%!% clause. (olumns from the sub6uery cannot be referenced anywhere else in the parent 6uery. The following e*ample demonstrates a non-correlated sub6uery. %.g. elect L /rom ("T >here ;1MNMAN122M; I, <elect :DAT% /rom :!D%! >here ("T.(,"M B :!D%!.(,"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? $!:5%(TI:, and %-%(TI:,. *3. re the resulting relations of $.6DC<7 and B6-5 operation the same? ,o. $.6DC<7) (oncatenation of every row in one relation with every row in another. B6-5) (oncatenation of rows from one relation and related rows from another. *1. What is .DBMS ?,.5,'? Two important pieces of !DBM architecture are the &ernel, which is the software, and the data dictionary, which consists of the system-level data structures used by the &ernel to manage the database Eou might thin& of an !DBM as an operating system <or set of subsystems=, designed specifically for controlling data accessO its primary functions are storing, retrieving, and securing data. An !DBM maintains its own list of authori#ed users and their associated privilegesO manages memory caches and pagingO controls loc&ing for concurrent resource usageO dispatches and schedules user re6uestsO and manages space usage within its table-space structures . *2. 5ame the sub8systems of a .DBMS IN:, ecurity, -anguage $rocessing, $rocess (ontrol, torage Management, -ogging and !ecovery, Distribution (ontrol, Transaction (ontrol, 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*clusively by the &ernel. *4. What is the 2ob of the information stored in data8dictionary? The information in the data dictionary validates the e*istence of the ob9ects, provides 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 retrieve the data *%. 4o) do you communicate )ith an .DBMS? Eou communicate with an !DBM using tructured Cuery -anguage <C-= **. Define S=' and state the differences bet)een S=' and other con!entional programming 'anguages C- is a nonprocedural language that is designed specifically for data access operations on normali#ed relational database structures. The primary difference between C- and other conventional programming languages is that C- 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 There are three ma9or sets of files on dis& that compose a database. All the files are binary. These are Database files (ontrol files !edo logs The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself. All three sets of files must be present, open, and available to :racle for any data on the database to be useable. >ithout these files, you cannot access the database, and the database administrator might have to recover some or all of the database using a bac&up, if there is one. *1. What is an 6racle -nstance? The :racle system processes, also &nown as :racle bac&ground processes, provide functions for the user processesPfunctions that would otherwise be done by the user processes themselves :racle database-wide system memory is &nown as the 7A, the system global area or shared global area. The data and control structures in the 7A are shareable, and all the :racle bac&ground processes and user processes can use them. The combination of the 7A 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 The 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 <ystem 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 The database files hold the actual data and are typically the largest in si#e. Depending on their si#es, the tables <and other ob9ects= for all the user accounts can go in one database filePbut that;s not an ideal situation because it does not ma&e the database structure very fle*ible for controlling access to storage for different users, putting the database on different dis& drives, or bac&ing up and restoring 9ust part of the database. Eou must have 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. The database files are fi*ed in si#e and never grow bigger than the si#e at which they were created <ontrol #iles The control files and redo logs support the rest of the architecture. Any database must have at least one control file, although you typically have more than one to guard against loss. The 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 synchroni#ation information to ensure that all three sets of files are always in step. %very 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 have at least two redo logs. These are the 9ournals for the databaseO 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 intervention from the DBA. The redo log files are fi*ed in si#e and never grow dynamically from the si#e at which they were created. /2. What is .6W-D? The !:>ID is a uni6ue database-wide physical address for every row on every table. :nce assigned <when the row is first inserted into the database=, it never changes until the row is deleted or the table is dropped. The !:>ID consists of the following three components, the combination of which uni6uely 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 The row within the bloc& <because each bloc& can hold many rows= The !:>ID is used internally in inde*es as a 6uic& means of retrieving rows with a particular &ey value. Application developers also use it in C- statements as a 6uic& way to access a row once they &now the !:>ID /3. What is 6racle Bloc9? <an t)o 6racle Bloc9s ha!e the same address? :racle QformatsQ the database files into a number of :racle bloc&s when they are first createdPma&ing it easier for the !DBM software to manage the files and easier to read data into the memory areas. The bloc& si#e should be a multiple of the operating system bloc& si#e. !egardless of the bloc& si#e, the entire bloc& is not available for holding dataO :racle ta&es up some space to manage the contents of the bloc&. This bloc& header has a minimum si#e, but it can grow. These :racle bloc&s are the smallest unit of storage. Increasing the :racle bloc& si#e can improve performance, but it should be done only when the database is first created. %ach :racle bloc& is numbered se6uentially for each database file starting at 1. Two bloc&s can have the same bloc& address if they are in different database files. /4. What is database 7rigger? A database trigger is a $-NC- bloc& that can defined to automatically e*ecute for insert, update, and delete statements against a table. The trigger can e defined to e*ecute once for the entire statement or once for every row that is inserted, updated, or deleted. /or any one table, there are twelve events for which you can define database triggers. A database trigger can call database procedures that are also written in $-NC-. /". 5ame t)o utilities that 6racle pro!ides@ )hich are use for bac9up and reco!ery. Along with the !DBM software, :racle provides two utilities that you can use to bac& up and restore the database. These utilities are ,0port and -mport. The ,0port utility dumps the definitions and data for the specified part of the database to an operating system binary file. The -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 recovering the database, all the changes made to the database cannot be recovered since the e*port was performed. The best you can do is recover the database to the time when the e*port was last performed. /%. What are stored8procedures? nd )hat are the ad!antages of using them. tored procedures are database ob9ects that perform a user defined operation. A stored procedure can have a set of compound C- statements. A stored procedure e*ecutes the C- commands and returns the result to the client. tored procedures are used to reduce networ& traffic. /*. 4o) are e0ceptions handled in $'ES='? Di!e some of the internal e0ceptionsF name $-NC- 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 severe enough to cause procedure termination. The 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 $-NC- 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) otRfailure %D(%$TI:,O In this case, the e*ception name is otRfailure. (ode associated with this handler is written in the %D(%$TI:, specification area as follows) %D(%$TI:, when :TR/AI-"!% then outRstatusRcode )B gRoutRstatusRcodeO outRmsg )B gRoutRmsgO The following is an e*ample of a subprogram e*ception) %D(%$TI:, when ,:RDATAR/:",D then gRoutRstatusRcode )B ;/AI-;O !AI% otRfailureO >ithin this e*ception is the !AI% statement that transfers control bac& to the otRfailure e*ception handler. This techni6ue of raising the e*ception is used to invo&e all user- defined e*ceptions. System8Defined ,0ceptions %*ceptions internal to $-NC- are raised automatically upon error. ,:RDATAR/:",D is a system-defined e*ception. Table below gives a complete list of internal e*ceptions. $'ES=' internal e0ceptions. Exception Name Oracle Error ("!:!RA-!%ADER:$%, :!A-MSI11 D"$RTA-R:,RI,D%D :!A-MMMM1 I,TA-IDR("!:! :!A-M1MM1 I,TA-IDR,"MB%! :!A-M13?? -:7I,RD%,I%D :!A-M1M13 ,:RDATAR/:",D :!A-M14MA ,:TR-:77%DR:, :!A-M1M1? $!:7!AMR%!!:! :!A-MSIM1 T:!A7%R%!!:! :!A-MSIMM TIM%:"TR:,R!%:"!(% :!A-MMMI1 T::RMA,ER!:> :!A-M14?? T!A,A(TI:,RBA(0%DR:"T :!A-MMMS1 TA-"%R%!!:! :!A-MSIM? H%!:RDITID% :!A-M143S 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 The concept of o!erloading in $-NC- relates to the idea that you can define procedures and functions with the same name. $-NC- does not loo& only at the referenced name, however, to resolve a procedure or function call. The count and data types of formal parameters are also considered. $-NC- also attempts to resolve any procedure or function calls in locally defined pac&ages before loo&ing at globally defined pac&ages or internal functions. To further ensure calling the proper procedure, you can use the dot notation. $refacing a procedure or function name with the pac&age name fully 6ualifies any procedure or function reference. /1. 7ables deri!ed from the ,.D a= Are totally unnormalised b= Are always in 1,/ c= (an be further denormalised d= May have multi-valued attributes <b= Are always in 1,/ 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 1,/ b= is in ?,/ c= is in A,/ d= is in B(,/ <a= is in 1,/ since <A(= U B J A, B, (K hence A( is the primary &ey. ince ( B is a /D given, where neither ( is a 0ey nor B is a prime attribute, this it is not in A,/. /urther B is not functionally dependent on &ey A( thus it is not in ?,/. Thus the given /Ds is in 1,/. 12. -n mapping of ,.D to D#D a= entities in %!D should correspond to an e*isting entityNstore in D/D b= entity in D/D is converted to attributes of an entity in %!D c= relations in %!D has 1 to 1 correspondence to processes in D/D d= relationships in %!D has 1 to 1 correspondence to flows in D/D <a= entities in %!D should correspond to an e*isting entityNstore in D/D 13. dominant entity is the entity a= on the , side in a 1 ) , relationship b= on the 1 side in a 1 ) , relationship c= on either side in a 1 ) 1 relationship d= nothing to do with 1 ) 1 or 1 ) , relationship <b= on the 1 side in a 1 ) , 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,. The above is a= ,ot an error b= %rror - the string in single 6uotes ;,:!T8; and ;:"T8; c= %rror - the string should be in double 6uotes d= %rror - :!D%! BE clause <d= %rror - the :!D%! BE clause. ince :!D%! BE clause cannot be used in ",I:, 1". What is Storage Manager? It is a program module that provides the interface between the low-level data stored in database, application programs and 6ueries 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 C-L/orms application. These types of procedures are not available 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. $-NC- uses cursors for all database information accesses statements. The 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. This is a straight file copy, usually from 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 available in the event 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& ome sites <such as worldwide airline reservations systems= cannot shut down the database while ma&ing a bac&up copy of the files. The cold bac&up is not an available option. o different means of bac&ing up database must be used P the hot bac&up. Issue a C- command to indicate to :racle, on a tablespace-by-tablespace basis, that the files of the tablespace are to bac&ed up. The users can continue to ma&e full use of the files, including ma&ing changes to the data. :nce the user has indicated that heNshe wants to bac& up the tablespace files, heNshe can use the operating system to copy those files to the desired bac&up destination. The database must be running in A!(8IT%-: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. The 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 The well-&nown inference rules for /Ds !efle*ive rule ) If E is subset or e6ual to D then D E. Augmentation rule) If D E then DH EH. Transitive rule) If JD E, E HK then D H. Decomposition rule ) If D EH then D E. "nion or Additive rule) If JD E, D HK then D EH. $seudo Transitive rule ) If JD E, >E HK then >D H. :f these the first three are &nown as Amstrong !ules. They are sound because it is enough if a set of /Ds satisfy these three. They 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 given relation schema uni6uely. /or finding the minimal &ey it is re6uired to find the closure that is the set of all attributes that are dependent on any given set of attributes under the given set of functional dependency. Algo. I Determining D U , closure for D, given set of /Ds / 1. et D U B D ?. et :ld D U B D U A. /or each /D E H in / and if E belongs to D U then add H to D U 4. !epeat steps ? and A until :ld D U B D U Algo.II Determining minimal 0 for relation schema !, given set of /Ds / 1. et 0 to ! that is ma&e 0 a set of all attributes in ! ?. /or each attribute A in 0 a. (ompute <0 V A= U with respect to / b. If <0 V A= U B ! then set 0 B <0 V A= U 13". What do you understand by dependency preser!ation? 7iven a relation ! and a set of /Ds /, dependency preservation states that the closure of the union of the pro9ection of / on each decomposed relation !i is e6ual to the closure of /. i.e., << !1 </== " @ " < !n </=== U B / U
if decomposition is not dependency preserving, then some dependency is lost in the decomposition.
13%. What is meant by $roacti!e@ .etroacti!e and Simultaneous Cpdate. $roacti!e Cpdate& The updates that are applied to database before it becomes effective in real world . .etroacti!e Cpdate& The updates that are applied to database after it becomes effective in real world . Simulatneous Cpdate& The updates that are applied to database at the same time when it becomes effective in real world . 13*. What are the different types of B6-5 operations? ,Aui Boin& This is the most common type of 9oin which involves only e6uality comparisions. The disadvantage in this type of 9oin is that there