Is this okay to have two foreign keys in one table referencing one primary key of other table?
EmployeeID is a primary key in the employee table and appearing as a foreign key twice in the timesheet table.
There will be few admin users filling up timsheets on the behalf of other employees.
In the timsheet table field 'TimsheetFor' will have employeeID of that person who has worked on projects and field 'EnteredBy' or 'FilledBy' will have employeeid of that person who has filled up this timesheet.
Which of the following option is correct?
NOTE: Tables are showing only those fields which are related to this question.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…