Sie sind auf Seite 1von 7

1.

What is atomicity property Atomicity means that a transaction is an atomic unit of processing; it is either performed in its entirety or not performed at all. Although a transaction is conceptually atomic, a transaction would usually consist of a number of steps. It is necessary to make sure that other transactions do not see partial results of a transaction and therefore either all actions of a transaction are completed or the transaction has no effect on the database. Therefore a transaction is either completed successfully or rolled back. This is sometime called all-or-nothing. 2. Define serializability of transactions Serializability is a given set of interleaved transactions is said to be serializable if and only if it produces the same results as the serial execution of the same transactions. 3. What is functional dependency A functional dependency is a property of the semantics of the attributes in a relation. The semantics indicate how attributes relate to one another, and specify the functional dependencies between attributes. When a functional dependency is present, the dependency is specified as a constraint between the attributes. Consider a relation with attributes A and B, where attribute B is functionally dependent on attribute A. If we know the value of A and we examine the relation that holds this dependency, we will find only one value of B in all of the tuples that have a given value of A, at any moment in time. Note however, that for a given value of B there may be several different values of A.

In the figure above, A is the determinant of B and B is the consequent of A. The determinant of a functional dependency is the attribute or group of attributes on the left-hand side of the arrow in the functional dependency. The consequent of a fd is the attribute or group of attributes on the right-hand side of the arrow. 1

4. What is Normalization The process of decomposing unsatisfactory "bad" relations by breaking up their attributes into smaller relations. Normalization is a process of analyzing relation schemas so that the following can be achieved 1. Minimizing redundancy 2. Minimizing insertion, updating, deletion anomalies 5. What is revoke command Revoke is a DDL command which is used to disallow the privileges that are granted by DBA using Grant command. 6. What is Transaction Def 1: Logical unit of database processing that includes one or more access operations (read -retrieval, write - insert or update, delete). Def 2: Transaction is an executing program forming a logical unit of database access operations that involves one or more database operations (read -retrieval, write - insert or update, delete). Transaction boundaries: o Begin and End transaction. An application program may contain several transactions separated by the Begin and End transaction boundaries. Basic operations are read and write o read_item(X): Reads a database item named X into a program variable. To simplify our notation, we assume that the program variable is also named X. o write_item(X): Writes the value of program variable X into the database item named X.

7. What is Trigger Triggers are simply stored procedures that are ran automatically by the database whenever some event happens.

8. What is the use of serializability Achieving concurrency by executing no. of transactions at a time Fast response to the user with correct result Utilization of recourses efficiently

9. What are transaction primitives Transaction boundaries are nothing but transaction primitives. They are Begin Transaction and End Transaction. 10. What is an Assertion Assertion is nothing but a name given to a set of user defined constraints. 11. What are uses of Transaction Its all about fast query response time and correctness DBMS is a multi-user systems o Many different requests o Some against same data items Figure out how to interleave requests to shorten response time while guaranteeing correct result o How does DBMS know which actions belong together? Solution: Group database operations that must be performed together into transactions o Either execute all operations or none

12. What are Anomalies Refers to a deviation from the common rule(s), type(s), arrangement(s), or form(s). The general anomalies are insertion ,updation,deletion anomalies.

13. Define view serializability View equivalence:

Two schedules are said to be view equivalent if the following three conditions hold: 1. The same set of transactions participates in S and S, and S and S include the same operations of those transactions. 2. For any operation Ri(X) of Ti in S, if the value of X read by the operation has been written by an operation Wj(X) of Tj (or if it is the original value of X before the schedule started), the same condition must hold for the value of X read by operation Ri(X) of Ti in S. 3. If the operation Wk(Y) of Tk is the last operation to write item Y in S, then Wk(Y) of Tk must also be the last operation to write item Y in S. View serializability: Definition of serializability based on view equivalence. A schedule is view serializable if it is view equivalent to a serial schedule.

14. What are transaction properties Atomicity: A transaction is an atomic unit of processing; it is either performed in its entirety or not performed at all. Consistency preservation: A correct execution of the transaction must take the database from one consistent state to another. Isolation: A transaction should not make its updates visible to other transactions until it is committed; this property, when enforced strictly, solves the temporary update problem and makes cascading rollbacks of transactions unnecessary . Durability or permanency: Once a transaction changes the database and the changes are committed, these changes must never be lost because of subsequent failure.

