数据建模验证

发布于 2024-10-29 09:19:39 字数 560 浏览 0 评论 0原文

寻求有关对以下通用需求进行建模的最佳方法的建议。由于这些只是通用的,因此模型中仅包含基本实体/属性。

目的是捕获并列出可能拥有或不拥有特许经营权的企业的网站。

  1. 企业可能有零个、一个或多个网站
  2. 企业的特许经营权(包含ExternalBusinessId 的原因)可能会或可能不会与企业本身或其他特许经营权共享相同的网站

在我尝试满足这些要求时,我从 PK 中删除了ExternalBusinessId网站。不确定满足这些要求是否那么简单,但看起来仍然会留下很多重复的内容。

我可能需要采取的另一种方法是将特许经营权移至他们自己的表中,这可以使这个问题更容易解决,但使我的模型的其余部分变得复杂(此处未显示)。如果将特许经营权放在自己的表中是正确的方法,我宁愿走这条路,并完成其余的练习,使其适合我的完整模型。在我当前的模型中,处理没有特许经营权的业务的方式是默认的ExternalBusinessId 001。

有什么想法吗?

谢谢

在此处输入图像描述

Looking for advice on the best way to model the following generic requirements. Since these are just generic only basic entities/attributes are included in the model.

The purpose is to capture and list websites for businesses that may or may not have franchises.

  1. A business may have zero, one, or many websites
  2. Franchises (reason for including ExternalBusinessId) of the business may or may not share the same websites as the Business itself or other franchises

In my attempt to fulfill these requirements I removed ExternalBusinessId from the PK of Website. Not sure if it is that simple to meet these requirements, but it looks like it would still leave a lot of dups.

Another approach that I may need to take is to move the franchises to their own table which could make this problem easier to solve but complicate the rest of my model (not shown here). If having Franchises in their own table is the right approach I would rather go that route and go through the rest of the exercise of having that fit into my complete model. In my current model the way to handle businesses without franchises they are given a default ExternalBusinessId of 001.

Any thoughts?

Thanks

enter image description here

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

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

发布评论

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

评论(1

枯叶蝶 2024-11-05 09:19:39
  • 特许经营是一项业务。
  • 特许经营这个词描述了两个企业之间的关系。
  • 每个企业都有零个、一个或多个
    网站。

如果我理解正确的话,你似乎是这样想的。

  • 将特许经营权存储在单独的
    表意味着将它们从
    表“业务”。

特许经营是企业。就像其他所有业务一样,将它们存储在“业务”表中。将特许经营权与其特许经营商之间的关系存储在另一个表中。

与特许经营业务相关的信息应引用表“业务”中的关键字。此类信息可能包括其邮寄地址和电话号码。

仅与特许经营权相关的信息应引用特许经营表中的关键字。此类信息可能包括特许经营许可证号和特许经营终止日期。

  • A franchise is a business.
  • The word franchise describes a relationship between two businesses.
  • Every business has zero, one, or many
    websites.

If I understand you correctly, you seem to think something like this.

  • Storing franchises in a separate
    table implies eliminating them from
    the table "business".

Franchises are businesses. Store them in the table "business", just like every other business. Store the relationship between a franchise and its franchiser in another table.

Information related to the franchise as a business should reference a key in the table "business". Such information might include its mailing address and phone numbers.

Information related only to the franchise as a franchise should reference a key in the table of franchises. Such information might include the franchise license number and franchise termination date.

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