基础数据库设计问题-1属性三个实体

发布于 2024-09-12 11:03:31 字数 309 浏览 5 评论 0原文

请有人能澄清一些我现在应该真正知道的事情吗?

如果我有三个实体组织、董事和公司秘书,并且每个人都有属性主要地址。

如果我正在建模概念 ERD,我应该在每个实体中分别具有属性“主地址”,还是应该建模第四个实体地址,添加主地址并使它们全部 PK > > FK 那个?

此后找到了此链接Is this a good way to model address information in a相关数据库?它几乎涵盖了我需要知道的所有内容。

Please can someone clarify something which I should really know by now?

If I have Three Entitys Organisation, Director and Company secretary and each have the attribute primary address.

If I were modelling a conceptual ERD should I have the attribute ‘primary address’ separately in each entity or should I model a fourth entity Address, add primary address and have them all PK > FK to that?

Have since found this link Is this a good way to model address information in a relational database? which pretty much covers everything I need to know.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓦然回首 2024-09-19 11:03:31

我会做这样的事情,假设主要地址指的是组织位置:

表:组织

Org_Key {PK},
组织名称,
主要地址字段,
任何其他字段

表:人员

Person_Key {PK},
组织键 {FK},
职位{目录、秘书等},
任何其他领域

我认为,确实没有必要将“董事”与“秘书”分开,因为他们都是特定组织的雇员。

现在,如果您所说的主要地址是指个人地址(即个人家庭住址),那么我将向“人员”表添加其他字段。

I would do something like this, assuming primary address refers to the Organization location:

Table: Organization

Org_Key {PK},
Org_Name,
Primary Address fields,
Any other fields

Table: Personnel

Person_Key {PK},
Org_Key {FK},
Position {Directory, secretary, etc},
Any other fields

In my opinion, there is really no need to separate those who are "Directors" from those who are "secretaries" because they are both employees of a specific Organization.

Now, if by primary address you mean a personal address (i.e., an individuals home address) then I would add additional fields to the Personnel table.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文