File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes Database Abstraction Layer : any implementation ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Database Abstraction Layer : any implementation ?" Watch "Database Abstraction Layer : any implementation ?" New topic
Author

Database Abstraction Layer : any implementation ?

Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 496
    
    1

Hi there,

I'm wondering if exists any working implementation of a Database Abstraction layer concepts. With Database abstraction layer, I mean
a software which acts as a mediator between your programs and actual DBMS, hiding specific DBMS SQL dialects with one dialect of its own,
and letting you to write stored procs which may transparently access data to different DBMS.



Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Java Persistence API (JPA): http://docs.oracle.com/javaee/6/tutorial/doc/bnbpz.html

Hibernate: http://www.hibernate.org/

There are others. But none handle stored procedures in a generic fashion - those are always database specific (as far as I know)


JBoss In Action
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 496
    
    1

Thank you for your answer, Peter... JPA is a good choice but I had in mind something more similar to a middleware product which would act as a proxy for your queries and stored procedure.

For example, I can run SQL PreparedStatements against that middleware and it in turn will translate on the fly my queries into SQL Server, Db2 or other vendors' SQL specific dialect..

Of course, I have no idea if such software exists...
rohit chavan
Ranch Hand

Joined: Oct 08, 2010
Posts: 132

As mentioned by Peter,
Hibernate already does that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Database Abstraction Layer : any implementation ?