exclusive m:m relationship

From: Markus Janscha <markus_at_janscha.co.uk>
Date: 2000/01/25
Message-ID: <86kdll$5q3$1_at_gxsn.com>#1/1


Can someone give some advise?

I am trying to implement the following.

A project is done by a number of workers, doing a particular job, which could be either employed of contracted.
Contractors and employees are stored in different tables. Jobs in projects could also be done by more than one worker.

I have come up with these two options:

1.
SCHEDULE((Job#(PK,FK),job_type(FK), emp#(PK,FK),contr#(PK,FK)) Each record refers to either employee or contractor exclusively.

2.
SCHEDULE(Job#(PK,FK), job_type(FK), staff#(PK,FK)) Where staff number is either an employee number or contractor number. The two could be distinguished by starting with a different letter.

I am not quit sure which option is the best way of implementing this and why.

Thanks in advance for any suggestions.

Markus Received on Tue Jan 25 2000 - 00:00:00 CET

Original text of this message