-->
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.  [ 2 posts ] 
Author Message
 Post subject: Is Hibernate meant for name/value pair structured databases?
PostPosted: Thu Dec 01, 2005 7:12 pm 
Newbie

Joined: Thu Dec 01, 2005 6:59 pm
Posts: 1
I have a DB that has a ton of different values mostly stored in one table several tables, all with a structure like:

encounterID | code | Value
1 | 1 | blue
1 | 2 | blonde
1 | 3 | six feet

1 | 99 | red
1 | 100 | 4-door

that might come from a DriverEncounter, which has a DriverEncounter.Person and DriverEncounter.Car.

Is hibernate meant to be used when dealing with dbs of this type? I am totally new to hibernate and have read the tutorials. However, I haven't seen any examples using this type of db. I know it can be used in this case, as I know of people using hibernate that have this type of structure. However, is this considered a good use / best practice of the circumstances in which hibernate is very helpful?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 11:00 am 
Senior
Senior

Joined: Wed Jun 15, 2005 4:17 am
Posts: 156
from my experience (N)Hibernate is best used with a normalized relational database. Beware that not all legacy databases are normalized or even relational! These databases are the most difficult to map.
Regarding to your sample I would try to map it in an object hierarchy, using the code as a discriminator value as it looks like each row has a different meaning based on the value of that code.

cheers,
Radu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.