Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Posts
    28

    Unanswered: Finding keys for tables

    Hi,

    I have a set of tables that don't have any primary or foreign keys but they are related to each other through some fields. Instead the relationship between them is managed through the code. Is there a way I can find out what field in which table references what field in another table?

    Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes
    examine the tables
    examine the code
    examine any queries, look for where tableA.acolumn = tableb.anothercolumn

    having done that grasp the original developer warmly by the throat and suggest that they learn about relationships and relational table design before doing anything else in Access
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jan 2006
    Posts
    28
    Thanks but I don't have access to the code. I only have the tables and I want a quick way to find the keys. I highly prefer not go through every single one to find the relationship.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so look at the indexes, assuming the person who wrote the original system they should have indexed to key columns.

    failing that what mechanism do you think there may be to magically find what the application uses to link data.
    if there are no realtionships established then the database engine knows nothing about realtionships

    all you can do is plough through each and every table and column looking to find columns with similar names and values.

    you could of course always go back to the original 'designer' and requestr they provide the information
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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