1.Easy
Which statement deletes a whole table, including its structure?
- AREMOVE TABLE
- BDELETE FROM
- CTRUNCATE ROWS
- DDROP TABLE
2.Easy
A foreign key is:
- AA column whose values must be unique across all rows of the table
- BA column that refers to the primary key of another table
- CA key that is always encrypted
- DA key used by foreign users
3.Easy
What is an entity-relationship (ER) diagram used for?
- AMeasuring database performance
- BModelling entities, their attributes and relationships when designing a database
- CListing the users of a database
- DShowing how a query is executed
4.Medium
Which ACID property means concurrent transactions do not see each other's unfinished changes?
- ADurability
- BIsolation
- CAtomicity
- DAvailability
5.Medium
Why can a table have only one clustered index?
- AClustered indexes use too much memory
- BThe SQL standard forbids more than one index on a table
- CClustered indexes can only be on the primary key
- DThe rows can be stored physically in only one order
6.Medium
Table a has 3 rows and table b has 4 rows. How many rows does SELECT * FROM a CROSS JOIN b return?
- A7
- B3
- C4
- D12
7.Hard
When is a schedule of concurrent transactions called serializable?
- AWhen the transactions run on one CPU only
- BWhen every transaction is given a serial number
- CWhen its effect is equivalent to some serial execution of the same transactions
- DWhen no transaction ever reads data
8.Hard
What is a covering index for a query?
- AAn index that covers every column of every table
- BAn index on the primary key only
- CAn index that contains all columns the query needs, so the table itself need not be read
- DAn index that is rebuilt every night
Answer key
- 1. D · DROP TABLE
- 2. B · A column that refers to the primary key of another table
- 3. B · Modelling entities, their attributes and relationships when designing a database
- 4. B · Isolation
- 5. D · The rows can be stored physically in only one order
- 6. D · 12
- 7. C · When its effect is equivalent to some serial execution of the same transactions
- 8. C · An index that contains all columns the query needs, so the table itself need not be read
Full step-by-step solutions: practise this topic on examproblems.com.