如何呈现数据库设计?

时间:2021-08-21 19:14:53

I am doing a project in the university and it includes a MySQL database. I have a design for the database in terms of a list of tables and their respective fields.

我在大学做一个项目,它包含一个MySQL数据库。我为数据库设计了一个表列表和它们各自的字段。

In what form should I present this design? Just the list of tables and content? In an ERD? How do you present your designs?

我应该以什么形式呈现这个设计?只是表和内容的列表?在一个ERD吗?你如何展示你的设计?

To clarify - whatever you answer, I expect not only specification of how you present your design, but also which tools do you use the create the diagrams/list/tables etc.

为了澄清——无论你回答什么问题,我期望的不仅是你如何展示你的设计,还有你使用什么工具来创建图表/列表/表格等等。

5 个解决方案

#1


4  

ERD is the only way to go. As they say, a picture is worth a thousand words.

ERD是唯一的方法。正如人们所说,一幅画胜过千言万语。

But don't try to put the whole database on one diagram. It will, in all but the most trivial cases, be overwhelming to your audience to try to digest the entire database design in one go. Instead, break the diagrams into subject areas depicting only the most relevant tables in each diagram. For example, a point-of-sale system might have separate diagrams for Inventory, Sales, Accounting, Customer Management, Security, Auditing, and Reporting. Some tables will show up in more than one subject area -- this is to be expected.

但是不要试图把整个数据库放在一个图上。除了最琐碎的情况外,您的读者将无法一口气理解整个数据库设计。相反,将图表分解为主题区域,只描述每个图表中最相关的表格。例如,销售点系统可能有单独的图用于库存、销售、会计、客户管理、安全、审计和报告。有些表格会出现在一个以上的主题区域——这是可以预料到的。

As far as tooling, nothing beats ErWin, but it is really expensive and only available for Windows. Visio is ubiquitous in a corporate environment, but is only available on Windows and is not exactly cheap either. Macs offer some really nice diagramming tools; most of them are not free.

就工具而言,没有什么能胜过ErWin,但它确实非常昂贵,而且只适用于Windows。Visio在企业环境中无处不在,但只能在Windows上使用,而且也不便宜。mac提供了一些非常好的图表工具;大部分都不是免费的。

Dia is a decent, free, and cross-platform diagramming tool. It is a bit quirky, though; and I have not had much success making the diagrams look as nice I want them to look.

Dia是一个不错的、免费的、跨平台的绘图工具。虽然有点古怪;我并没有成功地让图表看起来像我想要的那样好看。

For MySQL, I have played with fabFORCE dbDesigner and it is not bad, but I did find its support for multiple subject areas to be a bit lacking at the time -- perhaps they've improved it since. But it is free and works on Windows and Linux.

对于MySQL,我使用过fabFORCE dbDesigner,它还不错,但是我发现它对多个主题领域的支持在当时是有点缺乏的——也许从那以后他们已经改进了它。但它是免费的,适用于Windows和Linux。

For the actual presentation, I create images from these diagramming tools and pull them into presentation software (PowerPoint, KeyNote, or OpenOffice Impress). These presentations can be exported to PDF and distributed to the audience; they won't need anything more than a PDF viewer to review the information later.

对于实际的演示,我使用这些图表工具创建图像,并将它们放入演示软件(PowerPoint、KeyNote或OpenOffice Impress)。这些报告可导出为PDF并分发给听众;他们只需要一个PDF查看器就可以查看信息。

#2


3  

Let's look at this from your professor's perspective. If I were him/her:

让我们从教授的角度来看这个问题。如果我是他/她:

I would require an ERD. Without it, I cannot see one of the most fundamental issues of a database design, how are the tables related.

我需要一个ERD。如果没有它,我就无法看到数据库设计中最基本的问题之一,表是如何关联的。

I would also expect some basic use cases/ requirements. What problems are you trying to solve with this database design?

我还期望一些基本的用例/需求。您试图用这个数据库设计解决什么问题?

I would want to see what indexes are in place, especiall on the foreign key columns. I would want to see expected row counts in all tables to determine if indexes are even required.

我想看看有什么索引,特别是在外键列上。我希望看到所有表中的预期行数,以确定是否需要索引。

I would want to see column data types to determine if they meet the requirements. I would want to see what columns accept NULL values, since that often can cause problems if you're not careful.

我希望看到列数据类型,以确定它们是否满足需求。我希望看到哪些列可以接受NULL值,因为如果不小心的话,这通常会导致问题。

If I were using SQL Server, I would probably create a diagram in SSMS to display a somewhat basic ERD. Visio can be used as well. I might use Visio to create my use cases, or perhaps Microsoft Word.

如果我使用的是SQL Server,我可能会在SSMS中创建一个图来显示一个基本的ERD。Visio也可以使用。我可以使用Visio创建我的用例,或者Microsoft Word。

#3


1  

Don't forget to discuss design aspects that can't be well fitted in the ERD:

不要忘记讨论在ERD中不能很好地安装的设计方面:

1) how inheritance/aggregation relationships from your analytic model realized in the your relation db design (presented on ERD).

1)在关系db设计(呈现在ERD上)中,分析模型中的继承/聚合关系是如何实现的。

2) how you support hierarchies of your objects in the rdb design (if you have any)

2)如何在rdb设计中支持对象的层次结构(如果有)

3) any relationships that are in your analytics model but are not supported in the rdb design.

3)分析模型中不支持rdb设计的任何关系。

4) ETL process, track changes, security and archiving/history support (if they are supported on db level).

4)ETL过程、跟踪更改、安全性和存档/历史支持(如果它们在db级别上支持的话)。

#4


0  

