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.  [ 1 post ] 
Author Message
 Post subject: Mapping tables by columns
PostPosted: Thu Feb 05, 2009 7:07 am 
Beginner
Beginner

Joined: Wed Jan 16, 2008 4:00 am
Posts: 41
Hello everybody!

I know the following scenario sounds kind of weird - but believe me, the db design was not my idea. But lets start at the beginning:

First we had two tables. One table defines some attributes: lets say:

A_ID, NAME
1, City
2, Supplier

Now we want to define a kind of "ValueRange" that contains values that are valid for one attribute.
like:

V_ID, NAME, A_ID
1, Vienna, 1
2, Graz, 1
3, Samsung, 2
4, Sony, 2

Everything was fine, but now something like valuegroups are introduced. They can be added to several attributes. the new provided db design looks like that:

A_ID, NAME, V_GROUP_ID
1, City, GR_1
2, Supplier, GR_2
3, BirthPlace, GR_1

and we have:

V_ID, NAME, V_GROUP_ID
1, Vienna, GR_1
2, Graz, GR_1
3, Samsung, GR_2
4, Sony, GR_2


And it's my task to map this design with NHibernate now.

Do you have any ideas how to achieve that?
I'm really stuck!

Any help is appreciated,
thx in advance!!!


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

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.