1. What are different types of
relational constraints?
Ans:
1. Domain constraints
2. Key constraints
3. Entity integrity constraints
4. Referential integrity constraints
Domain constraints specify that the value of each attribute must be an atomic value from the domain of the attributes.
Key constraints tell that no two tuples can have the same combination of values for all their attributes.
Entity integrity constraint states that no primary key value can be null.
Referential integrity constraints states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation it is specified between two relations and is used to maintain the consistency among tuples of the two relations.
Ans:
1. Domain constraints
2. Key constraints
3. Entity integrity constraints
4. Referential integrity constraints
Domain constraints specify that the value of each attribute must be an atomic value from the domain of the attributes.
Key constraints tell that no two tuples can have the same combination of values for all their attributes.
Entity integrity constraint states that no primary key value can be null.
Referential integrity constraints states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation it is specified between two relations and is used to maintain the consistency among tuples of the two relations.
2. What is difference between a
super key, a key, a candidate key and a primary key?
Ans: A super key specifies a uniqueness constrain that no two distinct tuples in a state can have the same value for the super key. Every relation has at least one default super key.
A key is a minimal super key or the subset of the super key which is obtained after removing redundancy.
Ans: A super key specifies a uniqueness constrain that no two distinct tuples in a state can have the same value for the super key. Every relation has at least one default super key.
A key is a minimal super key or the subset of the super key which is obtained after removing redundancy.
A relation schema may have more than one key .In this case each key is called a candidate key.
One of the candidate key with minimum
number of attributes is chosen as primary key.
3. What is a foreign key?
Ans: A key of a relation schema is called as a foreign key if it is the primary key of some other relation to which it is related to.
Ans: A key of a relation schema is called as a foreign key if it is the primary key of some other relation to which it is related to.
4. What is a transaction?
Ans: A transaction is a logical unit of database processing that includes one or more database access operations.
Ans: A transaction is a logical unit of database processing that includes one or more database access operations.
5. What are the properties of
transaction?
Ans:
1. Atomicity
2. Consistency preservation
3. Isolation
4. Durability (permanence)
Ans:
1. Atomicity
2. Consistency preservation
3. Isolation
4. Durability (permanence)
6. What are the basic data base
operations?
Ans:
1. Write_item(x)
2. Read_item(x)
Ans:
1. Write_item(x)
2. Read_item(x)
7. What are the disadvantages of
not controlling concurrency?
Ans:
1. Lost update problem
2. Temporary update(Dirty read) problem
3. Incorrect summary problem
Ans:
1. Lost update problem
2. Temporary update(Dirty read) problem
3. Incorrect summary problem
8. What are serial, non serial?
Ans: A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively in the schedule, otherwise, the schedule is called non-serial schedule.
Ans: A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively in the schedule, otherwise, the schedule is called non-serial schedule.
9. What are conflict serializable
schedules?
Ans: A schedule S of n transactions is serializable if it is equivalent to some serial schedule of the same n transactions.
Ans: A schedule S of n transactions is serializable if it is equivalent to some serial schedule of the same n transactions.
10. What is result equivalent?
Ans: Two schedules are called result equivalent if they produce the same final state of the data base.
No comments:
Post a Comment