表示数据库的最紧凑的方式是什么?
我有一个数据库(20 个表,最多 17 行),我需要在一张 A4 纸上以示意图或图形方式表示该数据库。
我正在寻找一种方法来做到这一点,因为我只了解 ER 模型,并且无法将其压缩到一个页面中。
它也可以是文本表示,只要它是标准化的方式即可。
I have a database (20 tables, up to a maximum of 17 rows) that I need to represent schematically or graphically on one A4 sheet.
I'm looking for a way to do this, since I only know about ER models and I couldn't manage to squeeze it into a single page.
It could also be a textual representation, as long as it is a standardized way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有些人将数据模型称为“ER 图”,这正是您正在做的事情;其他人将 ERD 称为“数据模型”。不用担心常见的用法术语,现在我们行业中有很多非专业人士,他们称苹果为橙子。当您使用正确的标签时,生活会变得更加轻松。
实体关系图是实体和关系(仅)的示意图,这就是它被称为 ER 图而不是数据模型的原因。一张 A4 纸可以轻松容纳 10 个表格。您将有空间添加注释和文本。
数据模型是实体、关系和属性的完整示意图,主键区分清楚。根据进展阶段和观众,或者逻辑渲染与物理渲染,它将另外显示:
完全公开的子类型/父类型
根据是否使用关系建模标准,它将显示数据及其关系的微妙性和复杂性。
显然,如果您使用标准表示法,那么您将被更多的人理解,并且当更多人学习标准并期望该表示法时,您永远不必回去更改它。
查看下面链接中提供的数据模型。第一页是 ERD(28 个实体,同时保留层次结构)。 DM 在随后的 4 x A4 页中交付,每个页包含一个逻辑表簇;所有五个页面都已链接(确保您找到注释链接,然后单击它们)。
即使对于 DM,我发现最好
我发现的另一种可以严重提高理解的技术是按自然层次结构显示对象。该技术在 Notation 文档中有详细介绍。
对于只有十个表的您来说,另一个选择是在数据模型级别绘制架构,但仅显示主键(不包括非 PK 属性);比 ERD 迈出了一小步,比完整的 DM 少了一大步。我不建议这样做,而是给他们完整的 DM以及 ERD,无论需要多少 A4 页。人们可以停在第一页,也可以根据需要继续阅读。
链接到示例 ERD 和示例数据模型
链接到IDEF1X 表示法适合那些不熟悉关系建模标准的人。
Some people call Data Models "ER Diagrams", which is what you appear to be doing; others call ERDs "Data Models". Don't worry about the common usage terms, we have a lot of non-professionals in the industry these days, who call apples oranges. Life is much easier when you use the correct labels.
The Entity Relation Diagram is a schematic of the Entities and Relations (only), that's why it is called an ER diagram and not a Data Model. Ten tables will easily fit onto an A4 page. You will have space to add notes and text.
The Data Model is the full schematic of the Entities, Relations and Attributes, with the Primary Key differentiated clearly. Depending on the stage of progress and the audience, or the logical vs physical rendering, it will additionally show:
Subtypes/Supertypes fully exposed
Depending on whether you use the Relational modelling Standard or not, it will show the subtleties and complexities of the data and its Relations.
Obviously, if you use Standard notation, then you will be understood by more people, and you never have to go back and change it when more people learn the Standard and expect that notation.
Have a look at the Data Model provided in the link below. The first page is the ERD (28 Entities, while retaining the hierarchy). The DM is delivered in the subsequent 4 x A4 pages, each containing a logical cluster of tables; and all five pages are linked (make sure you find the notes re links, and click on them).
Even for the DM, I find it is best to present information:
The other technique that I have found that seriously improves understanding, is to show the objects in their natural hierarchy. That technique is detailed in the Notation document.
Another option for you, with only ten tables, is to draw the schema at Data Model level, but only show the Primary Keys (exclude non-PK attributes); one small step beyond ERD, and one big step less than full DM. I do not recommend this, rather, give them the full DM as well as the ERD, on however many A4 pages it takes. People can stop at the first page, or go further if they want.
Link to Example ERD & Data Model
Link to IDEF1X Notation for those who are unfamiliar with the Relational Modelling Standard.
不要将所有信息压缩到一个小区域,而是尝试省略非必要的列。我不知道你的表示有什么用途,但如果它是供人类阅读的,你应该记住信息包装得越密集,人脑就会忽略的信息就越多 处理图像时。
像往常一样,少即是多。
Instead of squeezing all information into a small area, try leaving out the non-essential columns. I don't know what the usage of your representation is, but if it is to be read by humans you should remember that the denser the information is packed, the more of it will simply be ignored by the human brain when processing the image.
Less is more, as usual.