当前位置:网站首页>数据库字典Navicat自动生成版本
数据库字典Navicat自动生成版本
2022-07-02 06:39:00 【红目香薰】
数据字典
数据字典是存放有关数据库信息的地方,其用途是用来描述数据的。
比如一个表的创建者信息,创建时间信息,所属表空间信息,用户访问权限信息等。
数据库数据字典是一组表和视图结构。它们存放在SYSTEM表空间中,当用户在对数据库中的数据进行操作时遇到困难就可以访问数据字典来查看详细的信息。
用户可以用SQL语句访问数据库数据字典。
数据字典内容包括:
- 数据库中所有模式对象的信息,如表、视图、簇、及索引等。
- 分配多少空间,当前使用了多少空间等。
- 列的缺省值。
- 约束信息的完整性。
- 用户的名字。
- 用户及角色被授予的权限。
- 用户访问或使用的审计信息。
- 其它产生的数据库信息。
目录
数据库字典的导出
使用工具:【Navicat】啥版本都一样,都有着功能。

创建一个库

建表语句与信息
/*
Navicat MySQL Data Transfer
Source Server : my_test_ali_mysql_link
Source Server Version : 50732
Source Host : rm-bp1zq3879r28p726lco.mysql.rds.aliyuncs.com:3306
Source Database : mytext
Target Server Type : MYSQL
Target Server Version : 50732
File Encoding : 65001
Date: 2022-07-01 23:00:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(8) NOT NULL AUTO_INCREMENT COMMENT '编号,唯一自增主键',
`createDate` datetime NOT NULL COMMENT '创建时间',
`userName` varchar(32) NOT NULL COMMENT '用户名,唯一索引',
`passWord` varchar(36) NOT NULL COMMENT '用户密码',
`age` int(3) NOT NULL COMMENT '用户年龄',
`phone` varchar(11) NOT NULL COMMENT '用户手机号,字符串类型,长度11',
`introduce` varchar(20) NOT NULL COMMENT '用户简介',
`sex` int(1) NOT NULL COMMENT '用户性别',
PRIMARY KEY (`id`),
UNIQUE KEY `userName_index` (`userName`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of users
-- ----------------------------
INSERT INTO `users` VALUES ('1', '2022-06-26 13:43:11', 'admin', '123456', '22', '15912345678', '凤舞九天', '1');
INSERT INTO `users` VALUES ('2', '2022-06-26 13:43:11', 'zhangsan', '123456', '32', '15912345678', '藏王', '0');
INSERT INTO `users` VALUES ('3', '2022-06-26 13:43:11', 'lisi', '45451', '42', '15912345678', '流氓兔', '0');
INSERT INTO `users` VALUES ('4', '2022-06-26 13:43:11', 'zhaoliu1', '2222', '52', '15912345678', '喜欢武术.', '0');
INSERT INTO `users` VALUES ('5', '2022-06-26 13:43:11', 'zhaoliu2', '11111', '16', '15912345678', '喜欢舞蹈.', '0');
INSERT INTO `users` VALUES ('6', '2022-06-26 13:43:11', 'zhaoliu3', '123787', '27', '15912345678', '喜欢泡妞.', '0');
打开查询功能:

输入以下sql语句:
select
TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME,
COLUMN_TYPE,
COLUMN_COMMENT
from
information_schema.columns
where
TABLE_SCHEMA='mytext'; #这里是你的数据库库名查看效果:

这里都是英文的列名,你也可以搞成中文的列名。
select
TABLE_SCHEMA '库名',
TABLE_NAME '表名',
COLUMN_NAME '列名',
COLUMN_TYPE '数据类型与长度',
COLUMN_COMMENT '备注'
from
information_schema.columns
where
TABLE_SCHEMA='mytext'; #这里是你的数据库库名可以看到中文的列信息了:

导出数据:

选择导出【xlsx】的Excel
确定【保存位置】与【保存名称】

这里注意,一定要勾选上【包含列的标题】

点击开始

看到successfully代表完毕

去对应的保存位置查看文件。

打开看看

super,这是多么完整啊,而且是自动生成的,滋润。
如果是多表有ER图的一定也要留一个啊。
边栏推荐
- What is call / cc- What is call/cc?
- 快速做出原型
- MongoDB-快速上手MongoDB命令行的一些简单操作
- 2021-09-12
- Basic notes of illusory AI blueprint (10000 words)
- 【MySQL】连接MySQL时出现异常:Connection must be valid and open
- Transport Optimization abstraction
- [visual studio] every time you open a script of unity3d, a new vs2017 will be automatically reopened
- stm32和电机开发(上位系统)
- [pit avoidance guide] pit encountered using ugui: the text component cannot indent the first line by two spaces
猜你喜欢

Blender摄像机环绕运动、动画渲染、视频合成
What is the relationship between realizing page watermarking and mutationobserver?

Blender model import UE, collision settings

The primary market project galaxy will conduct public offering on coinlist on February 17

Webui automated learning

Redis set password

虛幻AI藍圖基礎筆記(萬字整理)

ue虛幻引擎程序化植物生成器設置——如何快速生成大片森林

快速做出原型

Feature (5): how to organize information
随机推荐
sqoop的表的导入
Delivery mode design of Spartacus UI of SAP e-commerce cloud
【MySQL】连接MySQL时出现异常:Connection must be valid and open
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
【Unity3D】无法正确获取RectTransform的属性值导致计算出错
[tutorial] how to make the Helpviewer help document of VisualStudio run independently
[visual studio] every time you open a script of unity3d, a new vs2017 will be automatically reopened
Sum the two numbers to find the target value
How does {} prevent SQL injection? What is its underlying principle?
How to achieve the top progress bar effect in background management projects
Commutateur Multi - lentilles Blender
Feature (5): how to organize information
【避坑指南】使用UGUI遇到的坑:Text组件无法首行缩进两格
高考的意义是什么
[unity3d] production progress bar - make image have the functions of filled and sliced at the same time
Operator exercises
stm32和电机开发(上位系统)
[jetbrain rider] an exception occurred in the construction project: the imported project "d:\visualstudio2017\ide\msbuild\15.0\bin\roslyn\microsoft.csh" was not found
Database -- acid of transaction -- introduction / explanation
Pytest-- test report allure configuration