15. Define Latches Locks held for a short duration are called Latches. Latches do not follow concurrency methods rather than they used to guarantee the physical integrity of a page when that page being written from the buffer to disk. 16. Define Exclusive lock

Exclusive lock is a lock which specifies that no other transaction can able to access the data item, except the current transaction which holds it. Generally write lock is called as Exclusive lock. 17. Define Certify lock Certify lock is a lock used in multi version concurrency technique to certify that the new version created during write operation is going to be stored permanently in database. 18. Define Granularity Granularity means size of data item which may be one of the following 1. A database record 2. 3. A field value of a database record A disk block

4. A whole file 5. The whole database 19. Define join dependency A Join Dependency (JD), denoted by jd(R1,R2Rn) specified on relation schema R, specifies a constraint on the states r of R. The constraint states that every legal state r of R should have a join decomposition into R1,R2Rn that is for every such r we have condition *( R1(r)R2(r).Rn(r) )=r

20. What are Armstrong axioms a. Reflexive Rule: if X is super set of Y then XY b. Augmentation Rule: if XY then XZYZ c. Transitive Rule: if XY,YZ then XZ

21. Define First Normal Form 1NF Disallows composite attributes multivalued attributes nested relations; attributes whose values for an individual tuple are non-atomic A relation is in first normal form (1NF) if and only if all underlying simple domains contain atomic values only. 22. Define Second Normal Form Uses the concepts of FDs, primary key Definitions o Prime attribute: An attribute that is member of the primary key o Full functional dependency: a FD Y -> Z where removal of any attribute from Y means the FD does not hold any more Examples: o {SSN, PNUMBER} -> HOURS is a full FD since neither SSN -> HOURS nor PNUMBER -> HOURS hold o {SSN, PNUMBER} -> ENAME is not a full FD (it is called a partial dependency ) since SSN -> ENAME also holds

A relation schema R is in second normal form (2NF) if every non-prime attribute A in R is fully functionally dependent on the primary key 23. Define Third Normal Form o Transitive functional dependency: a FD X -> Z that can be derived from two FDs X -> Y and Y -> Z o Examples: o SSN -> DMGRSSN is a transitive FD Since SSN -> DNUMBER and DNUMBER -> DMGRSSN hold o SSN -> ENAME is non-transitive Since there is no set of attributes X where SSN -> X and X -> ENAME 6

A relation schema R is in third normal form (3NF) if it is in 2NF and no non-prime attribute A in R is transitively dependent on the primary key A Nonprime attribute is not a prime attributethat is, it is not a member of any candidate key. or A relation schema R is in third normal form (3NF) if whenever a FD X -> A holds in R, then either: (a) X is a superkey of R, or (b) A is a prime attribute of R 24. Define BCNF Normal Form A relation schema R is in BCNF normal form if whenever a FD X -> A holds in R, then either: (a) X is a superkey of R, or A relation is in BCNF if every determinant is a candidate key. Recall that not all determinants are keys. Those determinants that are keys we initially call candidate keys. Eventually, we select a single candidate key to be the primary key for the relation. 25. Define Fourth Normal Form A multivalued dependency (MVD) X >> Y specified on relation schema R, where X and Y are both subsets of R, specifies the following constraint on any relation state r of R: If two tuples t1 and t2 exist in r such that t1[X] = t2[X], then two tuples t3 and t4 should also exist in r with the following properties, where we use Z to denote (R 2 (X Y)): t3[X] = t4[X] = t1[X] = t2[X]. t3[Y] = t1[Y] and t4[Y] = t2[Y]. t3[Z] = t2[Z] and t4[Z] = t1[Z]. An MVD X >> Y in R is called a trivial MVD if (a) Y is a subset of X, or (b) X Y = R. A relation schema R is in 4NF with respect to a set of dependencies F (that includes functional dependencies and multivalued dependencies) if, for every nontrivial multivalued dependency X >> Y in F+, X is a superkey for R. Note: F+ is the (complete) set of all dependencies (functional or multivalued) that will hold in every relation state r of R that satisfies F. It is also called the closure of F.

Das könnte Ihnen auch gefallen