1.Easy
Which SQL statement changes values in rows that already exist?
- AMODIFY
- BINSERT
- CREPLACE COLUMN
- DUPDATE
2.Easy
What is an entity-relationship (ER) diagram used for?
- AListing the users of a database
- BModelling entities, their attributes and relationships when designing a database
- CShowing how a query is executed
- DMeasuring database performance
3.Easy
GRANT and REVOKE belong to which part of SQL?
- AData Query Language (DQL)
- BData Manipulation Language (DML)
- CData Control Language (DCL)
- DData Definition Language (DDL)
4.Medium
Which ACID property guarantees that committed changes survive a system crash?
- AConsistency
- BIsolation
- CDurability
- DAtomicity
5.Medium
Third normal form (3NF) removes:
- AAtomic values
- BComposite keys
- CRedundant indexes on columns that are not part of a key
- DTransitive dependencies between non-key attributes
6.Medium
Students can take many courses and courses have many students. How is this modelled in tables?
- AWith a junction table holding foreign keys to both students and courses
- BWith a list of course ids stored in one column
- CWith a foreign key column course_id in the students table pointing to courses
- DBy merging students and courses into one table
7.Hard
Two-phase locking (2PL) ensures:
- AThat transactions never wait
- BThat no locks are needed
- CConflict-serializable schedules
- DThat deadlocks can never happen
8.Hard
Given the functional dependencies A → B, B → C and C → D on R(A, B, C, D), what is the closure A+?
- A{A, B, C}
- B{A, B}
- C{A, B, C, D}
- D{A}
Answer key
- 1. D · UPDATE
- 2. B · Modelling entities, their attributes and relationships when designing a database
- 3. C · Data Control Language (DCL)
- 4. C · Durability
- 5. D · Transitive dependencies between non-key attributes
- 6. A · With a junction table holding foreign keys to both students and courses
- 7. C · Conflict-serializable schedules
- 8. C · {A, B, C, D}
Full step-by-step solutions: practise this topic on examproblems.com.