Results 1 to 5 of 5
  1. #1
    Liam87 is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2012
    Posts
    10

    Composite key or autonumber PK

    I have a monitoring database, the site_ID, Date and survey_type are indexed as this uniquely identifies each survey. I am not sure if how I really link the Site table to the other three, or if it would be better if I had a Survey_ID field that acted as the link. This then gives me a few problems in how to enter the data.(Note. I havent included PK's for the conditions, frog and bird survey as yet as I am not sure which is the best way to go at this point).
    Site
    Site_ID
    Date_SurvSurvey_Type(i.e. frog, bird)
    Conditions
    Temp
    Cloud_Cov
    Habitat_Desc
    Frog_Surv
    Species
    quantity


    Bird_Surv
    Species
    Qty

    Thanks if anyone can shed some light.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If the fields in the species survey tables are all the same then use one table. Each site will have only one survey? Consider:

    Species
    SpeciesID
    CommonName
    Species
    Genus
    Family
    Order
    Class
    Phylum
    Kingdom

    Site
    SiteID
    DateSurvey
    Temp
    CloudCov
    Habitat

    SiteSpeciesData
    SiteID
    SpeciesID
    Quantity
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Liam87 is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2012
    Posts
    10
    Each site will be surveyed every one-three years and it is possible that one site may be surveyed on the same day as another surveyed(surveys outsourced to contractors) that is why I had the Survey_Type field, because it will not only tell you that it is a frog survey, but also differentiate between frog-point survery and frog-transect survey. So i still need that in.

    Is there a way in which you can search the species if I used that format in a data entry form?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Okay, consider:

    Species
    SpeciesID (PK)
    CommonName
    Species
    Genus
    Family
    Order
    Class
    Phylum
    Kingdom

    Site
    SiteID (PK)
    SiteName
    Lat
    Long

    Survey
    SurveyID (PK)
    SiteID (FK)
    DateSurvey
    Temp
    CloudCov
    Habitat

    SurveySpeciesData
    SurveyID (FK)
    SpeciesID (FK)
    Quantity

    This assumes each survey event will encompass multiple species. Will the Type apply to all species in that survey event? If so put Type in the Survey table, else in SurveySpeciesData.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Liam87 is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2012
    Posts
    10
    Thanks June7 for your help, appreciate it.

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

Similar Threads

  1. Outer Join Composite Key
    By Lady_Jane in forum Queries
    Replies: 6
    Last Post: 08-26-2011, 09:44 AM
  2. How To Avoid Using Three Field Composite Key
    By Lady_Jane in forum Database Design
    Replies: 14
    Last Post: 08-17-2011, 03:40 PM
  3. Composite key references same table
    By Bangsadrengur in forum Reports
    Replies: 0
    Last Post: 08-04-2011, 05:46 AM
  4. composite key question
    By revnice in forum Access
    Replies: 2
    Last Post: 08-08-2010, 12:27 PM
  5. composite unique key
    By shital in forum Access
    Replies: 1
    Last Post: 07-09-2010, 08:07 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