mysql workbench will make you pretty graphics for presentation amongst other many sophisticated features.

mysql workbench可以为您提供漂亮的图形,以及许多复杂的特性。

#5


0  

Depends on the audience. ERD certainly isn't the only answer and may not be the best. You should choose a medium that your audience will understand.

取决于观众。ERD当然不是唯一的答案,也可能不是最好的。你应该选择一种你的听众会理解的媒介。

#1


4  

ERD is the only way to go. As they say, a picture is worth a thousand words.

ERD是唯一的方法。正如人们所说,一幅画胜过千言万语。

But don't try to put the whole database on one diagram. It will, in all but the most trivial cases, be overwhelming to your audience to try to digest the entire database design in one go. Instead, break the diagrams into subject areas depicting only the most relevant tables in each diagram. For example, a point-of-sale system might have separate diagrams for Inventory, Sales, Accounting, Customer Management, Security, Auditing, and Reporting. Some tables will show up in more than one subject area -- this is to be expected.

但是不要试图把整个数据库放在一个图上。除了最琐碎的情况外,您的读者将无法一口气理解整个数据库设计。相反,将图表分解为主题区域,只描述每个图表中最相关的表格。例如,销售点系统可能有单独的图用于库存、销售、会计、客户管理、安全、审计和报告。有些表格会出现在一个以上的主题区域——这是可以预料到的。

As far as tooling, nothing beats ErWin, but it is really expensive and only available for Windows. Visio is ubiquitous in a corporate environment, but is only available on Windows and is not exactly cheap either. Macs offer some really nice diagramming tools; most of them are not free.

就工具而言,没有什么能胜过ErWin,但它确实非常昂贵,而且只适用于Windows。Visio在企业环境中无处不在,但只能在Windows上使用,而且也不便宜。mac提供了一些非常好的图表工具;大部分都不是免费的。

Dia is a decent, free, and cross-platform diagramming tool. It is a bit quirky, though; and I have not had much success making the diagrams look as nice I want them to look.

Dia是一个不错的、免费的、跨平台的绘图工具。虽然有点古怪;我并没有成功地让图表看起来像我想要的那样好看。

For MySQL, I have played with fabFORCE dbDesigner and it is not bad, but I did find its support for multiple subject areas to be a bit lacking at the time -- perhaps they've improved it since. But it is free and works on Windows and Linux.

对于MySQL,我使用过fabFORCE dbDesigner,它还不错,但是我发现它对多个主题领域的支持在当时是有点缺乏的——也许从那以后他们已经改进了它。但它是免费的,适用于Windows和Linux。

For the actual presentation, I create images from these diagramming tools and pull them into presentation software (PowerPoint, KeyNote, or OpenOffice Impress). These presentations can be exported to PDF and distributed to the audience; they won't need anything more than a PDF viewer to review the information later.

对于实际的演示,我使用这些图表工具创建图像,并将它们放入演示软件(PowerPoint、KeyNote或OpenOffice Impress)。这些报告可导出为PDF并分发给听众;他们只需要一个PDF查看器就可以查看信息。

#2


3  

Let's look at this from your professor's perspective. If I were him/her:

让我们从教授的角度来看这个问题。如果我是他/她:

I would require an ERD. Without it, I cannot see one of the most fundamental issues of a database design, how are the tables related.

我需要一个ERD。如果没有它,我就无法看到数据库设计中最基本的问题之一,表是如何关联的。

I would also expect some basic use cases/ requirements. What problems are you trying to solve with this database design?

我还期望一些基本的用例/需求。您试图用这个数据库设计解决什么问题?

I would want to see what indexes are in place, especiall on the foreign key columns. I would want to see expected row counts in all tables to determine if indexes are even required.

我想看看有什么索引,特别是在外键列上。我希望看到所有表中的预期行数,以确定是否需要索引。

I would want to see column data types to determine if they meet the requirements. I would want to see what columns accept NULL values, since that often can cause problems if you're not careful.

我希望看到列数据类型,以确定它们是否满足需求。我希望看到哪些列可以接受NULL值,因为如果不小心的话,这通常会导致问题。

If I were using SQL Server, I would probably create a diagram in SSMS to display a somewhat basic ERD. Visio can be used as well. I might use Visio to create my use cases, or perhaps Microsoft Word.

如果我使用的是SQL Server,我可能会在SSMS中创建一个图来显示一个基本的ERD。Visio也可以使用。我可以使用Visio创建我的用例,或者Microsoft Word。

#3


1  

Don't forget to discuss design aspects that can't be well fitted in the ERD:

不要忘记讨论在ERD中不能很好地安装的设计方面:

1) how inheritance/aggregation relationships from your analytic model realized in the your relation db design (presented on ERD).

1)在关系db设计(呈现在ERD上)中,分析模型中的继承/聚合关系是如何实现的。

2) how you support hierarchies of your objects in the rdb design (if you have any)

2)如何在rdb设计中支持对象的层次结构(如果有)

3) any relationships that are in your analytics model but are not supported in the rdb design.

3)分析模型中不支持rdb设计的任何关系。

4) ETL process, track changes, security and archiving/history support (if they are supported on db level).

4)ETL过程、跟踪更改、安全性和存档/历史支持(如果它们在db级别上支持的话)。

#4


0  

mysql workbench will make you pretty graphics for presentation amongst other many sophisticated features.

mysql workbench可以为您提供漂亮的图形,以及许多复杂的特性。

#5


0  

Depends on the audience. ERD certainly isn't the only answer and may not be the best. You should choose a medium that your audience will understand.

取决于观众。ERD当然不是唯一的答案,也可能不是最好的。你应该选择一种你的听众会理解的媒介。