What is the purpose of the SQL 'CONSTRAINT' keyword? MCQ with Answer and Explanation

What is the purpose of the SQL 'CONSTRAINT' keyword?
A. To join tables
B. To define rules for data integrity
C. To create views
D. To create indexes
Answer: Option B
Solution (By JKSSB Mock Tests)
Constraints are used to enforce rules on data, such as NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
What is a candidate key in a relation?
A. A super key that is minimal
B. A foreign key
C. Any column that can be used as a primary key
D. A key that is not unique

Correct Answer: Option A


Explanation:
A candidate key is a minimal super key, meaning no subset of it can uniquely identify a row.

This question belongs to: Computer Database Management System (DBMS)
Question #2
RDBMS is based on which model?
A. Object-oriented model
B. Relational model
C. Hierarchical model
D. Network model

Correct Answer: Option B


Explanation:
Relational Database Management System (RDBMS) is based on the relational model proposed by E.F. Codd.

This question belongs to: Computer Database Management System (DBMS)
Question #3
A table is in Third Normal Form (3NF) if it is in 2NF and has absolutely no non-prime attributes that exhibit what type of dependency?
A. Join Dependency
B. Transitive Dependency
C. Partial Dependency
D. Trivial Dependency

Correct Answer: Option B


Explanation:
Third Normal Form (3NF) requires a relation to be in 2NF with no transitive dependencies, meaning non-prime attributes cannot be determined by other non-prime attributes.

This question belongs to: Computer Database Management System (DBMS)