Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    May 2005
    Location
    Wilcox, Saskatchewan
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts

    primary key on every table? (acess)

    I was wondering if I am going to have a multiple number of tables for my database if I would add a column with the primary key to each table.

    ex. Service Order Number is the primary key. So I add it to Date table, Uwi table, depth table and so on.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: primary key on every table? (acess)

    Hi seaner

    That is quite a broad question. Can you explain your table structure a bit more, what relationships you need between them, if you are using look up tables etc.
    Jerry

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: primary key on every table? (acess)

    There is not a single rule for all tables, it depends on their role within the database and on the relationships between the tables.
    For a short introduction, see Understanding Relational Database Design from Microsoft.
    For a more thorough look, see for example Access Database Design & Programming by Steven Roman.

  4. #4
    2 Star Lounger
    Join Date
    May 2005
    Location
    Wilcox, Saskatchewan
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: primary key on every table? (acess)

    thank you,

    I ll have a read, and see if I can come up with a more better detailed question

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: primary key on every table? (acess)

    An Access database doesn't have a primary key. Each *table* in the database may have a primary key, and usually does. The keys are used to created relationships between tables but any given primary key would only be used to create relationships between tables that have a logical data relation, such as an PhoneNumber table might have a CustomerID key in it relating it to a Customer table. You wouldn't put the CustomerID in a lookup table of product types. Hans's recommendation on books are the same ones I would make, and I encourage you to get a basic understanding of the principles they contain because it will make working with Access or any other database product much easier.
    Charlotte

Posting Permissions

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