Database Reference
In-Depth Information
This somewhat contradicts the objectives of transaction independence and
redundancy control. As was emphasized in chapter 4, once data replication is introduced
in a database, with it come various other data integrity problems. Resolution is therefore a
matter of tradeoff.
Concurrency
Concurrency is another issue that must be resolved. To illustrate, consider what might
happen if user X tries to retrieve a particular data set for update purposes, but that data
set is being updated by another user Y. Consider that in a distributed system, there might
be thousands of users, so that this kind of contention could easily develop among several
users. Typically, the DBMS handles this problem by record locking : a record or data set
that is retrieved for update is locked to that transaction until the update is completed;
it is then released (unlocked) for other users. Requests to release ( unlock ) objects in a
distributed database system must be managed. This is a serious overhead.
In application development where distributed databases are accessed, or there is
multi-user access of a single database, the application programmer must check for record
lock on a data set before attempting to lock that data set. The application programmer
must program a graceful recovery from a record lock situation (normally done by issuing
an appropriate message to the end user and allowing them to defer that particular
request until some subsequent time).
Transaction Management
Issues such as when to lock records, and when to commit or rollback transactions are
critical in a distributed database. The application developer must be familiar with the
facilities provided by the DBMS and SQL (COMMIT and ROLLBACK) for managing
transactions.
22.5 Database Gateways
Traditionally, a database gateway is a software component that links two different DBMS
suites. It could run on either of the two systems running the dissimilar DBMS suites, or
on a separate machine for that purpose. The simplest configuration is to run the software
on either system as a driver for the other DBMS. Another alternative is to use the software
called Open Database Connectivity (ODBC). ODBC is marketed with the Windows
operating system, and is readily available for other operating systems.
Suppose for instance, that Oracle and DB2 both support SQL (as in fact, they do).
It should therefore be possible to link the two DBMS suites, as illustrated in Figure 22-2 .
In reality, each product includes an ODBC driver that in effect acts as the gateway.
Following are some functions of the gateway:
Mapping between the two different protocols (formats)
Mapping between the two different dialects of SQL (e.g. Oracle's
dialect versus DB2's dialect)
 
Search WWH ::




Custom Search