Oracle user-to-table space relationships
user = Merchant
Table = Commodity
Table Space = Warehouse
1.1 businesses can have a lot of goods, 1 products can only belong to one business
2.1 items can be placed in warehouse A, can also be placed in warehouse B, but not at the same time into a and b
3. The warehouse does not belong to any merchant
4. The merchant has a default warehouse, if the specific warehouse is not specified, the goods are placed in the default warehouse
All data for a user in Oracle is stored in a table space, and many users can share a table space, or you can specify that a user uses only one table space.
Tablespace: Creating a table space creates a data file on the physical disk that acts as the physical storage space for database objects (users, tables, stored procedures, and so on);
User: The creation user must specify a tablespace for it, and if there is no explicit specified default tablespace, it is specified as the Users table space, and after the user is created, other database objects, such as tables, stored procedures, and so on, can be created on the user;
Table: is a collection of data records;
Creation process: Table space---> User---> table;
Owning relationship: The table space contains the user inclusion table;
Http://www.cnblogs.com/cici-new/archive/2012/12/25/2831740.html
1. The first is the overall structure of Oracle.
One of the databases in Oracle is an instance.
A user of Oracle is a schema (i.e., a scenario).
The structure of Oracle is = = =
Table (user belongs to DB instance, table belongs to a user)
So build a table space under Oracle, build a user, set a user's default tablespace, and build a table under the user;
--Create a data table space
Create Tablespace CICI
Logging
DataFile ' D:\oraclexe\app\oracle\oradata\CICI\CICI. DBF '
Size 32m
Autoextend on
Next 32m MaxSize 2048m
Extent management Local;
--Create a user and specify a tablespace
CREATE USER CiCi identified by CiCi
Profile DEFAULT
DEFAULT tablespace CICI
Account UNLOCK;
--Granting permissions to users
GRANT Connect, resource to CiCi;
Grant create session to CiCi;
--Login User
Sql>conn
Please enter user name CiCi
Please enter the password XXXXXX
---create a table
CREATE TABLE A (name VARCHAR2 () primary key);
--Enquiry Form
SELECT * from CiCi. A
Oracle user-to-table space relationships