Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2013
    Posts
    2

    save all relationships in one table?

    Hi,

    I have recently seen a weird DB design. Someone put all relationships in one table:

    table1_name,table1_id,table2_name,table2_id

    instead of adding FKs for 1:1 and 1:m and seperate tables for m:n

    It first seemed really strange, but I cannot find a good reason why it should be considered "wrong". I am sure there has to be a problem with that since I could not find any other examples or discussions about a design like that. Please tell me why it is a bad idea to do it like that.

    best regards, Chris

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    This sounds suspiciously like case study C from a chapter that I recently re-wrote for Dr. M's theory class. Go back to the outline from the front of the chapter and pick out the rules that this violates... There are three of them that everyone should get and there's at least one more for extra credit.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Sep 2013
    Posts
    2
    Quote Originally Posted by Pat Phelan View Post
    This sounds suspiciously like case study C from a chapter that I recently re-wrote for Dr. M's theory class. Go back to the outline from the front of the chapter and pick out the rules that this violates... There are three of them that everyone should get and there's at least one more for extra credit.

    -PatP
    Who is Dr. M and what chapter / book do you refer to? Do you have any online sources where I can find information?

    best regards, Chris

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    I re-wrote three sections of a database theory whitepaper that is being used to teach a class. That class is being offered this term, and I don't have any way to confirm whether or not you are taking that class.

    It is unethical for me to participate in this discussion unless the whole class participates. Even if you aren't taking the class (and from your IP address I doubt that you are), it wouldn't be fair for me to comment further unless the people teaching the class make the discussion available to everyone taking that class.

    For the time being, I'm going to step back from this discussion. I would encourage anyone that wants to discuss this to participate, but I can't until I hear from the people presenting the class.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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