Mapping Table Design

  • 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?

  • 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.

  • 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

  • hello,

    I agree that we dont need supplier id in Brand Table. Thanks for your time

  • 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