SQL数据库文档? [英] SQL Database documentation?

查看:79
本文介绍了SQL数据库文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具体来说,我使用SQL Server 2005,但解决方案可能与品牌无关。

specifically, I use SQL Server 2005, but the solution might be brand independent.

需要:您有40个数据库表一些,你可能有一个列是一个整数值1-9表示一些枚举。当然,这在代码中是有意义的,但如果你需要SQL的DB报表中只有行类型活动,但你没有线索,如果活动是1,2或3 ...

Need: You have 40 database tables, in some, you may have a column which is a integer values 1-9 representing some enum. Sure it makes sense in code, but not if you need to SQL the DB in a report getting only rows of type "active" but you have no clue if active is 1,2 or 3...

我的解决方案:我有一个wiki页面,我告诉每个开发人员每个表必须在那里,与模式和每列的可能值和解释。
我也生成SQL server 2005数据库图,但是这只是有点帮助,因为你有这么多的表和这么多行连接它们。

my solution: I have a wiki page and I tell each developer that each table must be there, with the schema and for each column the possible values with explanation. I also generate the SQL server 2005 database diagram, but that is only marginally helpful since you have so many tables and so many lines connecting them.

有关答案的注意事项:
请不要像工程师一样回答这个问题!答案像如果你有一个额外的表与外键链接,那么任何人都可以看到的值错过了点。
一个解决方案是好的如果:

Note regarding answers: Please don't answer this question thinking like an engineer! Answers like "if you have an extra table linked with a foreign key, then anyone can see the values" misses the point. A solution is good if:


  1. 我可以打印并发送给合作伙伴

  2. 我可以写自由文本,记录datable / clm。不是生活中的一切都是自我记录。我可能想说这个表是一个报表支持表,是来自XYZ表的反标准化数据。


推荐答案

有一个工具调用数据字典创建器,您可以使用它来获取您的文档

There is a tool call Data Dictionary Creator that you can use to have your documentation in sync with your tables. You can use Red-gate tools. I use the first.

它会生成一个您可以打印的HTML报告。

It generate a HTML report that you can print.

这篇关于SQL数据库文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