Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is JDO for RDBMS only or does it work with other types of datastorage, too?

 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've found that in howdy/welcome thread and posted it here to make lurking easier.
Originally posted by David Jordan:
A JDO relational implementation will convert these queries to the datastore-specific query syntax, be it SQL or some other query language. So the queries are vendor-neutral,
which is not the case with JDBC where you have to deal with differences among the databases.

David,
I want to know something about scope of JDO.
Will there be JDO implementations for "document oriented databases" like Lotus Domino or XML databases like Tamino, too?
Or is it targeted straights towards relational databases?
thanks Axel
 
David Jordan
Author
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDO is not specific to relational databases are any other form of datastore. There are object databases supported by JDO.
Again, the fundamental concept of JDO is that your Java classes represent the data model you have for storing data in the datastore. An implementation can be developed for virtually any type of datastore for which a mapping can be defined between your Java classes and that underlying datastore. It was designed to completely datastore independent, so it can work with a variety of database architectures.
Contrast this with using JDBC, which not only is specific to SQL-based datastores, but also locks you into a specific SQL implementation, since you must provide the right SQL dialect/syntax for the underlying database.
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,
Does this mean that the JDO objects could be sourced from xml like ADO.NET?
 
David Jordan
Author
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know ADO.NET and I don't know what you mean by sourced from XML.
With most JDO implementations, you can simply start from your Java classes as the basis of your model. The JDO metadata is used to indicate which Java classes are persistent, provide the element types of collections, and in the case of using it with a relational database, you can define the mapping to the tables. Implementations also let you have their implementation generate a relational schema for you, where they generate all the table and column names. This is fine for prototyping, minimizing the work you need to do in the metadata, but in the long run you will probably want to define the table/column names. Or you can use JDO with an existing relational schema, in which case the Java classes can either be generated and written by hand.
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,
The cornerstone of ADO.NET is the DataSet Object. It's like a disconnected record set that can be strongly or loosely typed. Microsoft provides a SqlAdapter class that defines the CRUD. All you do is manipulate the data in the result set and tell it to update itself, behind the scenes using meta data/internals in the Resultset and the SqlAdapter class, it figures out all the db calls (i.e. insert, updates, deletes) it needs to make to get the database up to date with the changes made in the result set. Now, the interesting thing is that this same structure which is a non-visual, disconected value object which can be snapped into a number of GUI objects/views can also be loaded (sourced) from an XML document. That is, rather than doing a select to retrieve data, it can read it's data from an XML document. As a result it is acts as a generic interface to tabular data in general, not just specific to data persisted in a database.
Regards,
Byron
 
David Jordan
Author
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ADO.NET is then nothing like JDO.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic