当前位置:网站首页>数据库字典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图的一定也要留一个啊。
边栏推荐
- Postman--使用
- Brief analysis of edgedb architecture
- [leetcode] sword finger offer 53 - I. find the number I in the sorted array
- Zlib download and use
- Spatial interpretation | comprehensive analysis of spatial structure of primary liver cancer
- VLAN experiment
- Post disaster reconstruction -- Floyd thought
- [illusory] weapon slot: pick up weapons
- VLAN experiment
- ERROR 1118 (42000): Row size too large (> 8126)
猜你喜欢

Remember the use of add method once

使用Windbg静态分析dump文件(实战经验总结)

How to judge the quality of primary market projects when the market is depressed?

【Unity3D】嵌套使用Layout Group制作拥有动态子物体高度的Scroll View

两数之和,求目标值

This article takes you to learn in detail what is fiber to home FTTH

VLAN experiment

Following nym, the new project Galaxy token announced by coinlist is gal

STM32 and motor development (upper system)

Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
随机推荐
2021-09-12
2021-10-04
[Fantasy 4] introduction and use of UMG components (under update...)
UE4夜间打光笔记
Understand the composition of building energy-saving system
Flink实时计算topN热榜
【Visual Studio】每次打开一个Unity3D的脚本,都会自动重新打开一个新的VS2017
VLAN experiment
[MySQL] an exception occurs when connecting to MySQL: connection must be valid and open
Metaclass type and using metaclass to implement model class ORM
[Fantasy 4] the transformation from U3D to UE4
使用Windbg静态分析dump文件(实战经验总结)
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
【Unity3D】制作进度条——让Image同时具有Filled和Sliced的功能
Importing tables from sqoop
Deep understanding of redis cache avalanche / cache breakdown / cache penetration
Applet development summary
[unreal] animation notes of the scene
Spatial interpretation | comprehensive analysis of spatial structure of primary liver cancer
STM32 and motor development (upper system)