Oracle Schema Thorough understanding

Source: Internet
Author: User
Tags dba

A brief analysis of the schema in Oracle

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 corresponds to a user, and different applications can connect to the database with different users,
In this way, a large database can be managed according to the application by separating its tables. There is no direct relationship between the different schemas, and the tables between the different Shcema can have the same name,
You can also refer to each other (but must have permission), without manipulating the root of another schema,
Each user can only manipulate all of the tables under its own schema. A table of the same name under a different schema,
You can deposit different data (that is, the schema user's own data). Oracle's schema is almost universal to user/users. Schema refers to a set of database object
(e.g. tables, views, packages, sequences, etc.), and these objects belong to the user,
All objects belonging to a user are called schema. If you are using Oracle Enterprise Manager, you will find that the user is called schema. Schema Chinese means the scheme. "Scenario" is just a classification of Oracle, different users have different scenarios. With DBA Studio, there are four categories on the left: (routines, storage, security, scenario) routines: The start of the management library ...   Sort of. Www.2cto.com Storage: Manage tablespaces, data files, and so on. Security: Is the management user (password, table space allocation ...) Scenario: There are (tables, views, stored procedures ...), different users have different cases.   For example, a user name-related table will appear after you select your user name in scenario. ----------------------------two concepts that are not easy to understand ──user and schema user is the control permission, and the schema is a container, non-owner if need to access the object under this container
You need to write the name of the schema (owner) in front of the object, and if you do not want to write the synonym, you can do this by alter session set Current_schema=schema_ Name to change the schema of the current session so as to omit schema (owner) when accessing the object, and ultimately whether the object is accessible or not, regardless of schema. In-depth understanding of the difference between user and schema: users in Oracle are similar to the user concept in all systems, and users have access to the system's permissions and resources, and the schema covers a variety of objects that contain the "location" of objects such as tables, functions, packages, etc. Does not include permission controls on them. Like a house filled with furniture, the owner of the House (user), not the house (schema), has the power to dominate the home. You can also be the owner of a house (user), owning your own house (schema). Can be done by alter session
Into someone else's house. Www.2cto.com this time, you can see other people's House furniture (DESC). If you don't specify it, all you do is focus on what's in your current house. As to whether you have permission to use (select), Move (update), or remove (delete) The furniture, look at the house.
Does the owner give you such permission, or you are the Boss (DBA) of the entire building (DB).
The ALTER session set schema can be used instead of synonyms. If you want to invoke other schema objects (with permission), but do not build synonym,
At the same time do not want to put other schema names into the code, you can first use ALTER session set schema=< other schema name >. This article turns from http://www.2cto.com/database/201205/131238.html

Oracle Schema Thorough understanding

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.