Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
UNIT-I PART – A 1. List out the different levels in database tuning. 2014) Tuning of hardware Tuning of schema Tuning of indices Tuning of materialized views Tuning of transactions (May/June 2. Give the ACID properties (May/June 2014) The four basic ACID Properties of a transaction are • Atomicity • Consistency • Isolation • Durability 3. What is lock de escalation and under what condition it is necessary? (May/June 2014) If the client does not need a prefetched item, it can transfer locks on the items back to the server, and the lock can be allocated to other clients 4. What do you mean by concurrency control? 2014) To be resistant to site and communication failure. To permit parallelism to satisfy performance requirements. To place few constraints on the structure of atomic actions. (May/June 5. Comapre RDBMS and ORDBMS. 2014) RDBMS Semantic overloading. Poor representation of ‘real world’ entities Poor support for integrity & business constraints. (May/June Homogeneous data structure. Limited operations. Difficulty handling recursive queries. Difficulty with ‘Long Transactions ORDBMS An Object-Relational database adds features associated with object-oriented systems to a RDBMS User-extensible type system Encapsulation Inheritance Polymorphism Dynamic binding of methods Complex objects including first normal form objects Object Identity PART – B 1. 2. Construct an E-R diagram for a hospital with a set of patients and a set of medical doctors.Associate with each patient a log of the various tests and examination conducted. (Nov/Dec 2011) (8) Devise a timestamp-based protocol that avoids the phantom phenomenon. (Nov/Dec 2011) (8) Timestamp Ordering Algorithm ü Basic Timestamp Ordering ü Strict Timestamp Ordering ü Thomas's Write Rule The idea for this scheme is to order the transactions based on their timestamps. A schedule in which the transactions participate is then serializable, and the equivalent serial schedule has the transactions in order of their timestamp values. This is called timestamp ordering (TO). Notice how this differs from 2PL, where a schedule is serializable by being equivalent to some serial schedule allowed by the locking protocols. In timestamp ordering, however, the schedule is equivalent to the particular serial order corresponding to the order of the transaction timestamps. The algorithm must ensure that, for each item accessed by conflicting operations in the schedule, the order in which the item is accessed does not violate the serializability order. To do this, the algorithm associates with each database item X two timestamp (TS) values: 1. Read_TS(X): The read timestamp of item X; this is the largest timestamp among all the timestamps of transactions that have successfully read item X—that is, read_TS(X) = TS(T), where T is the youngest transaction that has read X successfully. 2.Write_TS(X): The write timestamp of item X; this is the largest of all the timestamps of transactions that have successfully written item X—that is, write_TS(X) = TS(T), where T is the youngest transaction that has written X successfully. 3. Briefly explain the types of joint operation in query processing with an example for each.(Nov/Dec 2011) (16) Theta (θ) Join Theta join combines tuples from different relations provided they satisfy the theta condition. The join condition is denoted by the symbol θ. Notation R1 ⋈θ R2 R1 and R2 are relations having attributes (A1, A2, .., An) and (B1, B2,.. ,Bn) such that the attributes don’t have anything in common, that is R1 ∩ R2 = Φ. Equijoin When Theta join uses only equality comparison operator, it is said to be equijoin. The above example corresponds to equijoin. Natural Join (⋈) Natural join does not use any comparison operator. It does not concatenate the way a Cartesian product does. We can perform a Natural Join only if there is at least one common attribute that exists between two relations. In addition, the attributes must have the same name and domain Outer Joins Theta Join, Equijoin, and Natural Join are called inner joins. An inner join includes only those tuples with matching attributes and the rest are discarded in the resulting relation. Therefore, we need to use outer joins to include all the tuples from the participating relations in the resulting relation. There are three kinds of outer joins − left outer join, right outer join, and full outer join. Left Outer Join(R Left Outer Join S) All the tuples from the Left relation, R, are included in the resulting relation. If there are tuples in R without any matching tuple in the Right relation S, then the S-attributes of the resulting relation are made NULL. Right Outer Join: ( R Right Outer Join S ) All the tuples from the Right relation, S, are included in the resulting relation. If there are tuples in S without any matching tuple in R, then the R-attributes of resulting relation are made NULL. Full Outer Join: ( R Full Outer Join S) All the tuples from both participating relations are included in the resulting relation. If there are no matching tuples for both relations, their respective unmatched attributes are made NULL. 3. (i) Discuss 1NF,2NF,3NF (April/May 2011) (May/June 2014) (10) Normalization rule are divided into following normal form. First Normal Form Second Normal Form Third Normal Form BCNF Database Normalization is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable characteristics like Insertion, Update and Deletion Anomalies. It is a multi-step process that puts data into tabular form by removing duplicated data from the relation tables. Normalization is used for mainly two purpose, Eliminating reduntant(useless) data Ensuring data dependencies make sense i.e data is logically stored. Updation Anamoly : To update address of a student who occurs twice or more than twice in a table, we will have to update S_Address column in all the rows, else data will become inconsistent. Insertion Anamoly : Suppose for a new admission, we have a Student id(S_id), name and address of a student but if student has not opted for any subjects yet then we have to insert NULL there, leading to Insertion Anamoly. Deletion Anamoly : If (S_id) 401 has only one subject and temporarily he drops it, when we delete that row, entire student record will be deleted along with it. 4. Discuss (April/May 2011) (16) (i) Conflict serializability The following observation is a key characterization of conflict serializability: A schedule is conflict-serializable if and only if its precedence graph of committed transactions (when only committed transactions are considered) is acyclic. (ii) View serializability Two schedules S1 and S2 are view equivalent if they involve the same set of actions of the same transactions and if Ti reads the initial value of X in S1 then it must also read the initial value of X in S2 and if Ti reads the value of X written by Tj in S1 then it must also read the value of X written by Tj in S2 and For each data object X, the transaction (if any) that performs the final write on X in S1 must also perform the final write on X in S2 (iii) Two phase commit protocol The commit-request phase (or voting phase) Completion phase (iv) Validation based concurrency control protocol Execution of transaction Ti is done in three phases. 1. Read and execution phase: Transaction Ti writes only to temporary local variables 2. Validation phase: Transaction Ti performs a ``validation test'' to determine if local variables can be written without violating serializability. 3. Write phase: If Ti is validated, the updates are applied to the database; otherwise, Ti is rolled back. The three phases of concurrently executing transactions can be interleaved, but each transaction must go through the three phases in that order. Also called as optimistic concurrency control since transaction executes fully in the hope that all will go well during validation Start(Ti) : the time when Ti started its execution Validation(Ti): the time when Ti entered its validation phase Finish(Ti) : the time when Ti finished its write phase 5. Explain the deferred and immediate modification versions of log based recovery scheme May/June 2014 (8)