Six Modes of the oracle learning starter series and six of the oracle getting started Series

Source: Internet
Author: User

Six Modes of the oracle learning starter series and six of the oracle getting started Series

Six of oracle learning starter Series

Mode

In the previous article, we learned to record the database structure, memory structure, and processes in the ORACLE database. The space is too large. Take a rest this time. You should not take too many notes each time. Otherwise, what is the difference with books. What we need to ensure is that each record can achieve all gains and all improvements.

In the last time, we had a general understanding of the ORACLE system structure. At the beginning, we will be involved in all aspects of the ORACLE database. Start with the mode object.

Old Rules: Let's start with two questions:

A) What is the mode?

B) Why?

You can solve these two problems.

My mailbox: appdevzw@163.com

Public Account: HopToad

Welcome from all walks of life

 

1 mode schema

Before learning the schema object, you must first talk about the user concept.

We know that when creating a database, I will be asked to enter the passwords of SYS and SYSTEM users. These two users are SYSTEM administrators. Because these two accounts have a lot of power, they generally create some users after creating the database, such as xiaoming, xiaohong, and xiaogang. We create users. What is the relationship with the mode?

A schema is defined as a set of database objects of a specific user. So, the definition of the mode is based on the user, there is no mode without the user. However, many ORACLE technicians will replace users and models, even though they are different things.

Generally, this is the case. When we deploy a database application, we need to use many objects, such as tables, indexes, triggers, and constraints, these objects belong to a user, such as xiaoming. We have a schema called xiaoming. The schema is a logical structure.

ORACLE creates a schema with the same name when creating a user, so the schema corresponds to the user one by one.

When accessing the database, we sometimes need to specify the schema to access, such as select * from scott. emp;

This is the emp table in scott mode. If scott is not added, the mode accesses the schema in the default mode.

This is the oracle user and mode, user and schema.

I finally figured out what schema is, so let's talk about why schema is needed.

Continue.

2. Why do I need the mode?

In many cases, I need to know what the concept is and why it is needed. In this way, we will remember more firmly, become more interested, and make changes and innovations.

Why do we need a mode? We know that users need a password to log on, and the mode corresponds to users one by one. By the way, this is a security consideration.

Think about it. James has a table called salary, and Xiaohong also has a table named salary. Their tables belong to their own schema. if James has no permission to access Xiaohong schema, then James cannot see Xiaohong's payroll. Here we need to know that permissions are required to access other modes.

In addition to security, there is also an aspect of overall management. If there is no schema, XiaoHong has a payroll table and a payroll table. If there is a payroll table tomorrow, Xiaogang and a payroll table, isn't it a mess. It is convenient to have a schema. The wage table of Xiaohong belongs to the schema of Xiaohong. (If you say that their payroll belongs to their respective users, this is true, but do you want to refine this idea ?)

This note is very comfortable. For more information, see.

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.