Table Design

  • There is a table called DesignLogo and it has the clolumns -

    DesignLogo

    DesignNumber (PK)

    LogoName

    LogoPrice

    LogoCost

    SalesRep (FK)

    There is another table called SalesRepTable

    SalesRepTable

    SalesRepNumber(PK)

    Now the developer wants to change the relationship so that a design number can be used for multiple Sales reps. So I suggested breaking up the DesignLogo table and creating two new tables - DesignNumber and DeisgnToSales. So the total tables will be like -

    DesignNumnber

    Designnumber(PK)

    SalesRepTable

    SalesRepNumber(PK)

    Logo

    LogoName(PK)

    LogoPrice

    LogoCost

    DesignNumber (FK)

    DesignToSales

    SalesRepNumber (PK)

    DesignNumber(PK)

    Now we can create a relationship with sales rep to a design number and then to a Logo from a design number. Does that seem correct? I am a newbie in database design.

    Thank you in advance.

  • Seems kind of odd having a table with just an ID column in it, but it looks correct in this case.

    That looks like the right design for what you've described.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I would just remove SalesRep from the DesignLogo table and create an intersection table (I like to call them glue tables) with DesignNumber and SalesRepNumber, unless you have more information that ties to a design than the number.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply