Which of the following statements are correct?
A. Database schema is the design of a database.
B. A database constraint is a restriction on the type of data that can be inserted into the table.
C. Database schema and database constraints are stored in the database catalog.
D. Primary key is used to relate two tables or relations.
Which of the following statements are correct?
A. Database schema is the design of a database.
B. A database constraint is a restriction on the type of data that can be inserted into the table.
C. Database schema and database constraints are stored in the database catalog.
D. Primary key is used to relate two tables or relations.
Solution
A, B and C are correct. A schema is the overall design (structure) of a database: its tables, attributes, data types and relationships. A constraint restricts what data can be inserted into a table, such as NOT NULL, UNIQUE or CHECK. The schema and the constraints are both stored as metadata in the database catalog (data dictionary).
Statement D: a primary key uniquely identifies each row of a table. It is a foreign key that relates two tables, by referring to the primary key of another table.
Related questions:
2025: 14 May Shift 1
2025: 16 May Shift 1
2025: 15 May Shift 2
