Subject | Re: [firebird-support] Re: MySQL Enum type? |
---|---|
Author | Martijn Tonies |
Post date | 2007-06-05T09:57:43Z |
> > I'll ask again: what are you trying to accomplish?Right, let me try to see if I get this straight:
>
> I have a one-to-one relationship. In the "mastertable" I want to store
> a type about which other table to look up the additional fields. I
> want to store this type as one of the values from a text set.
> Hope you understand what I mean, but I think the workaround was
> already posted.
MASTER
----
MasterID
<other stuff>
Type (Enum ( type1, type2, type3 ) )
TYPE1
----
MasterID
AdditionalValue1
AdditionalValue2
TYPE2
----
MasterID
AdditionalValue1
AdditionalValue2
TYPE3
----
MasterID
AdditionalValue1
AdditionalValue2
Correct?
Would this be some kind of class hierarchy, btw?
Either way, what point is using ENUM here? Why not make a Types table and
do a FK to that? Or indeed, use the DOMAIN instead?
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com