Friday, November 11, 2011

Snapshot isolation

Snapshot isolation is a guarantee that all reads made in a transaction will see a consistent snapshot of the database (in practice it reads the last committed values that existed at the time it started), and the transaction itself will successfully commit only if no updates it has made conflict with any concurrent updates made since that snapshot.

A transaction executing under snapshot isolation appears to operate on a personal snapshot of the database, taken at the start of the transaction. When the transaction concludes, it will successfully commit only if the values updated by the transaction have not been changed externally since the snapshot was taken. Such a write-write conflict will cause the transaction to abort.

Example with SQL Server

Monday, August 22, 2011

Resumen de Multidatabase Systems

Multidatabase systems (MDBS) represent the case where individual DBMSs (whether distributed or not) are fully autonomous and have no concept of cooperation.

In the case of logically integrated distributed DBMSs, the global conceptual schema defines the conceptual view of the entire database, while in the case of distributed multi-DBMSs, it represents only the collection of some of the local databases that each local DBMS wants to share.

In a MDBS, the GCS (which is also called a mediated schema) is defined by integrating either the external schemas of local autonomous databases or (possibly parts of their) local conceptual schemas. If they do not want to access data from another database. This is again an issue of autonomy.

A unilingual multi-DBMS is any application that accesses data from multiple databases must do so by means of an external view that is defined on the global conceptual schema. An alternative is multilingual architecture, where Queries against the global database are made using the language of the local DBMS.

The MDBS provides a layer of software that runs on top of these individual DBMSs and provides users with the facilities of accessing various databases. Note that as far as the individual DBMSs are concerned, the MDBS layer is simply another application that submits requests and receives answers.

A popular implementation architecture for MDBSs is the mediator/wrapper approach. A mediator “is a software module that exploits encoded knowledge about certain sets or subsets of data to create information for a higher layer of applications.” In the mediator level the global conceptual schema is implemented.

The mediators typically operate using a common data model and interface language. To deal with potential heterogeneities of the source DBMSs, wrappers are implemented whose task is to provide a mapping between a source DBMSs view and the mediators’ view. For example, if the source DBMS is a relational one, but the mediator implementations are object-oriented, the required mappings are established by the wrappers.

One can view the collection of mediators as a middleware layer that provides services above the source systems.