SQL Integrity Constraints Questions and Answers

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


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


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


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


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






Also check :


Discussion


* You must be logged in to add comment.