SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2009
    Location
    Ontario, Canada
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about many to many relationships and database design

    I haven't really studied database design past the basics, but I'm currently designing an application that what looks like I'll need a lookup table between two tables, one being a regular table and one already being a lookup table. I'm wondering, is this alright or is something wrong with my design if I suddenly need to do a many to many relationship with a lookup table?

    Here is an illustration if the above paragraph is confusing:

    Code:
    Table1 -----< Lookup Table1 (Table1 + Table2) >----- Table2
                                  V
                                  |
                                  |
                                  |
                                  |
                                  ^
    Table3 -----< Lookup Table2 (Table3 + Lookup Table1)
    Is this a normal thing or is there a flaw in my design if this is occurring?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,248
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    pretty hard to diagnose logical issues in a design littered with secret tables called "table this" and "table that"

    with no regard to what they might contain, then yes, your design is perfectly fine
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2009
    Location
    Ontario, Canada
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    with no regard to what they might contain, then yes, your design is perfectly fine
    Thanks, I was just wondering if that type of relationship can exist. I don't believe my design is flawed which is why it went this way and no other way. I thought I would save you guys from posting the design of the actual database because I would have to post like 10 different tables for it to make sense.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •