Schema Definition in Oracle Database

Source: Internet
Author: User
From the definition, we can see that the Schema is a set of database objects. To distinguish each set, we need to name this set.

From the definition, we can see that the Schema is a set of database objects. To distinguish each set, we need to name this set.

From the definition, we can see that the Schema is a set of database objects. To distinguish each set, we need to name this set, these names are the nodes with similar user names that we see in the Enterprise Manager Solution. These nodes with similar user names are actually a schema. The schema contains various objects such as tables and v.

From the definition, we can see that the Schema is a set of database objects. To distinguish each set, we need to name this set, these names are the nodes similar to user names that we see in the Enterprise Manager Solution. These nodes similar to user names are actually a schema, which contains various objects such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links.

A user generally corresponds to a schema. The schema name of the user is the same as the user name and serves as the user's default schema. This is why the schema names are database usernames in the Enterprise Manager Solution. You cannot create a new schema in an Oracle database. To create a schema, you can only create one user, but it is not used to create a schema). When creating a user, create a schem with the same name as the user name and use it as the default shcema for the user. That is to say, the number of schemas is the same as the number of users, and the schema names are one-to-one and the same as the names of users. All aliases that can be called schema as users are inaccurate, but it is easier to understand.

A user has a default schema, and Its schema name is the same as the user name. Of course, a user can also use other schemas. If we access a table without specifying which schema the table belongs to, the system will automatically add the default sheman name to the table. For example, when we access the database, we can access the emp table under the scott user through select * from emp; in fact, the complete Syntax of this SQL statement is select * from scott. emp. The full name of an object in the database is schema. object, not user. object. Similarly, if we do not specify the schema of the object when creating the object, the schema of the object is the default schema of the user. This is like a user has a default tablespace, but this user can also use other tablespaces. If we do not specify a tablespace when creating an object, the object is stored in the default tablespace, to store objects in other tablespaces, We need to specify the tablespace of the object when creating the object.

Schema in oracle refers to a set of all objects under a user. schema itself cannot be understood as an object. oracle does not provide the schema creation syntax, the schema is not created when a user is created, but is created after the first object is created under the user. As long as an object exists under the user, the schema must exist, the schema does not exist if no object exists under the user. This is similar to the temp tablespace group. You can also observe it through oem. If you create a new user, if there is no object under this user, the schema does not exist. If an object is created, a schema with the same name as the user will also be generated.

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.