0% found this document useful (0 votes)
59 views7 pages

Jntuworld: 1. What Is Atomicity Property

The document discusses various concepts related to database transactions including: 1. Atomicity means a transaction is either fully completed or rolled back if not completed. 2. Serializability means transactions produce the same results as serial execution. 3. Normalization is the process of decomposing relations to minimize redundancy and anomalies. 4. Triggers are stored procedures that run automatically when database events occur.

Uploaded by

LavanyaDoopati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views7 pages

Jntuworld: 1. What Is Atomicity Property

The document discusses various concepts related to database transactions including: 1. Atomicity means a transaction is either fully completed or rolled back if not completed. 2. Serializability means transactions produce the same results as serial execution. 3. Normalization is the process of decomposing relations to minimize redundancy and anomalies. 4. Triggers are stored procedures that run automatically when database events occur.

Uploaded by

LavanyaDoopati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

www.jntuworld.com www.jwjobs.

net

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

L D
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

O R
A functional dependency is a property of the semantics of the attributes in a relation.

W
The semantics indicate how attributes relate to one another, and specify the functional
dependencies between attributes. When a functional dependency is present, the

U
dependency is specified as a constraint between the attributes.

N T
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

J
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.

www.jntuworld.com
www.jntuworld.com www.jwjobs.net

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.

L D
R
6. What is Transaction
Def 1: Logical unit of database processing that includes one or more access

O
operations (read -retrieval, write - insert or update, delete).

Def 2: Transaction is an executing program forming a logical unit of database

- insert or update, delete).

U W
access operations that involves one or more database operations (read -retrieval, write

T
• Transaction boundaries:
o Begin and End transaction.
An application program may contain several transactions separated by the Begin

N

and End transaction boundaries.

J
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.

www.jntuworld.com
www.jntuworld.com www.jwjobs.net

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

L D
Assertion is nothing but a name given to a set of user defined constraints.

11. What are uses of Transaction




O R
It’s all about fast query response time and correctness
DBMS is a multi-user systems


correct result
U W
o Many different requests
o Some against same data items
Figure out how to interleave requests to shorten response time while guaranteeing

N T
o How does DBMS know which actions belong together?
Solution: Group database operations that must be performed together into
transactions

J
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:

www.jntuworld.com
www.jntuworld.com www.jwjobs.net

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.

L D
A schedule is view serializable if it is view equivalent to a serial schedule.

14. What are transaction properties



O R
Atomicity: A transaction is an atomic unit of processing; it is either
performed in its entirety or not performed at all.

U W
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

N T
the temporary update problem and makes cascading rollbacks of transactions
unnecessary .
Durability or permanency: Once a transaction changes the database and the

J
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.

www.jntuworld.com
www.jntuworld.com www.jwjobs.net

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. A field value of a database record
3. A disk block
4. A whole file

L D
R
5. The whole database

19. Define join dependency

O
W
A Join Dependency (JD), denoted by jd(R1,R2…Rn) specified on relation schema
R, specifies a constraint on the states r of R. The constraint states that every legal

T
we have condition
U
state r of R should have a join decomposition into R1,R2…Rn that is for every such r

*( ∏R1(r)∏R2(r)….∏Rn(r) )=r

J N
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

www.jntuworld.com
www.jntuworld.com www.jwjobs.net

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

L D
o Prime attribute: An attribute that is member of the primary key

• Examples: R
o Full functional dependency: a FD Y -> Z where removal of any attribute
from Y means the FD does not hold any more

O
o {SSN, PNUMBER} -> HOURS is a full FD since neither SSN -> HOURS
nor PNUMBER -> HOURS hold

W
o {SSN, PNUMBER} -> ENAME is not a full FD (it is called a partial
dependency ) since SSN -> ENAME also holds

U
A relation schema R is in second normal form (2NF) if every non-prime attribute A in

N T
R is fully functionally dependent on the primary key

23. Define Third Normal Form

J
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

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 attribute—that is, it is not a member of any


candidate key.

www.jntuworld.com
www.jntuworld.com www.jwjobs.net

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.

D
• Recall that not all determinants are keys.
• Those determinants that are keys we initially call candidate keys.

L
• Eventually, we select a single candidate key to be the primary key for the relation.

25. Define Fourth Normal Form

O R
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

U W
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].

N T
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.

J
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.

www.jntuworld.com

You might also like