Lesson 4.10.5.1
4.10.5.1 Client server databases Quiz: AQA Computer Science, Unit 10
20 questions
In partnership with Revision Ninja
Lesson 4.10.5.1, Client server databases: 20 multiple choice questions for the AQA Computer Science (7517), Unit 10: Fundamentals of databases, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
What does a client server database system provide?
- Simultaneous access to the same database by several clients at the same time.
- A separate full copy of the whole database for each client to edit locally.
- Access by only one client at a time, to avoid any possibility of conflicts.
- Storage of data only on each client's local disk and never on the server.
-
What problem arises when two clients edit the same record at the same time?
- The foreign keys in the table are converted into primary keys by the database.
- Updates can be lost, because one change overwrites the other.
- Both clients are forced to switch to thin-client software before they can continue.
- The database is deleted automatically by the server to prevent conflicting edits.
-
Which mechanism stops other clients from editing a record while one client is changing it?
- Record locking.
- Normalisation, which reorganises tables into a smaller number of attributes.
- Data mining, which searches stored records for patterns over a long period.
- Foreign key checking, which confirms that linked rows still exist in other tables.
-
What does serialisation achieve in a database?
- It converts every record into a serial number for storage on the server disk, so that records can be listed in the order they were stored.
- It encrypts each record before it is sent over the network to a client.
- It copies the database to a backup server each time any record is changed.
- It orders concurrent transactions so that the result matches running them one after another.
-
Which control uses timestamps to decide the order in which conflicting operations are applied?
- Thin-client rendering, which draws the screen on the server before sending it.
- Timestamp ordering.
- Normalisation, which divides data into tables to remove redundancy.
- Record locking, which prevents other clients from using a record at all.
-
What is the purpose of concurrency control?
- To allow clients to read the database only after the server has been stopped.
- To preserve database integrity when many clients access the same data at the same time.
- To reduce the amount of data a client is allowed to store on its local device, so that the server holds all the data for the whole network.
- To make each client see a different version of every table in the database.
-
What is a record lock?
- A lock that stops other clients changing a record while one client is editing it.
- A setting that makes a record permanently read-only for every user of the system.
- A password that encrypts a single record in the database for security.
- A backup copy of a record that is stored on a separate server.
-
Two clients each read a balance of 100. Client A adds 20 and writes 120. Client B subtracts 30 from its copy of 100 and writes 70 without re-reading. What is the final value and why?
- 90, because both updates were applied in full to the same balance held in the database.
- 120, because the last write always keeps the larger value of the two records.
- 70, because Client B's write overwrote Client A's update, so the update was lost.
- 100, because the database rejects every write from a client that is in conflict with another.
-
If the two updates of +20 and -30 are serialised, starting from a balance of 100, what is the final balance?
- 120, which is the result of applying the +20 update and ignoring the -30 update.
- 110, which is the result of adding 20 and subtracting only 10.
- 70, which is the result of subtracting 30 without applying the 20 first.
- 90
-
A database uses record locking. Client A locks a record, and Client B then requests the same record. What happens to Client B?
- Client B is given a copy of the record, which it can edit without affecting the database.
- Client B edits the record at the same time, and the server merges the two versions automatically.
- Client B is disconnected from the database and must log in again before it can continue.
- Client B must wait until Client A releases the lock before it can edit the record.
-
Which problem does timestamp ordering help to prevent?
- A client being unable to connect to the server because of its IP address setting, which is a network problem and not a database fault.
- A later operation being applied before an earlier conflicting operation on the same data.
- A foreign key pointing to a row that does not yet exist in the referenced table.
- The database running out of disk space during a large import of records.
-
Why might a server use commitment ordering to control concurrent transactions?
- To apply the effects of conflicting transactions in the order in which they commit.
- To encrypt each transaction before it is sent over the network to the client.
- To let clients connect without any authentication, which saves time for every user.
- To reduce the number of tables the server must keep on its disk drive.
-
Which phrase describes several clients using a database at once while the system keeps the data correct?
- Concurrent access, with integrity controls such as locking or serialisation.
- Thin-client computing, with local caching of the records on each device.
- Big Data distributed storage, with records split across several servers.
- Normalised relational design, with each attribute stored in its own table, so that each client keeps its own copy of the tables it uses.
-
Which situation is most likely to lead to lost updates?
- Two clients read a record, then both write back changes with no locking or other control in place.
- A table with a foreign key that refers to a valid primary key in another table.
- Clients that connect over a wired network rather than a wireless network to the server.
- One client reads a record while the server writes a backup of the same record.
-
A school database lets staff update student records from many devices. Which feature is most important?
- A larger monitor, so that more records can be displayed on screen at one time.
- Storing the records in a single text file that every client opens and edits directly.
- Thick-client software, so that each device stores a full copy of all the records.
- Concurrency control, so that simultaneous edits do not overwrite each other.
-
Evaluate: what is a disadvantage of record locks?
- A client may have to wait, and two clients locking records in opposite order can cause a deadlock.
- They allow two clients to change the same field at the same time without any risk.
- They cause the database to store duplicate copies of every record it holds.
- They remove the need for any backup of the database to be taken regularly.
-
Why is simultaneous access managed rather than simply allowed?
- The database stores each client's changes in a separate file until the end of the day.
- Clients are not permitted to read data, so that writes can be done with safety.
- Without control, interleaved operations can leave the database in an inconsistent state.
- Every client must wait for the server to finish all of the other requests first.
-
Client A and Client B both edit record 5. Which control ensures that B's update is based on the current version of the record?
- A backup of record 5 taken before any of the edits begin in the session.
- A composite primary key that combines the record number with the name of the client.
- A foreign key on the record that points to a table with no rows at all.
- A timestamp or version check that rejects an update made to a stale copy.
-
Which statement correctly contrasts record locking with serialisation?
- Locking blocks access to a record while it is held, whereas serialisation orders conflicting transactions as if run one at a time.
- Locking is used only for thin clients, whereas serialisation is used only for thick clients.
- Both are the same technique under two different names used by different database vendors.
- Serialisation prevents all access to records, whereas locking orders transactions by their timestamps.
-
Why is a shared client server database more suitable than many separate local copies for a live ticket sales system?
- Shared databases cannot be accessed by more than one client at a time, so they are safer, since only one client can ever be connected.
- Local copies cannot store any data, so they are always empty during ticket sales.
- All clients see the same current data, so the system is less likely to sell the same seat twice.
- Separate copies are always faster because they never need to communicate with a server.
Related quizzes
- Entity relationship modelling Quiz · 4.10.1.1 · 20 questions
- Relational databases Quiz · 4.10.2.1 · 20 questions
- Database design and normalisation Quiz · 4.10.3.1 · 20 questions
- Structured Query Language (SQL) Quiz · 4.10.4.1 · 20 questions
- Data types Quiz · 4.1.1.1 · 20 questions
- Big Data Quiz · 4.11.1.1 · 20 questions
- Function types and first-class objects Quiz · 4.12.1.1 · 20 questions
- Analysis Quiz · 4.13.1.1 · 20 questions
- Data structures and abstract data types Quiz · 4.2.1.1 · 20 questions
- Breadth-first and depth-first search Quiz · 4.3.1.1 · 20 questions