MySQL 笔记

通用知识

When a syntax element consists of a number of alternatives, the alternatives are separated by vertical bars (“|”). When one member from a set of choices may be chosen, the alternatives are listed within square brackets (“[” and “]”):

TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)

When one member from a set of choices must be chosen, the alternatives are listed within braces (“{” and “}”):

{DESCRIBE | DESC} tbl_name [col_name | wild]

概览

MySQL, the most popular Open Source SQL database management system, is developed, distributed, and supported by Oracle Corporation.
1 MySQL是数据库管理系统
2 关系型
The SQL part of “MySQL” stands for “Structured Query Language”. SQL is the most common standardized language used to access databases.
3 开源的
4 数据库服务器非常快,可靠可扩展,容易使用
5 MySQL Server works in client/server or embedded systems.
6 A large amount of contributed MySQL software is available.

特征

1 Written in C and C++. 测试是用的Purify
2 Uses very fast B-tree disk tables (MyISAM) with index compression
3 Designed to make it relatively easy to add other storage engines. This is useful if you want to provide an SQL interface for an in-house database.
4 Uses a very fast thread-based memory allocation system.
5 Executes very fast joins using an optimized nested-loop join.
6 Implements in-memory hash tables, which are used as temporary tables.

数据类型

语句和函数

1 全部地支持操作符和函数

mysql> SELECT CONCAT(first_name, ' ', last_name)
    -> FROM citizen
    -> WHERE income/dependents > 10000 AND age > 30;

2 全部支持 Group by和order by
(COUNT(), AVG(), STD(), SUM(), MAX(), MIN(), and GROUP_CONCAT()).
3 支持 left outer join
right outer join 标准SQL和ODBC语法
4 支持别名
5 支持 delete insert replace update to return the number of rows that were changed (affected), or to return the number of rows matched instead by setting a flag when connecting to the server
6 支持show语句 Support for the INFORMATION_SCHEMA database, implemented according to standard SQL.
7 explain 语句to show how the optimizer resolves a query.
8 表格函数名和行列名相互独立。唯一限制是不能有空格,
9 You can refer to tables from different databases in the same statement.

安全🔐

1 A privilege and password system that is very flexible and secure, and that enables host-based verification.
2 Password security by encryption of all password traffic when you connect to a server.

连接

1 Clients can connect using TCP/IP sockets on any platform.
2 On Unix systems, clients can connect using Unix domain socket files.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,141评论 0 10
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 13,425评论 0 23
  • pyspark.sql模块 模块上下文 Spark SQL和DataFrames的重要类: pyspark.sql...
    mpro阅读 13,143评论 0 13
  • 周五过后,迎来愉快的周末,我和97勇敢的开始只属于我们两个的约会。 我们还是在地铁站见面,他比我来的早些,我还未上...
    苏与禾阅读 2,812评论 0 1
  • “我们无法预先串联人生的点滴,只能在回顾时将其连接起来。 而这些点滴总会以某种方式在未来串联, 我们必须相信某些事...
    沉潜Nicole阅读 4,003评论 0 2