Relational UML Diagram inspired by SO

最后都变了- 提交于 2019-12-02 01:45:57

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/1179317/relational-uml-diagram-inspired-by-so

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!