wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DBMS_U1_Quiz

Total questions: 25

Worksheet time: 50mins

Name
Class
Date
1.

Which situation clearly demonstrates logical data independence?

a)

Changing indexes on a relation without affecting queries

b)

Changing file storage location without affecting users

c)

Adding a new attribute in a relation without affecting applications

d)

Moving from centralized to distributed DBMS without affecting schema

2.

In the three-schema architecture, which mapping ensures user views remain consistent when the conceptual schema changes?

a)

Internal ↔ Conceptual mapping

b)

External ↔ Internal mapping

c)

External ↔ Conceptual mapping

d)

View ↔ Storage mapping

3.

Consider the ER diagram where Department has many Employees, and each Employee works in exactly one Department. If converted into a relational schema:

a)

Employee will have a foreign key DeptID

b)

Department will have a foreign key EmpID

c)

A separate relation for Works_in is created

d)

No foreign key is required

4.

Which of the following is a case where Cartesian product is necessary before applying conditions?

a)

Natural join

b)

Theta join

c)

Cross-join without condition

d)

Outer join

5.

You have two relations: Borrower(RollNo, BookID) Reservation(RollNo, BookID) Which relational algebra finds students who borrowed a book but never reserved one?

a)

πRollNo(Borrower) − πRollNo(Reservation)

b)

πBookID(Borrower) − πBookID(Reservation)

c)

Borrower ÷ Reservation

d)

Borrower ∪ Reservation

6.

Which of the following cannot cause anomalies in DBMS?

a)

Insertion of partial data

b)

Deletion of tuple removing useful information

c)

Update inconsistencies due to redundancy

d)

Use of candidate keys instead of primary key

7.

In relational algebra, which query retrieves students enrolled in every course offered by ‘CSE’ department?

a)

πName(Student) ÷ πCourseID(σDept=‘CSE’(Course))

b)

πRollNo(Student) ÷ πCourseID(Course)

c)

σDept=‘CSE’(Student ⋈ Course)

d)

πName(Student) ∪ πCourseID(Course)

8.

Which is the primary difference between Natural Join and Equi Join?

a)

Natural Join removes duplicate attributes

b)

Equi Join allows inequality conditions

c)

Natural Join produces Cartesian product

d)

Equi Join cannot use more than one attribute

9.

A weak entity must always have:

a)

Its own primary key

b)

A multivalued attribute

c)

A foreign key referencing owner entity

d)

A derived attribute

10.

Which relational algebra query finds employees earning the second highest salary?

a)

σSalary=MAX(Salary)(Employee)

b)

Employee − σSalary=MAX(Salary)(Employee)

c)

σSalary=MAX(Salary)(Employee − σSalary=MAX(Salary)(Employee))

d)

πName(Employee) ÷ Salary

11.

Which situation demonstrates physical data independence?

a)

Changing storage from SSD to HDD without affecting schema

b)

Adding a new relation to schema without affecting user queries

c)

Changing an external view without affecting conceptual schema

d)

Changing logical schema without affecting physical schema

12.

Given: Employee(EmpID, Name, DeptID, Salary), Department(DeptID, DeptName). Which relational algebra finds names of employees working in the ‘Research’ department?

a)

πName(σDeptName=‘Research’(Employee ⋈ Department))

b)

σDeptName=‘Research’(πName(Employee ⋈ Department))

c)

πDeptID(σDeptName=‘Research’(Employee))

d)

πName(Employee) ÷ πDeptName(Department)

13.

Which is not true about relational algebra?

a)

It is a procedural query language

b)

It specifies how to retrieve data

c)

It always guarantees minimal intermediate results

d)

It includes set operations like union, difference

14.

A composite attribute in ER is always mapped to:

a)

Single atomic attribute in relational schema

b)

Multiple attributes in relational schema

c)

Another weak entity

d)

Derived attribute

15.

Which query finds employees who work on all projects controlled by their department?

a)

πEmpID(WorksOn) ÷ πProjectID(Project)

b)

πEmpID(WorksOn ⋈ Employee) ÷ πProjectID(Project ⋈ Employee)

c)

σDept=Dept(Project)

d)

πEmpID(Employee) − πEmpID(WorksOn)

16.

Which is the correct interpretation of σSalary>50000 ∧ Dept=‘CSE’(Employee)?

a)

Find employees in CSE department

b)

Find employees with salary above 50,000

c)

Find employees with salary above 50,000 in CSE department

d)

Find employees not in CSE department

17.

Which of the following is an example of derived attribute?

a)

Age from DateOfBirth

b)

Salary from Payslip

c)

StudentID in Student table

d)

DeptID in Department table

18.

Which scenario requires a ternary relationship?

a)

A student enrolls in a course

b)

A supplier supplies a product

c)

A doctor prescribes a medicine to a patient

d)

An employee works in a department

19.

Which of the following is not a valid reason for using DBMS over file system?

a)

Concurrency control

b)

Security

c)

Data abstraction

d)

Faster disk access in all cases

20.

Which query retrieves departments that have no employees?

a)

Department − πDeptID(Employee)

b)

πDeptID(Employee) ∪ Department

c)

σDeptID=NULL(Employee)

d)

Department ⋈ Employee

21.

Which relational algebra expression retrieves employees who work on at least one project in their department?

a)

πEmpID(WorksOn) ∩ πEmpID(Employee)

b)

πEmpID(WorksOn ⋈ Project)

c)

σDept=Dept(WorksOn)

d)

πEmpID(Employee) ∪ πEmpID(WorksOn)

22.

What is the main characteristic of an outer join in relational algebra?

a)

It returns only matching tuples

b)

It includes unmatched tuples from one or both relations

c)

It requires a condition to be specified

d)

It is equivalent to a Cartesian product

23.

Which query would find all departments that have at least one employee with a salary greater than 60,000?

a)

σSalary>60000(Department ⋈ Employee)

b)

πDeptID(Employee) ∩ πDeptID(σSalary>60000(Employee))

c)

Department ⋈ σSalary>60000(Employee)

d)

πDeptID(σSalary>60000(Employee))

24.

Which relational algebra expression retrieves all courses that have no students enrolled?

a)

Course ⋈ Enrollment

b)

σCourseID=NULL(Enrollment)

c)

πCourseID(Enrollment) ∪ Course

d)

Course − πCourseID(Enrollment)

25.

Which of the following operations is not part of the basic set of operations in relational algebra?

a)

Sorting

b)

Selection

c)

Union

d)

Projection