Multi-generational architecture InterBase




1 multi-generational architecture

1.1 concurrency control
1.2 rollbacks , recovery
1.3 drawbacks





multi-generational architecture
concurrency control

consider simple banking application 2 users have access funds in particular account. bob reads account , finds there 1000 dollars in it, withdraws 500. jane reads same account before bob has changed it, sees 1000 dollars, , withdraws 800. account should 300 dollars overdrawn, however, depending on transaction gets processed first contain either 500 or 200 dollars. poses serious problem , needless say, database system multi-user access needs sort of system deal these scenarios.


the techniques used solve , other related problems known in database industry concurrency control.


traditional products used locks stated particular transaction going modify record. once lock placed, no 1 else read or modify data until lock released. lock may block changes single record, page (a group of records stored on disk) of records, or every record examined particular transaction, depending on lock resolution. lock resolution tradeoff between performance , accuracy—by blocking updates @ page level, example, updates blocked not in fact conflict updates made other transactions, performance improved in comparison record level locks.


locking becomes bigger problem when combined feature common such systems, isolation. because transactions typically involve both read , write—in example, read value of account , change it. in order show isolated view of data entire transaction, including records read never written to, must locked in many database servers.


in interbase, readers not block writers. instead, each record in database can exist in more 1 version. instance, when bob , jane read accounts both version 1 , reading 1000 dollars. when bob changes account make withdrawal data not overwritten, instead new version 2 created 500 dollars. jane s attempt make 800 dollar withdrawal notice there new version 2, , attempt make withdrawal fail.


this approach concurrency control called multiversion concurrency control. interbase s implementation of multiversion concurrency control commonly called multi-generational architecture. interbase second commercial database use technique; first dec s rdb/eln.


multiversion concurrency control makes true snapshot transaction isolation relatively simple implement. transaction snapshot isolation in interbase shows state of database precisely @ instant transaction began. useful backups of active database, long-running batch processes, , like.


rollbacks , recovery

interbase uses multi-generational architecture implement rollbacks. database servers use logs implement rollback feature, can result in rollbacks taking long time or possibly requiring manual intervention. contrast, interbase s rollbacks near-instantaneous , never fail.


drawbacks

certain operations more difficult implement in multi-generational architecture, , hence perform relative more traditional implementation. 1 example sql count verb. when index available on column or columns included in count, records must visited in order see if visible under current transaction isolation.







Comments

Popular posts from this blog

Biography Pavel Yablochkov

Discography Three Man Army

History VMFA-121