April 16, 2009 at 7:19 am
Hello,
Im designing a mapping between Supplier and Brand table.(Many to Many relationship). So in break down process I created a SupplierBrandmapping Table. Table strctures are listed below
Supplier Table
Supplier ID
Name,
Address
Brand Table
BrandId,
Name
SupplierBrandMappingTable
BrandId,
SupplierId
Now my question is whether I should include SupplierId column as foreign key in Brand Table?
April 16, 2009 at 8:17 am
I don't think so if you really have a many to many relationship. Adding supplier id to brand table would make a 1 to many relationship or cause duplication of brands in the brand table.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
April 16, 2009 at 8:31 am
I agree with the previous post. You need to ask a couple of basic questions.
Does a brand have multiple suppliers?
Does a supplier have multiple brands?
If the answer is yes to both then you have a many to many.
BJ Cummings
April 16, 2009 at 11:07 am
hello,
I agree that we dont need supplier id in Brand Table. Thanks for your time
April 16, 2009 at 12:50 pm
Hi
I would say it depends...
Especially huge brands usually have different suppliers to stay independent and one supplier usually also has different customers (the brands). We have both combination in different of your systems.
Anyway, if you currently do not need the n:m link between the tables you shouldn't implement it. If can be added at a later time and filled with existing information.
Greets
Flo
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply