Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Posts
    1

    Unanswered: Database design/layout question - please help!

    I'm working on creating a searchable database for about 4000 heirloom family photos and documents, using Access 2002.

    I'm currently useing two "main" tables, the first to include:
    photo ID#
    link to image
    Month
    Year
    City
    State

    The Second table will be used for "subect info" and contains the following fields:

    subject id#
    Last Name
    First Name
    Birthplace
    Date of birth
    Etc, etc.

    My question is what will the format and the relationships look like by adding the third table that will tie the first two together?

    Thanks!!

  2. #2
    Join Date
    Dec 2001
    Posts
    79
    First, it's a bad idea to use the octathorpe "#" in your field names. This is an Access reserved character and it can cause oddball errors later on.

    Second, your third table can simply be a cross-reference table of photo to subject. You just need three fields, maybe 4:

    tblSubjectPhoto

    SubjectPhotoID (primary key autonumber)
    SubjectID (foreign key)
    PhotoID (foreign key)
    Description (text, description of subject in photo)

    That's it.

    Then you will have a one-to-many relationship between tblSubject and tblSubjectPhoto, and a one-to-many relationship between tblPhoto and tblSubjectPhoto.

    Hope this helps,
    Peter De Baets
    Peter's Software - Microsoft Access Tools for Developers
    http://www.peterssoftware.com

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    talking of field names, you may also save yourself some [bracketing] problems later on by not using spaces: LinkToImage is just as easy to read.

    izy

Posting Permissions

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