On Tue, 2006-08-01 at 16:23 -0700, Robert DiFalco wrote:
> I have a table that contains properties that can be associated with any
> table whose primary key is a LONG. Lets say that there is just one kind
> of property. The table looks something like this:
> 
>     TABLE StringVal
>       REF_ID  BIGINT    // row to associate property with
>       TYPE_ID BIGINT    // type of string property
>       VAL             VARCHAR   // property value
> 
>       P_KEY( REF_ID, TYPE_ID )
> 
> There is another table to represent a specific StringVal type along with
> its default value:
> 
>    TABLE StringType
>       ID              BIGINT   // The TYPE ID
>       NAME            VARCHAR  // The unique name of this property
>       DEF_VAL VARCHAR  // The default value of this property

Actually, the rub is that you are not using specific columns for
specific entity attributes, and are pretty much storing everything in
one gigantic table.  Any particular reason for this?  For instance, why
not have a column called "color", instead of overcomplicating things?

-jay


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to