File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes database integrity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "database integrity" Watch "database integrity" New topic

database integrity

omar bili
Ranch Hand

Joined: Aug 13, 2004
Posts: 177
Hi, i was only wondering about the database integrity
while using "JDO" who is doing that is it the database it self
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Can you elaborate on your question. Not sure what you are asking.

JDO injects SQL into your Java classes. I don't think there are any changes to the database itself. If you are asking about data being stored. Transactions are handled by JDO, and all the CRUD and database constraints are followed.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Erik Bengtson
Ranch Hand

Joined: Dec 06, 2003
Posts: 90

The database takes care of data integrity when using relational jdo implementations. Some implementations will create the tables and contraints for you if you wish. To enrich the data integrity you create additional constraints using DDL scripts or define new ones in the jdo metadata definition.
Erik Bengtson
Ranch Hand

Joined: Dec 06, 2003
Posts: 90
JDO injects SQL into your Java classes.

JDO does not inject SQL into java classes. Your java classes are datastore agnostic and can be simultaneously used for xml store, relational store, file stores and others.

On the other hand, EJB CMP injects SQL code into classes at deployment time.
I agree. Here's the link:
subject: database integrity
It's not a secret anymore!