Explore topic-wise MCQs in Database.

This section includes 17 Mcqs, each offering curated multiple-choice questions to sharpen your Database knowledge and support exam preparation. Choose a topic below to get started.

1.

_____________IS_PREFERRED_METHOD_FOR_ENFORCING_DATA_INTEGRITY?$

A. Constraints
B. Stored Procedure
C. Triggers
D. Cursors
Answer» B. Stored Procedure
2.

HOW_MANY_TYPES_OF_CONSTRAINTS_ARE_PRESENT_IN_SQL_SERVER_??$

A. 4
B. 5
C. 6
D. 7
Answer» D. 7
3.

DROP_TABLE_CANNOT_BE_USED_TO_DROP_A_TABLE_REFERENCED_BY_A___________CONSTRAINT.?$

A. Local Key
B. Primary Key
C. Composite Key
D. Foreign Key
Answer» E.
4.

Which_of_the_constraint_can_be_enforced_one_per_table_?$

A. Primary key constraint
B. Not Null constraint
C. Foreign Key constraint
D. Check constraint
Answer» B. Not Null constraint
5.

Which of the following foreign key constraint specifies that the deletion fails with an error ?

A. NO ACTION
B. CASCADE
C. SET NULL
D. All of the mentioned
Answer» B. CASCADE
6.

Which one of the following uniquely identifies the elements in the relation?

A. Secondary Key
B. Primary key
C. Foreign key
D. Composite key
Answer» C. Foreign key
7.

Which of the following is not a foreign key constraint ?

A. NO ACTION
B. CASCADE
C. SET NULL
D. All of the mentioned
Answer» C. SET NULL
8.

______ is a special type of integrity constraint that relates two relations & maintains consistency across the relations.

A. Entity Integrity Constraints
B. Referential Integrity Constraints
C. Domain Integrity Constraints
D. Domain Constraints
Answer» C. Domain Integrity Constraints
9.

Purpose of foreign key constraint in SQL Server is :

A. FOREIGN KEY constraints identify and enforce the relationships between tables
B. A foreign key in one table points to a candidate key in another table
C. You cannot insert a row with a foreign key value, except NULL, if there is no candidate key with that value
D. None of the mentioned
Answer» B. A foreign key in one table points to a candidate key in another table
10.

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. Then entering an order quantity, the user must input a number and not some text (i.e., 12 rather than ‘a dozen’)
Answer» D. Then entering an order quantity, the user must input a number and not some text (i.e., 12 rather than ‚Äö√Ñ√∂‚àö√ë‚àö‚â§a dozen‚Äö√Ñ√∂‚àö√ë‚àö¬•)
11.

Establishing limits on allowable property values, and specifying a set of acceptable, predefined options that can be assigned to a property are examples of:

A. Attributes
B. Data integrity constraints
C. Method constraints
D. Referential integrity constraints
Answer» C. Method constraints
12.

Constraints can be applied on :

A. Column
B. Table
C. Field
D. All of the mentioned
Answer» E.
13.

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
D. Prevent users from changing the values stored in the table
Answer» D. Prevent users from changing the values stored in the table
14.

Which of the following constraint does not enforce uniqueness ?

A. UNIQUE
B. Primary key
C. Foreign key
D. None of the mentioned
Answer» D. None of the mentioned
15.

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.

A. One-to-many
B. One-to-one
C. Many-to-many
D. Many-to-one
Answer» E.
16.

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

A. One-to-many
B. One-to-one
C. Many-to-many
D. Many-to-one
Answer» C. Many-to-many
17.

_____________ express the number of entities to which another entity can be associated via a relationship set.

A. Mapping Cardinality
B. Relational Cardinality
C. Participation Constraints
D. None of the mentioned
Answer» B. Relational Cardinality