4.10 Fundamentals of DB (Client Server Databases) Flashcards
(18 cards)
What is a client-server database
A multi-user database, which allows various users can access it from different locations at the same time.
How is a client-server databases managed
- They are managed by a DBMS (Database Management System)
What is the lost update problem
Where concurrent access of a record in a database causes the update of one transaction to be overwritten by the other
What is concurrent access
When multiple users make transactions on the same record at the same time
What is a DBMS
Software that enables the management of all aspects of a database
What is the main problem with client server databases
- Concurrent access can result in the problem of
updates being lost if two clients edit a record at
the same time
What are the different ways concurrent access can be managed
- Record Locks
- Serialisation
- Commitment Ordering
- Timestamps
What is a non-distributed system
where all the parts of the system are in the same physical location
What are the three methods used in a non-distributed client server database to prevent the lost update problem
- Serialisation
- Record Locks
- Timestamps
What is the method used in a distributed client server database to prevent the lost update problem
- Commitment Ordering
Why is commitment ordering used for distributed client server databases
- Commitment ordering is more effective when there are a higher volume of people using the database concurrently
What is a transaction
A unit or request made by a user on a database
How do record locks work
When a record is accessed by one user, it is immediately locked to other users until the first user has finished using it. Other users are blocked from accessing or modifying the content of a field until it has been unlocked.
How does serialization work
requests from users are
placed in a queue. Once the first user has finished using the
field, the next command in the queue is executed and so on.
How does Timestamp Ordering work
each transaction is assigned a timestamp for reading and writing. Commands
are carried out on the field in the order of their timestamps.
How does Commitment Ordering work
When a database uses commitment ordering, an algorithm is used to work out an optimum order in which to execute commands for the same field. This algorithm will take into account the impact of commands on other parts of the database and attempt to minimise issues from occurring with the database.
What is the problem with record locking
A deadlock can occur when multiple transactions are dependent on each other finishing before the transaction itself finishes
How is deadlocking prevented when using record locks
Commitment Ordering:
- If the transaction is likely to cause a deadlock, it is blocked until other transactions finishes