Sql-schema and Catalog

Source: Internet
Author: User
Tags new set

Schema: Refers to that when I create database CAICECLB, CAICECLB is a schema

Catalog: Refers to all of the database directories , as shown, will be MySQL original (Mysql,infomation_schema) and later a new set of database.

Catalog, database name, schema, table name,
The local name of the server. Database name. dbo. Table name

Schema: Refers to when the user CREATE DATABASE * * * * * * is a schema

Catalog: Refers to all the database directories that will be the collection of database created by MySQL original (Mysql,infomation_schema) and later create database.

Schema: (direct translation) mode; plan; outline my own understanding in the database: tablespace

Catalog : (direct translation) catalogue catalogue Catalogs

Schema

When I create database CAICECLB, CAICECLB is a schema.

In a database can have more than one application of the data table, these different applications of the table can be placed in a different schema, at the same time, each schema corresponding to a user, different applications can be different users to connect the database, so that a large database can be used to separate their tables to manage.
There is no direct relationship between the different schemas, the tables between the different Shcema can have the same name, or they can be referenced to each other (but must have permissions), and each user can only manipulate all the tables under its own schema without manipulating the schema's root authority. Tables with the same name under different schemas can be stored in different data (that is, the schema user's own data).

Catalog: refers to all the database directories

The relationship between the two:

Conceptually, a database system contains multiple catalog, each containing multiple schemas, and each schema contains multiple database objects (tables, views, fields, etc.), in turn a database object must belong to a schema, And the schema must belong to a catalog, so that we can get the fully qualified name of the database object to resolve the problem of naming conflicts; For example, the fully qualified name of a database object table can be represented as:catalog name. Schema name. Table Name . It is also important to note that the SQL standard does not require that the fully qualified name of each database object be unique, like a domain name, and that each IP address can have multiple domain names if you like

in Oracle, a user is a schema, tables are built in the schema, or they can be understood to have different tables for each user. When a user wants to access another user, another schema table, it can be accessed in the form of username.tablename, without the need for a distributed transaction at all. When you are inside SQL Server, create a database after you have created it. You don't have to create the schema as an extra, because SQL Server automatically creates a schema named dbo.

Sql-schema and Catalog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.