Constraints(Engineering > Computer Science And Engineering > Dbms Questions And Answers ) Questions and Answers
Question 1. Which of the following is not a integrity constraint ?
Not null
Positive
Unique
Check 'predicate'
Explanation:-
Answer: Option B. -> Positive
PositivePositive is a value and not a constraint.
Question 2. To include integrity constraint in a existing relation use :
Create table
Modify table
Alter table
Explanation:-
Answer: Option C. -> Alter table
Alter tableSYNTAX “ alter table table-name add constraint , where constraint can be any constraint on the relation.
Question 3. Domain constraints, functional dependency and referential integrity are special forms of _________.
Foreign key
Primary key
Assertion
Referential constraint
Explanation:-
Answer: Option C. -> Assertion
AssertionAn assertion is a predicate expressing a condition we wish the database to always satisfy.
Question 4. Foreign key is the one in which the ________ of one relation is referenced in another relation.
Foreign key
Primary key
References
Check constraint
Explanation:-
Answer: Option B. -> Primary key
Primary keyThe foreign-key declaration specifies that for each course tuple, the department name specified in the tuple must exist in the department relation.
Question 5. Which of the following is the right syntax for assertion?
Question 6. Data integrity constraints are used to:
Control who is allowed access to the data
Ensure that duplicate records are not entered into the table
Improve the quality of data entered for a specific property (i.e., table column)
Prevent users from changing the values stored in the table
Explanation:-
Answer: Option C. -> Improve the quality of data entered for a specific property (i.e., table column)
Improve the quality of data entered for a specific property (i.e., table column)
Question 7. _____________, express the number of entities to which another entity can be associated via a relationship set.
Mapping Cardinality
Explanation:-
Answer: Option A. -> Mapping Cardinality
Mapping CardinalityMapping cardinality is also called as cardinality ratio.
Question 8. Which of the following can be addressed by enforcing a referential integrity constraint?
All phone numbers must include the area code
Certain fields are required (such as the email address, or phone number) before the record is accepted
Information on the customer must be known before anything can be sold to that custome
When entering an order quantity, the user must input a number and not some text (i.e., 12 rather than 'a dozen')
Explanation:-
Answer: Option C. -> Information on the customer must be known before anything can be sold to that custome
Information on the customer must be known before anything can be sold to that customeThe information can be referred and obtained .
Question 9. An entity in A is associated with at most one entity in B, and an entity in B is associated with at most one entity in A.This is called as
One-to-many
One-to-one
Many-to-many
Many-to-one
Explanation:-
Answer: Option B. -> One-to-one
One-to-oneHere one entity in one set is related to one one entity in other set.
Question 10. An entity in A is associated with at most one entity in B. An entity in B, however, can be associated with any number (zero or more) of entities in A.
One-to-many
One-to-one
Many-to-many
Many-to-one
Explanation:-
Answer: Option D. -> Many-to-one
Many-to-oneHere more than one entity in one set is related to one one entity in other set.