1.Easy
Which SQL statement changes values in rows that already exist?
- AREPLACE COLUMN
- BUPDATE
- CINSERT
- DMODIFY
2.Easy
Which keyword sorts the result of a query?
- AARRANGE
- BORDER BY
- CGROUP BY
- DSORT
3.Easy
In the relational model, what is a row of a table called?
- AA tuple
- BA schema
- CAn attribute
- DA domain
4.Medium
A column holds the values 10, 20 and NULL. What does AVG(col) return?
- A10
- B30
- CNULL
- D15
5.Medium
What does GRANT SELECT ON employees TO alice do?
- AMakes alice the owner of the database
- BAllows alice to update and delete rows in the employees table
- CAllows the user alice to read the employees table
- DCopies the employees table to alice
6.Medium
First normal form (1NF) requires that:
- AThere are no foreign keys
- BEvery non-key column depends on the whole key and on nothing but the key
- CEach column contains atomic values and there are no repeating groups
- DEvery table has exactly one column
7.Hard
A table has a million rows and a Boolean column is_active that is TRUE for 95% of them. Why might the optimiser ignore an index on is_active for WHERE is_active = TRUE?
- ATRUE is treated as NULL by the index
- BIndexes cannot be created on Boolean columns
- CThe optimiser never uses indexes in WHERE clauses
- DMost rows match, so a full table scan is cheaper than many index lookups
8.Hard
What is a known drawback of decomposing tables into BCNF compared with 3NF?
- ABCNF tables cannot have primary keys
- BThe decomposition always loses data when joined back
- CSome functional dependencies may no longer be checkable within a single table
- DBCNF allows more redundancy than 3NF
Answer key
- 1. B · UPDATE
- 2. B · ORDER BY
- 3. A · A tuple
- 4. D · 15
- 5. C · Allows the user alice to read the employees table
- 6. C · Each column contains atomic values and there are no repeating groups
- 7. D · Most rows match, so a full table scan is cheaper than many index lookups
- 8. C · Some functional dependencies may no longer be checkable within a single table
Full step-by-step solutions: practise this topic on examproblems.com.