如何轻松记录数据库环境?

时间:2022-08-22 21:21:22

HI Frdz, i have around 40 tables in database and i have created a document with all of these table names, fields, datatype, length of datatype, NUll or NOT NULL. but when i was working on tables in database i had to change the table field names, datatype and length of datatype as well. now as i am done with all my coding i have to have that document matching with what i have in database. so do u think is there any easy way i can do this or do i have to manually go through each table and update the doc?

HI Frdz,我在数据库中有大约40个表,我创建了一个包含所有这些表名,字段,数据类型,数据类型长度,NUll或NOT NULL的文档。但是当我在数据库中处理表时,我不得不更改表字段名,数据类型和数据类型的长度。现在,当我完成所有编码时,我必须将该文档与我在数据库中的内容相匹配。所以你认为有什么简单的方法可以做到这一点,还是我必须手动浏览每个表并更新文档?

Thanks

4 个解决方案

#1


2  

You can usually query the INFORMATION_SCHEMA tables for this kind of info.

您通常可以在INFORMATION_SCHEMA表中查询此类信息。

E.g.,

select *
from INFORMATION_SCHEMA.COLUMNS

#2


1  

You can connect the database to Visio and get a nice database diagram out of it that way. If they are the visual type that is.

您可以将数据库连接到Visio,并以这种方式从中获取一个漂亮的数据库图表。如果它们是视觉类型。

#3


0  

The DBdesigner 4 supports a approach to synchronize your entity relationship model and your real SQL table model. At the features page they mention

DBdesigner 4支持同步实体关系模型和真实SQL表模型的方法。在他们提到的功能页面上

  • Model-To-Database syncronisation

I think this should be possible vice-versa.

我认为这应该是可能的,反之亦然。

#4


0  

In Oracle:

select *
from user_tab_columns

#1


2  

You can usually query the INFORMATION_SCHEMA tables for this kind of info.

您通常可以在INFORMATION_SCHEMA表中查询此类信息。

E.g.,

select *
from INFORMATION_SCHEMA.COLUMNS

#2


1  

You can connect the database to Visio and get a nice database diagram out of it that way. If they are the visual type that is.

您可以将数据库连接到Visio,并以这种方式从中获取一个漂亮的数据库图表。如果它们是视觉类型。

#3


0  

The DBdesigner 4 supports a approach to synchronize your entity relationship model and your real SQL table model. At the features page they mention

DBdesigner 4支持同步实体关系模型和真实SQL表模型的方法。在他们提到的功能页面上

  • Model-To-Database syncronisation

I think this should be possible vice-versa.

我认为这应该是可能的,反之亦然。

#4


0  

In Oracle:

select *
from user_tab_columns