1.Easy
Which SQL statement retrieves data from a table?
- AINSERT
- BUPDATE
- CSELECT
- DCREATE
2.Easy
What does a CROSS JOIN return?
- AOnly rows that do not match
- BThe rows of the first table only
- COnly the rows that match on a shared key column
- DEvery combination of rows from the two tables
3.Easy
What does COMMIT do in a transaction?
- AStarts a new table
- BUndoes all changes made since the transaction began
- CLocks the whole database
- DMakes all changes of the transaction permanent
4.Medium
What is SQL injection?
- AA database backup technique
- BA technique for inserting many rows quickly with a single INSERT statement
- CA way to add indexes
- DAn attack where user input changes the structure of a SQL query
5.Medium
First normal form (1NF) requires that:
- AEvery table has exactly one column
- BEach column contains atomic values and there are no repeating groups
- CEvery non-key column depends on the whole key and on nothing but the key
- DThere are no foreign keys
6.Medium
Which ACID property guarantees that committed changes survive a system crash?
- AAtomicity
- BIsolation
- CConsistency
- DDurability
7.Hard
Table employee(emp_id, dept_id, dept_name) has the key emp_id, and dept_id → dept_name. Which statement is correct?
- AIt is not in 1NF
- BIt is in BCNF and therefore in 3NF
- CIt is in 2NF but not in 3NF
- DIt is not in 2NF
8.Hard
With multiversion concurrency control (MVCC), how can readers avoid blocking writers?
- AReaders see a consistent snapshot of committed row versions while writers create new versions
- BReaders always wait until all writers have committed
- CWriters are not allowed while any reader is active
- DReaders read uncommitted data directly
Answer key
- 1. C · SELECT
- 2. D · Every combination of rows from the two tables
- 3. D · Makes all changes of the transaction permanent
- 4. D · An attack where user input changes the structure of a SQL query
- 5. B · Each column contains atomic values and there are no repeating groups
- 6. D · Durability
- 7. C · It is in 2NF but not in 3NF
- 8. A · Readers see a consistent snapshot of committed row versions while writers create new versions
Full step-by-step solutions: practise this topic on examproblems.com.