NEW
Font size
WorksheetsDBMS_U1_Quiz
Total questions: 25
Worksheet time: 50mins
Which situation clearly demonstrates logical data independence?
Changing indexes on a relation without affecting queries
Changing file storage location without affecting users
Adding a new attribute in a relation without affecting applications
Moving from centralized to distributed DBMS without affecting schema
In the three-schema architecture, which mapping ensures user views remain consistent when the conceptual schema changes?
Internal ↔ Conceptual mapping
External ↔ Internal mapping
External ↔ Conceptual mapping
View ↔ Storage mapping
Consider the ER diagram where Department has many Employees, and each Employee works in exactly one Department. If converted into a relational schema:
Employee will have a foreign key DeptID
Department will have a foreign key EmpID
A separate relation for Works_in is created
No foreign key is required
Which of the following is a case where Cartesian product is necessary before applying conditions?
Natural join
Theta join
Cross-join without condition
Outer join
You have two relations: Borrower(RollNo, BookID) Reservation(RollNo, BookID) Which relational algebra finds students who borrowed a book but never reserved one?
πRollNo(Borrower) − πRollNo(Reservation)
πBookID(Borrower) − πBookID(Reservation)
Borrower ÷ Reservation
Borrower ∪ Reservation
Which of the following cannot cause anomalies in DBMS?
Insertion of partial data
Deletion of tuple removing useful information
Update inconsistencies due to redundancy
Use of candidate keys instead of primary key
In relational algebra, which query retrieves students enrolled in every course offered by ‘CSE’ department?
πName(Student) ÷ πCourseID(σDept=‘CSE’(Course))
πRollNo(Student) ÷ πCourseID(Course)
σDept=‘CSE’(Student ⋈ Course)
πName(Student) ∪ πCourseID(Course)
Which is the primary difference between Natural Join and Equi Join?
Natural Join removes duplicate attributes
Equi Join allows inequality conditions
Natural Join produces Cartesian product
Equi Join cannot use more than one attribute
A weak entity must always have:
Its own primary key
A multivalued attribute
A foreign key referencing owner entity
A derived attribute
Which relational algebra query finds employees earning the second highest salary?
σSalary=MAX(Salary)(Employee)
Employee − σSalary=MAX(Salary)(Employee)
σSalary=MAX(Salary)(Employee − σSalary=MAX(Salary)(Employee))
πName(Employee) ÷ Salary
Which situation demonstrates physical data independence?
Changing storage from SSD to HDD without affecting schema
Adding a new relation to schema without affecting user queries
Changing an external view without affecting conceptual schema
Changing logical schema without affecting physical schema
Given: Employee(EmpID, Name, DeptID, Salary), Department(DeptID, DeptName). Which relational algebra finds names of employees working in the ‘Research’ department?
πName(σDeptName=‘Research’(Employee ⋈ Department))
σDeptName=‘Research’(πName(Employee ⋈ Department))
πDeptID(σDeptName=‘Research’(Employee))
πName(Employee) ÷ πDeptName(Department)
Which is not true about relational algebra?
It is a procedural query language
It specifies how to retrieve data
It always guarantees minimal intermediate results
It includes set operations like union, difference
A composite attribute in ER is always mapped to:
Single atomic attribute in relational schema
Multiple attributes in relational schema
Another weak entity
Derived attribute
Which query finds employees who work on all projects controlled by their department?
πEmpID(WorksOn) ÷ πProjectID(Project)
πEmpID(WorksOn ⋈ Employee) ÷ πProjectID(Project ⋈ Employee)
σDept=Dept(Project)
πEmpID(Employee) − πEmpID(WorksOn)
Which is the correct interpretation of σSalary>50000 ∧ Dept=‘CSE’(Employee)?
Find employees in CSE department
Find employees with salary above 50,000
Find employees with salary above 50,000 in CSE department
Find employees not in CSE department
Which of the following is an example of derived attribute?
Age from DateOfBirth
Salary from Payslip
StudentID in Student table
DeptID in Department table
Which scenario requires a ternary relationship?
A student enrolls in a course
A supplier supplies a product
A doctor prescribes a medicine to a patient
An employee works in a department
Which of the following is not a valid reason for using DBMS over file system?
Concurrency control
Security
Data abstraction
Faster disk access in all cases
Which query retrieves departments that have no employees?
Department − πDeptID(Employee)
πDeptID(Employee) ∪ Department
σDeptID=NULL(Employee)
Department ⋈ Employee
Which relational algebra expression retrieves employees who work on at least one project in their department?
πEmpID(WorksOn) ∩ πEmpID(Employee)
πEmpID(WorksOn ⋈ Project)
σDept=Dept(WorksOn)
πEmpID(Employee) ∪ πEmpID(WorksOn)
What is the main characteristic of an outer join in relational algebra?
It returns only matching tuples
It includes unmatched tuples from one or both relations
It requires a condition to be specified
It is equivalent to a Cartesian product
Which query would find all departments that have at least one employee with a salary greater than 60,000?
σSalary>60000(Department ⋈ Employee)
πDeptID(Employee) ∩ πDeptID(σSalary>60000(Employee))
Department ⋈ σSalary>60000(Employee)
πDeptID(σSalary>60000(Employee))
Which relational algebra expression retrieves all courses that have no students enrolled?
Course ⋈ Enrollment
σCourseID=NULL(Enrollment)
πCourseID(Enrollment) ∪ Course
Course − πCourseID(Enrollment)
Which of the following operations is not part of the basic set of operations in relational algebra?
Sorting
Selection
Union
Projection
