1.Easy
Which SQL statement changes values in rows that already exist?
- AREPLACE COLUMN
- BMODIFY
- CUPDATE
- DINSERT
2.Easy
What is an entity-relationship (ER) diagram used for?
- AModelling entities, their attributes and relationships when designing a database
- BListing the users of a database
- CMeasuring database performance
- DShowing how a query is executed
3.Easy
In the relational model, what is a row of a table called?
- AA domain
- BA tuple
- CAn attribute
- DA schema
4.Medium
What does SELECT COALESCE(phone, 'unknown') FROM customers return for a customer whose phone is NULL?
- AAn empty string
- BNULL
- CAn error
- D'unknown'
5.Medium
What does EXCEPT (called MINUS in Oracle) return?
- ARows of the first query that do not appear in the second
- BAll rows from both queries without duplicates
- CRows that appear in both queries
- DRows of the second query that do not appear in the first one
6.Medium
Why are indexes created on columns?
- ATo speed up searches and joins on those columns
- BTo make inserts and updates faster on those columns
- CTo save disk space
- DTo prevent NULL values
7.Hard
Which window function assigns 1, 2, 3, ... to rows within each partition without ties?
- ACOUNT()
- BRANK()
- CDENSE_RANK()
- DROW_NUMBER()
8.Hard
Two doctors on call each check that the other is still on call, then both sign off at the same time. Which anomaly can snapshot isolation still allow here?
- AWrite skew
- BNon-repeatable read within one transaction
- CDirty read
- DDirty write
Answer key
- 1. C · UPDATE
- 2. A · Modelling entities, their attributes and relationships when designing a database
- 3. B · A tuple
- 4. D · 'unknown'
- 5. A · Rows of the first query that do not appear in the second
- 6. A · To speed up searches and joins on those columns
- 7. D · ROW_NUMBER()
- 8. A · Write skew
Full step-by-step solutions: practise this topic on examproblems.com.