Java DataBase Connectivity Mediator Service
The JDBC Data Mediator Service (DMS) is the Service Data Objects (SDO) component that connects to any database that supports JDBC connectivity. It provides the mechanism to move data between a DataGraph and a database.
A regular JDBC call returns a result set in a tabular format. This format does not directly correspond to the object-oriented data model of Java, and can complicate navigation and update operations. When a client sends a query for data through the JDBC DMS, the JDBC result set of tabular data is transformed into a DataGraph composed of related DataObjects. This enables clients to navigate through a graph to locate relevant data rather than iterating through rows of a JDBC result set. Once we have altered the DataGraph, all of the changes can be committed together and propagated back to the database by the JDBC DMS. Between the processes of being populated and committed, the DataGraph is disconnected from the database, and there are no locks held on the data accessed. Once disconnected allows multiple changes to be made to the graph without making additional round trips to the database, improving performance.
The JDBC DMS is created with server-specific metadata. The metadata defines the structure of the DataGraph that is produced by the DMS, as well as the query to be used against the server.
Subtopics
- Metadata for Data Mediator Service
A Data Mediator Service (DMS) is the Service Data Object (SDO) component that connects to the back end database. It is created with back end specific metadata. The metadata defines the structure of the DataGraph that is produced by the DMS as well as the query to be used against the back end.
- Dynamic and static object types for the JDBC DMS
DataObjects of the Service Data Object (SDO) 1.0 Specification can use static types as well as dynamic types. If we know that a particular dataGraph schema meets all of the application query requirements, we can generate static SDO code for potential runtime benefits.
- JDBC mediator supplied query
An SDO client can supply the JDBC Data Mediator Service (DMS) with a SELECT statement to replace the statement that is generated from the DMS metadata.
- JDBC mediator generated query
If we do not provide a SQL SELECT statement, then the data mediator service (DMS) generates one using the metadata provided at instance creation.
- JDBC mediator transactions
We can specify that the JDBC mediator either act as transaction manager, or refrain from such activities in the case of external transaction management (performed by the SDO client).
- JDBC mediator integration with presentation layer
The JDBC Data Mediator Service (DMS) can be used in conjunction with web application presentation layer technologies such as JSP Standard Tag Library (JSTL) and JavaServer Faces (JSF).
- JDBC mediator paging
Paging can be useful for moving through large data sets because it can limit the amount of data pulled into memory at any given time. The JDBC DMS API provides two interfaces that implement paging.
- JDBC mediator serialization
The DataGraph produced by the JDBC DMS can be serialized and written out to a file, or sent across a network.
Related tasks
Use the Java Database Connectivity data mediator service for data access