如何为通用类图创建表?

时间:2017-04-01 10:55:01

标签: sql-server database-design class-diagram

我正在开发一个在线求职门户网站。在类图中,我概括了雇主&员工作为会员班级&我把'MID'作为主键。现在我很困惑如何为Employer& amp;创建表格。雇员?

1 个答案:

答案 0 :(得分:0)

以下是您需要的表格:

Member
========
Id (or MId) (PK)
... (Specifications you need)

Employer
========
Id (PK)
MId (FK to Member table)
... (Specifications you need)

Employee
========
Id (PK)
MId (FK to Member table)
EId (FK to Employer table)
... (Specifications you need)