There can be multiple applications in a database table, and these different application tables can be placed in different schemas,
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 by separating its tables according to the application. Www.2cto.com
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 you must have permissions), and under the operation root of no other schema,
Each user can only manipulate all the tables under its own schema. Table with the same name under a different schema,
Can be stored in different data (that is, the schema user's own data). Oracle schemas are common to almost user/users. Schema refers to a set of database object
(e.g. tables, views, packages, sequences, etc.), and these object belong to the user,
All object belonging to a user is called a schema. If you use Oracle's Enterprise Manager Enterprise Manager, you will find that the user inside is called schema. Schema Chinese means the scheme. "Scheme" is only a classification of Oracle, different users have different scenarios. For DBA Studio, there are four categories on the left: (routines, storage, security, scenarios) routines: The start of the management library ... Sort of. www.2cto.com Storage: Manage table spaces, 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: the user name-related table will appear after the "scheme"-> Select your username. ----------------------------two concepts that are not easily understood ──user and schema user are control permissions, and schema is a container, not owner if you need to access objects 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 without creating the synonym, you can then pass the ALTER session set Current_schema=schema_ Name to change the schema of the current session to omit schema (owner) when accessing the object, or whether to access the object or to see if there is permission to access the object, regardless of schema. An in-depth understanding of the difference between user and schema: User is the users in Oracle, and all systems in the user concept similar to the user has a lot of system permissions and resources; Schema covers a variety of objects, including tables, functions, packages, and so on "location", does not include their rights control. Like a house filled with furniture, it is the owner (user) of the house, not the house (schema), that has dominion over these families. You can also be the owner (user) of a house and have 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 do not specifically specify, the actions you do are directed at the things in your current house. As for whether you have permission to use (select), Move (update) or take (delete) These furniture, look at the house.
The owner has given 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 (under the premise of permissions), but do not build synonym,
At the same time, you do not want to put other schema names into the code, you can first use the ALTER session set schema=< other schema name >.