Table design and relationship (1 Viewer)

prmitchell

Registered User.
Local time
Today, 21:16
Joined
Jan 2, 2013
Messages
58
I have a problem of how to structure tables to pay employees
the employee recruit people to attend sessions
so there are three tables, employees to sessions many to many
attendance resolves the many to many, so
Employees 1 to M Attendances
and
Sessions 1 to M Attendances

Attendances contains Employee_ID and Session_ID and attendance (Y/N) and also a Participant_ID (which is connected to a Participants table which I haven't mentioned as it's not part of the problem)

Employees has a field titled Fee

I want to be able pay any employee a bonus when they are faced with a difficult session to recruit
so my thought is to have a Bonuses table which would contains Employee_ID and Session_ID and BonusFee

the relationship between Bonuses and Attendances is on to many

so once I have the relationship correct I want to add [Fee] + [BonusFee]

but I don't understand how to connect the Bonuses table. BonusFee can't simply go in the Attendances table because a particular employee might recruit 5 (or 20) people and the Employee is then paid the same amount for all of their participants in that session.

Ideas most welcome
 

prmitchell

Registered User.
Local time
Today, 21:16
Joined
Jan 2, 2013
Messages
58
Thanks Roger for the file. I haven't yet worked out how to apply it to my situation. I'm also worried in your example linking all the tables making a circle as in my experiencing that causes a problem. I'm not clear how that design ensures one knows when certificate an employee has when they are in a particular job. But I am digressing.

Now that I've taken a little longer to look at how to attach a file, I have uploaded my test file.

Happy to talk more.
 

Attachments

  • Employees.zip
    627.5 KB · Views: 73

Users who are viewing this thread

Top Bottom