Table Design help...

Ariez

Centurion
Joined
Feb 28, 2003
Table Design help ... Please....

StyleNum
Color
Size

these 3 fields are a combined primary key.
The combinaison of the 3 form a SKU number which uniquely identifies a product unit.

Now heres the trick.
Some attributes need to be defined at color level (like price) or at style level like puchase orders or at size level like inventory and sales.

I'm lost..
does anyone have any info on this kind of design?
 
Last edited:

Hamburger1984

Centurion
Joined
Jun 12, 2003
Location
Hamburg,Germany
...and if it doesn't work with this type of key why don't you just insert an extra unique key for internal use only - your customer/user doesn't have to see it and you wouldn't have these problems....
 

Ariez

Centurion
Joined
Feb 28, 2003
I'm thinking of this type of logic (see the diag)

The inventoryOnHand bothers me because its linear.
I used to offer fixed sizing so I had colSize1, colSize2 etc...exposing size inventory.
Whats more efficient, having 20 fixed colSize and probably use only 7 or 8 of them? Having the number of records droping cosiderably.
or a linear type like in my table InventoryOnHand?

I would like to see more example of how color and sizing attributes are handled in other systems...
If anyone could put me in the direction, i would really appreciate...
 

Attachments

  • diag.jpg
    190.7 KB · Views: 18
Last edited:
Top Bottom