vitess中需要理解的基本概念
DDL和DML的区别
SQL statements are often divided into three categories:
DML (Data Manipulation Language). These SQL statements are used to retrieve and manipulate data.
This category encompasses the most fundamental commands including DELETE, INSERT, SELECT, and UPDATE.
DML SQL statements have only minor differences between SQL variations. DML SQL commands include the following:
DELETE to remove rows.
INSERT to add a row.
SELECT to retrieve row.
UPDATE to change data in specified columns.
DDL (Data Definition Language). These SQL statements define the structure of a database,
including rows, columns, tables, indexes, and database specifics such as file locations.
DDL SQL statements are more part of the DBMS and have large differences between the SQL variations. DML SQL commands include the following:
CREATE to make a new database, table, index, or stored query.
DROP to destroy an existing database, table, index, or view.
DBCC (Database Console Commands) statements check the physical and logical consistency of a database.
DCL (Data Control Language). These SQL statements control the security and permissions of the objects or parts of the database(s).
DCL SQL statements are also more part of the DBMS and have large differences between the SQL variations. DML SQL commands include the following:
GRANT to allow specified users to perform specified tasks.
DENY to disallow specified users from performing specified tasks.
REVOKE to cancel previously granted or denied permissions.
好的架构图让人一看就明白系统的整个架构,vitess的架构图虽然简单,但准确的表述了模块和模块关系。
注意看图的顺序是从上到下,逆时针方向。
接下来的笔记中再来慢慢的抽丝剥茧,阅读代码时要始终想着代码是哪个模块,在整个系统中扮演的角色,以免过度迷失在细节中。