MySQL“创建模式"和“创建数据库"-有什么区别
在information_schema
数据库中达到峰值并在我的一个宠物项目的元数据 中达到峰值,我很难理解有什么(如果有的话)差异create schema
命令和 create database
命令之间存在 MySQL.
Taking a peak into the information_schema
database and peaking at the metadata for one of my pet projects, I'm having a hard time understanding what (if any) differences there are between the create schema
command and the create database
command for MySQL.
有什么不同吗?如果不是,这是否是关系数据库的一种相当典型的行为模式(我听说对于其他数据库,例如 Oracle,数据库中存在模式,而不是与数据库处于同一级别).
Are there any differences? If not, is this a rather typical pattern of behavior for relational databases (I've heard that for other databases, such as Oracle, a schema exists in a database, rather than being on the same level as a database).
谢谢!
推荐答案
MySQL 文档说:
CREATE DATABASE 创建一个数据库用给定的名字.要使用这个声明,你需要 CREATE数据库的特权.创建SCHEMA 是 CREATE 的同义词从 MySQL 5.0.2 开始的数据库.
CREATE DATABASE creates a database with the given name. To use this statement, you need the CREATE privilege for the database. CREATE SCHEMA is a synonym for CREATE DATABASE as of MySQL 5.0.2.
因此,这两条指令执行相同操作似乎很正常.
So, it would seem normal that those two instruction do the same.
相关文章