Re: Structure Question...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You have to create a table:
CREATE TABLE product_categ (
FK_productID <definition>,
FK_categID <definition>
)
and list all relationships "productID belongs to categID"

Ignatius
____________________________________________
----- Original Message -----
From: "Doug Coning" <lists@coning.com>
To: <php-db@lists.php.net>
Sent: Thursday, November 07, 2002 7:51 PM
Subject:  Structure Question...


> Hi everyone,
>
> I'd like to know how you would set up the following:
>
> I've set up a MySQL database with 600 products.  I set it up where each
> product belongs to a category.  However, now we want to take it further
> where different products can now belong to more than 1 category.
>
> How would you create this?
>
> 1. Would you duplicate the records for items that belong to more than 1
> category and change the categories in those duplicated records?
>
> 2. Would you enter multiple categories into 1 column?
>
> 3. Would you create a different database that tracks categories and creat
a
> many to many relationship?
>
> Thanks,
>
> Doug Coning
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux