SQL Integrity Constraints Questions and Answers

Integrity Constraints MCQs : This section focuses on the "Integrity Constraints" of the SQL. These Multiple Choice Questions (mcq) should be practiced to improve the SQL skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. To include integrity constraint in an existing relation use :

A. Modify table
B. Drop table
C. Alter table
D. Create table

View Answer


2. Which of the following is not an integrity constraint?

A. Not null
B. Positive
C. Unique
D. Check predicate

View Answer


3. Foreign key is the one in which the ________ of one relation is referenced in another relation.

A. Foreign key
B. Primary key
C. References
D. Check constraint

View Answer


4. Domain constraints, functional dependency and referential integrity are special forms of _________

A. Foreign key
B. Primary key
C. Assertion
D. Referential constraint

View Answer


5. Which of the following is the right syntax for the assertion?

A. CREATE ASSERTION [ assertion_name ] CHECK ( [ condition ] );
B. CREATE ASSERTION CHECK ( [ condition ] );
C. CREATE ASSERTION [ assertion_name ];
D. All of the mentioned

View Answer


6. Data integrity constraints are used to:

A. Control who is allowed access to the data
B. Ensure that duplicate records are not entered into the table
C. Improve the quality of data entered for a specific property (i.e., table column)
D. Prevent users from changing the values stored in the table

View Answer


7. Which of the following can be addressed by enforcing a referential integrity constraint?

A. All phone numbers must include the area code
B. Certain fields are required (such as the email address, or phone number) before the record is accepted
C. Information on the customer must be known before anything can be sold to that customer
D. When entering an order quantity, the user must input a number and not some text

View Answer


8. The relationship between the two tables are created using __________

A. Candidate Key
B. Primary Key
C. Foreign Key
D. Check Constraint

View Answer


9. The Entity Customer has three candidate keys: a) CustId b) Email and c) ContactNo. Suggest the best primary key for this entity.

A. CustId
B. Email
C. ContactNo
D. CustId and ContactNo

View Answer


10. Which of the following statement(s) is/are FALSE about primary key?

A. There can be more than one primary key for a table
B. Columns with string data types cannot be made Primary Key because they are large
C. Both A and B
D. None of the above

View Answer


11. Data integrity control __________.

A. is used to set upper and lower limits on numeric data
B. requires the use of passwords to prohibit unauthorized access to the file
C. has the data dictionary to keep the data and time of last access, last back-up, and most recent modifications for all files
D. none of these

View Answer


12.  Referential triggered action clause in Standard Query Language is attached to constraint called

A. primary key constraint
B. stamped key constraint
C. interval notation constraint
D. foreign key constraint

View Answer


13.  If the explicit value of attributes is not provided in SQL then the value included in new tuple in such situation is called

A. sampled statement
B. decimal value
C. notation statement
D. default value

View Answer


14.  If the referential integrity constraint is violated then the specific action clause attached by the database designers other than by default action is classified as

A. referential triggered action
B. foreign key triggered action
C. primary key triggered action
D. decimal triggered action

View Answer


15. Constraints that are applied on individual tuples and are verified whenever any tuple is modified or new tuple is inserted are called

A. language based constraints
B. tuple based constraints
C. scale based constraints
D. precision based constraints

View Answer


16. Which of the following is not a integrity constraint ?

A. Not null
B. Positive
C. Unique
D. Check predicate

View Answer


17. SQL standard allows a clause initially deferred to be added to a

A. Uniqueness specification
B. Atomicity specification
C. Constraint specification
D. Isolation specification

View Answer


18. When a referential-integrity constraint is violated, the normal procedure is to

A. Continue with flow
B. Accept the action
C. Reject the action
D. Store it for evaluation

View Answer


19. The most easily tested constraints of a new data entered is into a database is called?

A. referential constraints
B. domain constraints
C. assertion
D. None of these

View Answer


20.  Constraints are the preferred method for enforcing data

A. data topple
B. data integrity
C. data inheritance
D. None of the above

View Answer





Also check :


Discussion



* You must be logged in to add comment.