On Tue, 2002-06-18 at 12:28, Xuefer wrote:
> SET?
> i know how to use SET
> but... attribute of products is value
> such as Size Weight Color and so on
> the problem is, different CATE of products have different bunch of attribute

  Heh. Sorry - should have read more carefully.  

> 
> >On Tue, 2002-06-18 at 00:53, Xuefer wrote:
> >> (mailbox full? repost)
> >> 
> >> I have many product CATE (category) 
> >> and every CATE of products have different attribute 
> >> 
> >> how can I orgnize table struct ? 
> >> 
> >> each CATE a table with many cols for attribute? 
> >> [cateid attr1 attr2 ... ] 
> >> 
> >> or get attribute in one table and each row one attribute 
> >> [produceID attributeID attributeValue ] 
> >> 
> >> or any other ways?

  Option one is good if you have a small number of attributes
  that are not likely to change. A major drawback is that you
  will need to alter the table to add/delete additional properties.

  Option two is more flexible, and will be more efficient for
  large numbers of dissimilar attributes. This approach is
  also better when you need to add/delete attribute types.

  If you have *very* dissimilar attributes and sets of attributes 
  for each item then you might want to store the data in a serialized
  form in a blob field.

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Zak Greant <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Advocate
/_/  /_/\_, /___/\___\_\___/   Calgary, Canada
       <___/   www.mysql.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to