Relational Database Concepts MCQs

Topic-wise practice questions for Database Management Systems. Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q1medium
Observe the SQL below. What is the Primary Key of the

Enrollments table?
sql-editor - composite_keys

CREATE TABLE Enrollments (
    student_id INT,
Q2medium
According to the Entity Integrity Constraint, which of the following statements is true regarding a Primary Key?
Q3hard
Consider the following table and data. What happens if you try to

execute: DELETE FROM Parent WHERE id = 1;?
postgres - delete_logic

CREATE TABLE Parent (id INT PRIMARY KEY);
CREATE TABLE Child (
    c_id INT PRIMARY KEY,
    p_id INT REFERENCES Parent(id) ON DELETE CASCADE
);
INSERT INTO Parent VALUES (1);
Q4easy
In the relational model, why is it stated that "tuples are unordered"?
Q5medium
An e-commerce database has a table Orders. The designer wants to ensure that the total_amount column never accepts negative values. Which relational concept should be applied?
Q6medium
Consider a relation Employees(EmpID, Name, DeptID, Salary, Phone). Currently, there are 500 employee records. What are the Degree and the Cardinality of this relation?
Q7medium
A relation R has attributes {A, B, C, D}. The only unique combinations of attributes are {A, B} and {A, C}. How many Candidate Keys does this relation have?
Q8medium
What does the term "Domain" represent in a relational schema?

INSERT INTO Child VALUES (100, 1);
Q9medium
A table ProjectAssignments uses a composite Primary Key consisting of (EmployeeID, ProjectID). If a manager tries to assign Employee 501 to Project 'A' twice, which error will the DBMS throw?
Q10medium
If Relation A has 10 tuples and Relation B has 5 tuples, what is the Cardinality of the Cartesian Product (A x B)?