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
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