如何改善ERD [英] How to improve a ERD
问题描述
此问题基于我的计划,主题。
我的实体关系图是
alt text http://files.getdropbox.com/u/175564/sequence-diagram.png
我想知道以下内容。
我的序列图是否符合以下关系图? strong>
alt text http://files.getdropbox.com/u/175564/table-problem-3.png
查看第一个图表作为逻辑模型,通常在Logical中定义的表格也存在于物理表格中 - 您缺少QUESTION-TAGS(nee QUESTION-SUBJECTS)表格。您在QUESTION和MONITOR-CHECK之间有一对一的关系,这意味着没有值可以进行MONITOR-CHECK - 将属性移动到QUESTION
表中。
将第二个图视为Physical ERD模型 - 使用具有一对一关系的两个表没有任何好处。我在说的是QUESTION / QUESTION-BODY和QUESTION / MODERATOR-CHECK表。
QUESTION-SUBJECTS命名不当 - tag,然后相应地命名表。此表将是一个代码表(具有CODE,DESCRIPTION列),因为您希望保持查询的值一致以执行良好。也就是说,您需要在QUESTION和QUESTION-TAGS表之间使用一个xref / lookup / corollary表,以便有一个[问题相关]到许多[问题标签]。
QUESTION-ID(pk)
This question is based on my plan at the thread.
My entity-relationship diagram is
alt text http://files.getdropbox.com/u/175564/sequence-diagram.png
I would like to know the following.
Does my sequence diagram match the following relation diagram?
alt text http://files.getdropbox.com/u/175564/table-problem-3.png
Reviewing the first diagram as the Logical model, typically the tables defined in the Logical also exist in the physical - you're missing the QUESTION-TAGS (nee QUESTION-SUBJECTS) table. You have a one-to-one relationship between QUESTION and MONITOR-CHECK, which means there's no value to having MONITOR-CHECK - move the attributes into the QUESTION table.
Viewing the second diagram as the Physical ERD model - there's no benefit to having two tables with a one-to-one relationship. I'm speaking about the QUESTION / QUESTION-BODY, and QUESTION / MODERATOR-CHECK tables.
QUESTION-SUBJECTS is poorly named - if by your note the record represents a "tag", then name the table accordingly. This table would be a code table (having CODE, DESCRIPTION columns) because you want to keep the values consistent for queries to perform well. That said, you need an xref/lookup/corollary table between the QUESTION and QUESTION-TAGS table in order to have a one [question related] to many [question tags].
QUESTION-TAG-XREF
- QUESTION-ID (pk)
- QUESTION-TAG-CODE (pk)
这篇关于如何改善ERD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!