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!!!
|