我有两张桌子:
RH_GOALS:包含所有社会年度目标。
------------------
- GOAL_ID -
- GOAL_INTITULE -
------------------
RH_EMPLOYEE:包含所有社会员工。
------------------
- EMPLOYEE_ID -
- FIRST_NAME -
- LAST_NAME -
------------------
每位员工都可以实现一个或多个目标。所以我创建了一个关系表: RH_EMPLOYEE_GOALS:
-------------------
- GOAL_ID
- EMPLOYEE_ID
- ACHIEVED (boolean)
---------------------
现在,一名员工可以拥有不属于RH_GOALS表的其他特定目标。
我的问题是如何表达这些细节员工的目标 1-在另一个表中:RH_EMPLOYEE_GOALS_SPECIFICS
--------------------
- ID
- EMPLOYEE_ID
- SPECIFIC_GOAl_INTITULE
- ACHIEVED (boolean)
---------------------
2-或在同一张表中:RH_EMPLOYEE_GOALS
-------------------
- ID
- GOAL_ID (can be nuul)
- EMPLOYEE_ID
- SPECIFIC_GOAl_INTITULE
- ACHIEVED (boolean)
---------------------
答案 0 :(得分:1)
- ID
- GOAL_ID (can be null)
- EMPLOYEE_ID not null
- SPECIFIC_GOAl_INTITULE (can be null)
- ACHIEVED (boolean)
无需在表格中指定任何其他标志。