受 SO 启发的关系 UML 图 [英] Relational UML Diagram inspired by SO
问题描述
我的作业是创建一个关于讨论站点的关系 UML 图.我使用了 SO 架构,并做了一些修改:
My homework was to create a relational UML diagram about a discussion site. I used the SO schema, and I did some modifications:
- 删除了用户信息中的年龄
- 添加了代表,允许用户按用户名对帖子进行分类(自愿)
否则,模式相当相似,但很基本.您将如何改进它?
Otherwise, the schema is rather similar, but rudimentary. How would you improve it?
澄清
代表的主要思想是对帖子进行分类.该列表仅包含少数可能的名称.与徽章相比,这个想法不是为了有趣,而是有组织的.如果你问关于数学的问题,你可以是 Steve.math
或只是 math
.它可以帮助其他用户直接看到您的样子,并且不会浪费空间给您Username
.也许,有一种更简单的方法来组织事物,所以不要犹豫,发表评论.
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.
推荐答案
投票
添加:
UserID (FK)
PostID (FK)
用户
- 去掉 Upvotes 和 Downvotes,这些信息可以来自投票表.
- 使其成为整数".除非您有一个非常大的站点,否则不需要将 GUID 作为用户 ID.
- ID 应该是
GUID
- ID 应该是
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.
这篇关于受 SO 启发的关系 UML 图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!