English 中文(简体)
简单 UML 案例
原标题:A simple UML case
  • 时间:2012-05-23 17:05:14
  •  标签:
  • uml

我有表格:用户、评论和文章,

  1. A user can have many posts and comments
  2. A post can have many comments
  3. A comment can only be written by one user, and can only be in one post

因此,我如何使这些表格之间的关系,从而不导致任何封闭关系。

这就是我所做的:

tbl_user 1 ------ n  Post 
tbl_post 1--------n Comments
最佳回答

我认为你的方法很好,但你也应该建立 tbl_user: 1.n Comment 关系(假设不仅职位所有人可以发表评论),以确定评论与其所有人之间的关系。

问题回答

暂无回答




相关问题
Understanding UML of DoFactory Design Pattern - Decorator

I am trying to understand UML diagram describing Decorator Pattern at link below http://www.dofactory.com/Patterns/PatternDecorator.aspx I don t understand why there is a "Aggregation" relation ...

UML Code generation tool in C# [closed]

Please suggest me any opensource tool to generate C# code from UML designer,Or any plugin to generate code from visualstudio. My requirement is to have a code generation tool for C#.

How to design/plan for web application development?

I m interested in learning how to design/plan for web application development, in a multiple developer team scenario. Assuming the role of "Project Manager/Lead": What "documents" are needed for ...

Software for Sequence Diagrams? [closed]

I ve been using NClass for object/class modeling in class thus far. However, I do not believe that it is capable of sequence diagrams, which is my next task. I would prefer not to use Visio. Is ...

UML Diagram to Model API

I need to create a diagram to document a RESTFul API that build, which UML diagram should I use? Thanks in advance,

Where could I find some UML samples? [closed]

I need a punch of samples of UML diagrams to get an start point to develop my own diagrams. Does anyone know about a good website where I could find it? Thanks!

热门标签