954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Two products with different brand

I have two product brand. For example:-

Product A - Nestle Brand (Table A)
Product B - Cadbury Brand (Table B)

I have an order table with the attributes:

-id
-orderNo
-foreign key reference to table A
-foreign key reference to table B
-quantity
-createdDate

The data base on the attribute above:

1,1001,1,null,20,20/12/2011
1,1001,null,1,20,20/12/2011

Does my design make sence?

Thank You.

solomon_13000
Junior Poster in Training
88 posts since Jul 2009
Reputation Points: 24
Solved Threads: 0
 

What is the reason for having two product tables ?

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

@OP: No, your design doesn't make any sense at all.
pritaeas has a valid point, but there is also the issue of having the same info on 2 different fields which will make your life difficult in the following steps.

Although you didn't explain what this is about, I can't help but notice what will you do if you find yourself with 5 brands or 50 brands.
In my book there is only 1 product table and when dealing with a product (brand or whatever) you go to that table. If additional info is required, you can create tables with specific functions (MSDS, packaging data, UPCs, photos, kitting/manufacturing info, etc) around that product master (or item master).

adam_k
Practically a Posting Shark
804 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149
 
What is the reason for having two product tables ?

The reason is because two product tables have a different structure of information.

solomon_13000
Junior Poster in Training
88 posts since Jul 2009
Reputation Points: 24
Solved Threads: 0
 

I attach herewith a spreadsheet with the sample tables.

Attachments shoppingcart.xlsx (9.35KB)
solomon_13000
Junior Poster in Training
88 posts since Jul 2009
Reputation Points: 24
Solved Threads: 0
 

I solved the problem. You may review this attachment.

Attachments shoppingcart.xlsx (10.89KB)
solomon_13000
Junior Poster in Training
88 posts since Jul 2009
Reputation Points: 24
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: