I have a table called WorkItemNotes, and separate tables for Customers and Employees.
I am using MySQL WorkBench to map out the database tables and relationships and have a couple of questions.
Both Customers and Employees can add notes to the WorkItemNotes table, and the associated ID will be stored in the table:
| WorkItemNotes |
| guid/ID |
| Notes |
| Author |
Am I better to have two tables for notes, one for each the Customer and the Employee? Or if I keep one table, how can I set up the relationship in WorkBench. Is it valid to attach a foreignkey to the Author field that is reference by both the Customer and Employee table?
The cleanest solution is to model the existence of a Person as a fact, distinct from their status as a Customer or Employee, and tie the Notes to the Person relation:
This has the additional feature (or misfeature, depending on the business rules) that an employee can also be a customer.