Apuntes
Server Side Databases
Contenido del apunte (3)
Página 1
Server-based Databases
Problems
Simultaneous access to a database can cause problems, but only under specific circumstances
two clients attempt to edit the same record at the same time, one of the edits will be lost as it is overwritten this is the lost update problem
Managing Concurrent Access
Transactions
Each query is passed to the database as a transaction
3 stages
submitted (sent to the database, with an attached timestamp)
executed (the processing takes place)
committed (the data is read/written)
Página 2
Record Locks
Once a transaction is submitted, the record is locked
No other transactions on that record can take place until the first transaction commits and the lock is released
Any updates sent during the lock period will fail, and will need to be re-attempted
Serialisation
the transactions are queued and executed in a specific order, rather than being blocked
Timestamp Ordering
database prioritises the timestamp when deciding what order to execute the transactions
Each transaction will be executed in the order they were submitted
Commitment Ordering
The database prioritises commitment when deciding what order to execute the transactions
Transactions are executed in the order they commit, rather then the order they were submitted
Página 3
Pros and Cons
Timestamp ordering is generally faster, but can result in anomalies if later transactions commit before earlier ones
Commitment ordering is more predictable, but can be slower, and may result in deadlocks, where one transaction is waiting for the commitment of another, which is waiting for the commitment of the first
Información
- Descripción
- A level (4.10 Databases) Computing Apunte sobre Server Side Databases, creado por Rose Wakeford el 16/03/2026.
- Creado por
- Rose Wakeford
- Visitas
- 0
- Valoración