Results 1 to 6 of 6
  1. #1
    snoop832 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    4

    Tables and Primary Key autonumber

    Hello,


    I have a huge data base that I will be splitting up into many tables. My question is when creating additional tables is it necessary to add a (auto-number reference) to each table I make? The tables will be joined by relationships and having 1 Primary table with auto-number in it.

    If I have to why is it important?

    Thanks Andy

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You only need it to make unique items.
    states don't need it, they have the state id: NY, CA,etc.
    People need it because there is nothing to make a person unique. Not name ,not phone.

    if you sell items, like amazon shopping cart, it needs an ID. The OrderID can be autoNum, then the sub table tOrderItems have the OrderID as Long integer to match its parent.
    So it's good for a parent/child data structure.

  3. #3
    snoop832 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    4
    Ranman,

    Thank you very much.... Very good detail. I really appreciate it!
    Andy

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  5. #5
    snoop832 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    4
    Thanks orange,

    I'll look at later tonight. I really appreciate that too!
    Andy

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Good luck.

    A Primary key does not have to be an autonumber. However, some people use this a "their rule".

    The purpose of a primary key is to ensure that each record in a table is unique.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Primary Key Autonumber
    By data808 in forum Access
    Replies: 19
    Last Post: 07-15-2014, 06:51 AM
  2. AutoNumber Primary Key until manually entered
    By anonymust in forum Database Design
    Replies: 3
    Last Post: 05-11-2014, 08:34 AM
  3. Using AutoNumber primary key on sorted column
    By grkatz823 in forum Access
    Replies: 7
    Last Post: 03-04-2013, 03:47 PM
  4. Sequential autonumber primary key
    By JackCampion in forum Access
    Replies: 0
    Last Post: 09-17-2012, 05:07 PM
  5. Replies: 2
    Last Post: 04-30-2010, 09:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums