Database Design - Entities in Access (1 Viewer)

mosh

Registered User.
Local time
Today, 15:29
Joined
Aug 22, 2005
Messages
133
I have realised that payroll_number & shift_type will be duplicated in the employeeshift table but is this the error you are talking about?
________
Laguna Heights Condos
 
Last edited:

Mike Smart

Registered User.
Local time
Today, 07:29
Joined
Feb 14, 2007
Messages
53
I have realised that payroll_number & shift_type will be duplicated in the employeeshift table but is this the error you are talking about?

OK... I'll tell you (but I thought you'd have more fun discovering it yourself)!

The payroll_number and shift_type are both foreign keys in the EmployeeShift table. Together they make up the primary key of EmployeeShift. You need to go to table design for EmployeeShift, select BOTH FIELDS and then click the Primary Key button. Don't forget to constrain both relationships too as mentioned earlier.

I'd still re-design and observe my design rules if you want a truly wonderful database rather than one that will just do!
 

mosh

Registered User.
Local time
Today, 15:29
Joined
Aug 22, 2005
Messages
133
Hi Mike,

Weirdly enough, they were both primary keys, I have just deleted the relationships and now it is a 1-m m-1.

I will post my updated schema soon.

Thanks.
________
Mabell cam
 
Last edited:

mosh

Registered User.
Local time
Today, 15:29
Joined
Aug 22, 2005
Messages
133
I have realised that in the EmployeeShift table, an employee cannot work the same shift on a different day; i.e.

Payroll number Shift Type Day
12345 Early 1 Monday
12345 Early 1 Tuesday

The above does not work and says duplicate will occur in the shift table. does this mean I have to create a "shiftID", and then re-arrange the keys?

Thanks
________
MARIJUANA SEEDS
 
Last edited:

Users who are viewing this thread

Top Bottom