受 SO 启发的关系 UML 图

发布于 2024-07-29 05:19:22 字数 528 浏览 2 评论 0原文

我的作业是创建一个关于讨论站点的关系 UML 图。 我使用了SO schema,并且我做了一些修改:

  • 删除了用户信息中的年龄
  • 添加了代表,其中允许用户按用户名对帖子进行分类(自愿)

否则,架构非常相似,但很初级。 你会如何改进它?

澄清

代表的主要思想是对帖子进行分类。 该列表仅包含少数可能的名称。 与徽章相比,这个想法并不有趣,而是有组织的。 如果您询问有关数学的问题,您可以是 Steve.math 或只是 math。 它可以帮助其他用户直接看到您的情况,并且不会浪费空间给您用户名。 也许,有一种更简单的方法来组织事情,所以请不要犹豫发表评论。

My homework was to create a relational UML diagram about a discussion site. I used the SO schema, and I did some modifications:

  • removed Age in the User Information
  • added representatives, which allows users to categorise posts by their usernames (voluntary)

Otherwise, the schema is rather similar, but rudimentary. How would you improve it?

Clarification

The main idea of representatives is to categorise posts. The list contains only a handful possible names. In contrast to badges, the idea is not to funny, but organised. If you ask questions about Mathematics, you could be Steve.math or just math. It helps other users to see directly what you are like, and space is not wasted to you Username. Perhaps, there is an easier way to organise things, so don't hesitate to comment.

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

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

发布评论

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

评论(1

熊抱啵儿 2024-08-05 05:19:22

投票

添加:

UserID (FK)
PostID (FK)

用户

  • 删除赞成票和反对票,这些信息可以来自投票表。
  • 使其成为“整数”。 除非您有一个非常大的站点,否则不需要使用 GUID 作为用户 ID。

帖子

  • ID 应该是 GUID

评论

  • ID 应该是 GUID

如果您保留 Representatives,我会更改它的名称。 这个名字并没有告诉我它包含什么。

否则,我认为保留它不是一个好主意——这是“标签”可以告诉你的事情,除非我完全不明白它存在的原因。

Votes

Add:

UserID (FK)
PostID (FK)

Users

  • Get rid of Upvotes and Downvotes, that is information that can come from the votes table.
  • Make it an 'integer'. Unless you have a really big site, there's no need to have a GUID as a user ID.

Posts

  • ID Should be GUID

Comments

  • ID should be GUID

If you keep Representatives, I'd change the name of it. The name doesn't tell me anything about what it holds.

Otherwise, I don't think it's a good idea to keep that -- it's something that the 'tags' can tell you, unless I'm completely missing why that exists.

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