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