美文网首页
数据库笔记

数据库笔记

作者: 倔强的寻觅疯狂 | 来源:发表于2016-11-28 11:39 被阅读0次

数据库笔记:

Cluster --> Catalog --> Schema --> Table

db --> schema A

     --> schema B

     --> schema C --> table A

                            --> table B

                            --> table C

查询元数据信息:

        show databases;   // query all databases;

        show schemas;    // query all schemas;

        use test;               // use test database or test schema;

        show tables;        // query all tables;

        select * from information_schema.tables where table_name = 'test_user';

        show columns from test_user;

树形结构设计

1. id name left right

   使用前序遍历,查询速度快,但是删除/插入/修改操作较为慢。

2. id name pid

   递归查询速度较慢,删除/插入/修改速度较快。

相关文章

网友评论

      本文标题:数据库笔记

      本文链接:https://www.haomeiwen.com/subject/gzordttx.html