Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2003
    Posts
    33

    Unanswered: Automatic method of determining multiple primary keys?

    I have a database in XML format , with 100+ tables, that I want to import into SQL server but the problem is that I don't have any of the original primary key information. I know that some of the tables had multiple primary keys.

    Is there a method or a tool that is capable of determining the primary keys for me??

    I don't want to have to figure it out by hand, especially if I have more of these databases in the future.

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by mozkill
    I have a database in XML format
    no such thing.

    Quote Originally Posted by mozkill
    I know that some of the tables had multiple primary keys.
    not possible

    Quote Originally Posted by mozkill
    Is there a method or a tool that is capable of determining the primary keys for me??
    a certain site impaired person on this board has a "natural key finder" script. if you ask him nice, he might let have it.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by Thrasymachus
    a certain site impaired person on this board has a "natural key finder" script. if you ask him nice, he might let have it.
    Does he really? That's jolly clever.

    OP - Multiple Primary Keys - do you mean a PK plus multiple alternate keys or composite primary keys? As Sean says - not possible for multiple promary keys. In the words of James Earl Jones:
    Quote Originally Posted by James Earl Jones
    There can be only one
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by pootle flump
    Does he really? That's jolly clever.
    yup. the blind dude had some dbforums folks try it out one day. that was a couple of jobs and a few computers ago, so I am afraid I no longer have it, but I am sure he does.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Sep 2005
    Posts
    161
    Quote Originally Posted by mozkill
    I know that some of the tables had multiple primary keys.
    Is this where you say, "April Fools"?

Posting Permissions

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