View Single Post
  #6  
Old November 30th, 2009, 03:32 AM posted to microsoft.public.access.tablesdbdesign
dsmith via AccessMonster.com
external usenet poster
 
Posts: 11
Default Setting up Observation Database

Thanks Steve and Gina
my table structure is below:
There are 20 questions that each observer must review each time they do a
field observation. They must indicate the location of the observation and the
results of the review, i.e. safe, at risk, or na. What should my
relationships be? I'm having problems getting the tables to relate to each
other on my form. Should I have an ObserverID fk in tblQuestion since each
observer must address all 20 questions with each observation?

TblQuestion
QstnID
QstnText
QstnType

TblObserver
ObserverID
FirstName
LastName
ObserverDept

TblLocation
LocationID
Location

TblObservation
ObservationID
ObservationDate
ObserverID

TblLocationObservation
LocationObservationID
ObservationID
LocationID
QstnID
LocationObservation

Steve wrote:
I follow a standard when setting up tables. All tables begin with "Tbl" and
the first field in the table has the name of the table followed by "ID". The
data type is autonumber. This is the primary key of each record and
identifies the table where the record is stored any time you see the field
name in the database. In subsequent fields, I use the name of the first
field in a table when referring to a record in another table. This (these)
is (are) foreign keys. For example, In TblObservation, ObserverID is a
foreign key and refers to a specific observer in TblObserver. In
TblLocationObservation, ObservationID is a foreign key that relates a record
to a specific observation in TblObservation. Thus you can have a list of
safety observations by a specific observer on a specific date. LocationID In
TblLocationObservation is a foreign key and refers to a specific location
(maybe Dept X) in Tbllocation. ProcedureID In TblLocationObservation is a
foreign key and refers to a specific Procedure (maybe Stair/Ladder Use) in
TblProcedure.

Steve


Thanks Steve,
I made some progress but I think I've managed to totally confuse myself

[quoted text clipped - 38 lines]
my
tables and how they relate. Can you help me?


--
Message posted via http://www.accessmonster.com