Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    76

    Unanswered: showing realtionship in database table diagram

    Hi

    i have a table inwhich there are three columns heading1, heading2, heading3...now this table is linked to a tree table which has columns headingid, headingname, and parentid

    The link between the table1 and table 2 be
    heading1 = headingid OR
    heading2= headingid OR
    heading3= headingid

    is there a way I can show this on my database diagram??? (I know this is against normalisation, but the database was written by someone else...)

  2. #2
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    Quote Originally Posted by STUCK1234
    is there a way I can show this on my database diagram???
    Enterprise Manager->Databases->Database->Diagrams->Right Click - New Database Diagram.

    Follow the wizard instruction....
    Rajesh Patel

    Everybody says - mistake is the first step of success, but it's not true. The correction of the mistake is the first step of success.

  3. #3
    Join Date
    Feb 2005
    Posts
    76
    yeah i know how to create a new table... I just dont know if you can show the below relastionship:

    headingname = heading1 or headingname = heading2 or headingname = heading3

    ????


    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    yeah i know how to create a new table...
    What exactly you want to do..? Create a table or diagram..?

    Quote Originally Posted by STUCK1234
    I just dont know if you can show the below relastionship:

    headingname = heading1 or headingname = heading2 or headingname = heading3
    Create database diagram then right click without selecting anything -> select option "Show Relationship Labels".

    EDIT: You need to (carefully) see the link between tables as well as symbols at the both end of the link.
    Last edited by rajeshpatel; 11-24-06 at 05:50.
    Rajesh Patel

    Everybody says - mistake is the first step of success, but it's not true. The correction of the mistake is the first step of success.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by STUCK1234
    yeah i know how to create a new table... I just dont know if you can show the below relastionship:

    headingname = heading1 or headingname = heading2 or headingname = heading3

    ????


    Thanks
    No. You can't define such a relationship physically using DDL. You would have to enforce this with a trigger or insert/update procedures. Better yet, normalize your data to split headers into a separate table and then you can use standard foreign key relationships.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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