Multi-Field Primary Key



A bit of background:
I configured a database for goals and objectives for my personal use to
generate a required monthly activity report that my boss requested. It has
the following structure:
tblGoalComp
-lngGCID (PK)
-chrGoalName
-....

tblObjective
-lngObjID (PK)
-lngGCID (FK)
- chrObjName
- ...

tblGoalLog
-lngLogID (PK)
-lngObjID (FK)
-dtmEventDate
-chrEventDescrip

I've use it for a year and my boss likes it. He has asked me to expand this
for my fellow supervisors. For now I'm going to cheat and give them all a
blank copy of the database I use. (They're going to be facing a March 10
deadline to start using it.) But I know that really limits what might be
done with the database. So I'd like to expand.

I've taken a copy of the database and added a table (imported from another
project) with employee data, tblEmployee. I've then created a table to assign
the goals to the supervisors,tblGoalAssign, to deal with a many-to-many
relationship.
Though I've managed to avoid multi-field primary keys in any effort so far,
I believe I ran into a use for one here . So I have
tblGoalAssign
-chrEmpID (from tblEmployee - chr to allow leading zeros)
-lngGCID (From tblGoalComp)
-intYear

These three fields uniquely identify each record, so I made them a multiple
field primary key. My problems is in relating these fields "downstream" to a
table that performs like tblGoalLog in the original database.
I want to make sure that the reports generated reflect the activity of the
individual supervisors. So the tracking log needs to reference the goal
assignment. But I don't have anything to link to (since none of the three
fields individually identify a record in tblGoalAssign). Do I need to add an
"Autonumber" field to tblGoalAssign to provide such a linking? Would that key
then be a forth field in the primary key? Or is there a better way to address
tracking work activities associated with the assigned goal.
Peace.
EQC

.



Relevant Pages

  • Re: prolog and recursive descent parsing?
    ... Does it make a graph of the parse tree or something? ... In brief, the Prolog engine keeps a list of statements, called goals, ... and looks for a substitution that proves them from the database, ... It works like an ordinary function stack that can branch ...
    (comp.compilers)
  • Role Based Security Question
    ... I have a few questions about role based security in an ASP.Net application. ... Page - Role relationships are also held in a database. ... Here are the goals we are trying to accomplish: ... the pages the user has access to into the Session object on Session_Start. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Role Based Security Question
    ... windows Authentication with Active Directory"!(minimize calls to the ... > - We have a hierarchical roles system stored in a database. ... > Here are the goals we are trying to accomplish: ... > the pages the user has access to into the Session object on Session_Start. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Role Based Security Question
    ... I have a few questions about role based security in an ASP.Net application. ... Page - Role relationships are also held in a database. ... Here are the goals we are trying to accomplish: ... the pages the user has access to into the Session object on Session_Start. ...
    (microsoft.public.dotnet.framework.aspnet)