Jntuworld: 1. What Is Atomicity Property
Jntuworld: 1. What Is Atomicity Property
net
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.
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.
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
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).
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
L D
Assertion is nothing but a name given to a set of user defined constraints.
•
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
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.
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.
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
L D
R
5. The whole database
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
www.jntuworld.com
www.jntuworld.com www.jwjobs.net
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.
•
•
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
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
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
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.
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].
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.
www.jntuworld.com