The difference between Oracle user and schema (schema)

Source: Internet
Author: User

Overview:

(a) What Oracle calls the User:

  A user is a name, defined in the database, can connect to and Access objects.

The Oracle user connects to the database and accesses the database object. (the user is used to connect to the database to access the database).

(ii) What is the schema (schema):

  A schema is a collection of the database objects (used by a user.). Schema objects is the logical structures that directly refer to the database ' s data.
The main idea: a schema is a collection of database objects. A schema object is a logical structure of database data. (the database objects are separated into different logical structures by the schema).

(c) The difference between the user and the schema (schema):
  Schemas and users Help database administrators manage database security.
user is used to connect database objects. The pattern is used to create a management object. (Mode is a one-to-one relationship with users in Oracle.) )

Detailed

From the official definition, we can see that the schema is a collection of database objects. To differentiate the collections, we need to name the collection, which is the many nodes of the user name that we see under the Enterprise Manager scenario, which is a schema for a node that resembles a user name.

The schema contains various objects such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links.

  

A user typically corresponds to a schema, the user's schema name equals the user name, and is used as the default schema for that user. This is why we see the schema name as the database username under the Enterprise Manager scenario. Instead of creating a schema in the Oracle database, creating a schema can only be solved by creating a user's method (although Oracle has the CREATE SCHEMA statement, it is not used to create a schema). Create a user with a schem that has the same name as the user name and act as the default shcema for that user.

That is, the number of schemas is the same as the number of user, and the schema name corresponds to the user name one by one and the same, all we can call the schema as the user alias, although this is not accurate, but it is easier to understand some.

A user has a default schema, whose schema name is equal to the user name, and of course a user can use other schemas. If we visit a table and do not indicate which schema the table belongs to, the system automatically adds the default Sheman name to the table. For example, when we access the database, we access the EMP table under the Scott user, through the select * from EMP; In fact, the complete syntax for this SQL statement is select * from Scott.emp.

The full name of an object in the database is Schema.object, not user.object. Similar if we do not specify the schema of the object when creating the object, the schema of the object is the user's default schema. This is like a user with a default tablespace, but the user can also use other tablespaces, and if we do not specify a tablespace when we create the object, the object is stored in the default tablespace, and in order for the object to be stored in another table space, we need to specify the table space for the object when it is created.

The difference between Oracle user and schema (schema)

Related Article

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.