-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate as an ORM-based object database?
PostPosted: Mon Nov 23, 2015 5:52 am 
Newbie

Joined: Mon Nov 23, 2015 5:47 am
Posts: 2
Hi,

I'm completely new to Hibernate and I'm not quite sure if it can be used for my problem.

I need to build a server-side object persistence layer. More or less it shall behave like an object database but based on an SQL back end (for all those nice SQL tools). That is, I want to build a service of some kind that uses an SQL database as a back end to store object data in a (runtime) configurable schema (i.e., classes with attributes and associations) and that provides a generic interface to this object data and schema to clients.

The standard way of using Hibernate seems to be to create concrete Java classes for a concrete relational schema (or vice versa). However, I do not want to rebuild the intended service for each database schema. Instead, it shall provide a more generic, introspection/reflection like interface to access/query/define the class schema and the corresponding object data. Something like "list all classes in the database", "create new class called "X" derived from "Y"", "list all objects of "Y"", "create new object of X" etc.

Is something like this possible using Hibernate?

Regards
The Sleepy Object


Top
 Profile  
 
 Post subject: Re: Hibernate as an ORM-based object database?
PostPosted: Mon Nov 23, 2015 9:45 am 
Regular
Regular

Joined: Mon Oct 19, 2015 7:49 am
Posts: 61
Location: ChengDu China
Hi sleepobject.

1, You said you want an OOP database.
Hibernate is an Object Relation Mapping framework, The API for developers is OOP style but the database is still RDBMS,
If this is your core requirement, please try some databases such as Neo4J.

2, You said you want to implement some OOP inheritence such as class Y extends X, and the objects of both X and Y can be quried, OK.
Yes, Hibernate can do it very well. If this is your core requirement, please choose Hibernate.

3. You said you don't want to create static db schema.
If this is your core requirement, please try some weak type database such as MongoDB.


Top
 Profile  
 
 Post subject: Re: Hibernate as an ORM-based object database?
PostPosted: Mon Nov 23, 2015 10:46 am 
Newbie

Joined: Mon Nov 23, 2015 5:47 am
Posts: 2
Hi babyfish,

1. I want to build something that behaves like a OODB based on an SQL database. AFAIK an O/R Mapper does exactly this.
2. ok
3. Yes and no. I want a more or less static schema in each database. However, I want to build a generic ORM layer that dynamically adapts to the respective database. That is, if I use it on a database with Apples and Worms, it shall provide access to such classes and if I use the same ORM layer with a database of Bills and Receipts, it shall provide access to those. All without the need to recompile the ORM layer software.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.