SDO API
SDO API Overview
The SDO runtime uses the DataGraph and DataObject interfaces to represent data. These are conceptually similar to the Document and Element classes used to model XML documents. The DataGraph contains a single root DataObject. A DataObject can contain simple properties and can contain other DataObjects. The DataGraph keeps track of any changes made to the data objects it contains and can then provide the SDO runtime with enough information for it to update the data store at the end of a transaction.
Code Sample using Dynamic SDO API
The SDO API is dynamic in nature, allowing applications to be built without the need for code generation.
DataGraph graph = db.executeQuery( select * from customer );
DataObject root = graph.getRootObject();
// use xpath to get the name of the first customer
String firstCustName = root.getString( customer[0]/name );
// iterate through all customers
Iterator iter = root.getList( customer ).iterator();
while (iter.hasNext()) {
DataObject dataObject = (DataObject) iter.next();
String custName = dataObject.getString( name );
}
Code Sample using Code Generated Static SDO API
FireStorm/SDO can generate static classes that extend DataObject and provide schema-specific type-safe methods for accessing data while still allowing the dynamic SDO API methods to be used. Using the code-generated classes, it is possible to cast DataObjects to specific application classes (in this example, Customer is a generated class that extends DataObject).
// iterate through all customers
Iterator iter = root.getList( customer ).iterator();
while (iter.hasNext()) {
Customer customer = (Customer) iter.next();
String custName = customer.getName();
}
FireStorm/SDO Implementation of the SDO API
FireStorm/SDO provides database persistence based on the Service Data Object (SDO API) specification. FireStorm/SDO is particularly useful for high performance applications that have a Service-Oriented Architecture.
FireStorm/SDO consists of an SDO Runtime and an SDO Code Generation Tool.
You can see a video demonstration here.
FireStorm/SDO Runtime
The FireStorm/SDO provides a pure Java implementation of the SDO API specification, allowing existing relational databases to be accessed using the SDO API.
FireStorm/SDO can be used as part of a standalone application running in J2SE or as part of an enterprise application running in J2EE.
FireStorm/SDO provides a Data Access Service for reading data from relational databases and populating a Data Graph consisting of Data Objects and a Change Summary. This Data Graph can then be modified offline from the database and then sent back to the Data Access Service, which contains the functionality to apply the changes to the relational database.
The benefits of FireStorm/SDO Runtime:
- Support for all popular databases, including Oracle, SQL Server, Sybase, DB2, MySQL, and many more.
- Support for tables, views, custom sql statements, and stored procedures (depending on database)
- Supports connected and disconnected modes. Full disconnected model where DataGraph can be modified and then sent back to the Data Access Service at a later time without blocking the database
- Ability to dynamically reverse-engineer meta-data from the database or use a predefined SDO deployment descriptor
- Provides an instant dynamic Java SDO API onto any database
- Allows data to be located using XPath expressions
- Decouples development of client and server applications; no need to redeploy server components when schema changes
FireStorm/SDO Code Generation Tool
FireStorm/SDO can import existing database schemas (from a SQL script or from a live JDBC connection) and can then generate a static Java API for accessing the database. The generated code extends the dynamic SDO API giving the developer the choice of using static or dynamic DataObjects as defined by the SDO API specification.
The technical benefits of using the SDO code generator:
- Design new databases or reverse-engineer existing databases from a SQL script or a live database connection (JDBC)
- Generate an SDO deployment descriptor containing database meta-data required by the runtime Data Access Service
- Generate a static Java SDO API for a particular database
- Generated interfaces do not depend on the SDO API therefore client applications to do need knowledge of SDO API to compile
- Greater type-safety and compile-time error checking
- Does not require any changes to database stored procedures, views, or tables
Try the SDO API by Downloading FireStorm/SDO
CodeFutures has jointly developed FireStorm/SDO as part of an alliance with Rogue Wave Software.
You can download the product, branded as HydraSDO for Databases, from the Rogue Wave Download Center.

