创建“数据字典”的实用程序对于 MySQL 数据库
我想知道是否有一个实用程序可以为 MySQL 数据库创建数据字典。
我正在考虑编写一个 php 脚本来获取有关数据库的元数据并以用户可以理解的逻辑格式显示它,但我宁愿避免这种情况,如果有一些预构建的实用程序可以简单地做到这一点为我。
I'm wondering if there is a utility that exists to create a data dictionary for a MySQL database.
I'm considering just writing a php script that fetches the meta data about the database and displays it in a logical format for users to understand but I'd rather avoid that if there is some pre-built utility out there that can simply do this for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您是否研究过 HeidiSQL 或 phpMyAdmin?
另外,MySQL 管理。
编辑#1修复了拼写错误,添加了更多信息
Have you looked into HeidiSQL or phpMyAdmin?
Also, MySQL Admin.
Edit#1 fixed typo, added more info
看一下 https://stackoverflow.com/a/26703098/4208132
有一个 MySQL 的 db_doc.lua 插件Workbench CE
[已编辑]
LUA 插件支持似乎已停止。
所以我用Python写了一个插件来生成数据字典。
它位于:https://github.com/rsn86/MWB-DBDocPy
Take a look at https://stackoverflow.com/a/26703098/4208132
There is a db_doc.lua plugin for MySQL Workbench CE
[EDITED]
It seems that the LUA plugin support was discontinued.
So I wrote a plugin in Python to generate data dictionaries.
It is available at: https://github.com/rsn86/MWB-DBDocPy
看起来 MySQL Admin 现在是 MySQL Workbench,您需要企业版才能获得名为 DBDoc 的报告工具。它解释了一些关于自定义 DBDoc 报告模板的信息,位于 http://dev.mysql .com/doc/workbench/en/dbdoc-templates.html
Looks like MySQL Admin is now MySQL Workbench and you need the Enterprise version to get their reporting tool called DBDoc. It explains a little about customizing DBDoc reporting templates at http://dev.mysql.com/doc/workbench/en/dbdoc-templates.html
最简单的方法是下载免费的 Toad for MySQL,然后针对 mysql information_schema 内部数据库创建您自己的查询。您可以将所需的列添加到下面的查询中。然后选择所有结果并使用 TOAD 将其导出为 csv。
使用信息模式;
描述列;
从列 c 中选择 c.table_name、c.column_name、c.data_type
其中c.table_schema =“mydatabaseinstance”;
The easiest thing to do is Download Toad for MySQL, which is free, and create your own query against the mysql information_schema internal database. You can add columns you want to the query below. Then select all results and export as csv using TOAD.
use information_schema;
desc columns;
select c.table_name, c.column_name, c.data_type from columns c
where c.table_schema = "mydatabaseinstance";