Client Server Databases

4.10.5 (18 questions). Public Notes: AQA's A Level Computer Science

What is a Database Management System (DBMS)?

Software which processes databases transactions for clients or individual workstations.

Can you explain the advantages of a client-server system?

Database consistency as only one working copy is held. The resources of a powerful computer are available to many less powerful workstations. Access rights, security and backup of the database is managed centrally.

Explain what simultaneous access is?

More than one user can access the database at the same time.

What is concurrent access?

Simultaneous access of the same field or record.

What are two potential problems with concurrent access?

Updates are lost and inconsistences occur with simultaneous co-dependent updates.

Give two examples of a database operation?

Copying from a record or modifying a record.

Explain what a database transaction is.

A group of operations which all must be successful for a transaction to be saved and the database updated.

What occurs is any operation in a database transaction fails?

The DBMS allows the database to revert to a state previous to operations involved in the transaction.

What is the hierarchy of resolving potential client-server database systems?

Record locking >> Time stamp ordering >> Commitment orderingWith timestamp ordering and commitment ordering both being techniques of serialisation.

What problem does record locking fix?

Lost updates and prevents database inconsistencies.

Explain how record locking works?

When the initial request is made on a set of data, and another user attempts to make a second request on the same set of data, the DBMS prevents the second request from occurring, until the initial request is completed.

What problem could occur with record locking?

Database deadlock.

Explain what database deadlock is?

A transaction is made to copy from data set A to data set B, so dataset A is locked. Another transaction is made to copy data set B to data set A, so B is locked. If these occur at the same time, both A and B will be prevented from access so both transactions are waiting for either data set to free up, which will never occur.

What problem does serialisation prevent?

Database deadlock.

What are two methods of serialisation?

Time stamp ordering and commitment ordering.

Explain how timestamp ordering works?

Each transaction updates a read timestamp as it starts. Only The transaction with the earliest timestamp is applied, the other fails.

Why does timestamp ordering prevent updates being lost?

A write timestamp is also given, but only when it has updated the database. Before a write timestamp can be given the DBMS checks that the most recent read timestamp was the same as it was when it started. If not then the most recently requested transaction is doomed to fail, and the transaction requested first triumphs.

Explain commitment ordering?

As well as the read timestamp check, a table of transactional dependencies can be used to provide priority access and also prevent data inconsistencies.