User, instance, table, table space

Source: Internet
Author: User

Understand

1:oracle

A database can create multiple instances, each of which can create more than one table space, each of which

You can create multiple users under

(the user also belongs to a table space corresponding to the instance)

and database files,

User

Multiple tables can be created (each table is randomly stored in one or more database files), such as:

Understanding 2:

There are users and table spaces under the instance,

The user authorizes access to the table space,

The tablespace is the management data file,

User

Authorized to create tables in a table space, tables are randomly stored in different data files. As shown in the following:

Action 1:

Installation

Oracle

will have a default instance, i.e.

ORCL

。 Typically, multiple instances are not created, under the default instance

Create table spaces and users, and so on.

1, run cmd into the DOS interface, first input: Sqlplus, enter, and then input: Sys/sys as SYSDBA, enter, that is, enter the "sql〉" Operation status.

2, Input: CREATE tablespace tablespace name LOGGING datafile ' C: Table spatial data file. Ora ' SIZE 500M autoextend on next 200m maxsize 2048m;

, table space creation is complete.

3, Input: CREATE user Name profile default identified by user password default tablespace authorized access Tablespace name

Temporary tablespace temp account UNLOCK; The user creates the complete and authorizes the user to access a table space.

The exact operation is as follows:

Action 2:

Create tables and insert data, and query to browse the inserted data.

1, create the table, enter:

CREATE table

Table name

(

Field name

1

Field type

,

Field name

2

Field type

,

Field name

3

Field type

);

Enter.

2, insert data, enter:

INSERT INTO

Table name

(

Field

1,

Field

2,

Field

3) VALUES (

Value

1,

Value

2,

Value

3);

Enter.

3, query data, enter:

SELECT * FROM

Table name

;

Enter.

The exact operation is as follows:

User, instance, table, table space

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.