|
Posted by Dave on 07/24/07 07:51
On 24 Jul, 08:42, Hendri Kurniawan <ask...@email.com> wrote:
> Dave wrote:
> > I am in the process of testing a database design, which i believe I
> > have hit a stumpbling block and cannot think of a way around it.
>
> ----- SNIP ---
> > I would be grateful if someone could point me in the right direction
> > to overcome this issue.
>
> > thanks in advance
>
> > Dave
>
> Creating new tables for each company will just create more headache for you.
> Why you ask: The number of tables will increase to follow the number of
> company.
>
> Solution... Just add another column on the product table (I don't know
> which one it is)
> to associate it with the company....
>
> ie.
> product_table(
> product_id,
> product_name,
> company_id
> )
>
> or if you want to associate a product with one or more company
>
> product_table (
> product_id, .... etc etc
> )
>
> product_company_table(
> product_id,
> company_id
> )
>
> Hope this helps
>
> Hendri Kurniawan
Hi Hendri,
Thanks for the quick response.
What you suggest is a good idea, but I am lost with how this would
work when say over 1000 customers would buy multiple products. The
product_company_table would need to have duplicate _id's. Although I
know this is allowed, I am unsure how this would react when queried.
Dave.
Navigation:
[Reply to this message]
|