Table Space vs. user's relational tablespace and data file schema

Source: Internet
Author: User

    1. A table space has multiple data files, and a data file can belong to only one table space.
    2. A database can have more than one table space, and each library has a system table space.
    3. One user can use one or more table spaces, and a table space can be used by multiple users.
    4. There is no affiliation between user and table space, and table space is a concept for managing data storage logic, where tablespaces are only related to data files, data files are physical, a table space can contain multiple data files, and a data file can only belong to one table space.
    5. The user does not specify a tablespace when creating the table, using the user's default tablespace (specified when creating the user).

Schema, also known as pattern, is a logical concept that is smaller than the table space, and it is also a logical container. Multiple users may share a table space, how do you partition each user? There is a corresponding scenario for each user in the tablespace that holds the information for a single user.

Schema is a collection of database objects, in order to distinguish between the collections, we need to give this collection a name. The schema contains various objects such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links.

A user typically corresponds to a schema, the user's schema name equals the user name, and is used as the default schema for that user.

The Oracle database cannot create a new schema, creating a schema that can only be resolved by creating a user, creating a user with the same name as the user name and Schem as the default shcema for that user.

A user has a default schema, whose schema name is equal to the user name, and of course a user can use other schemas. If we visit a table and do not indicate which schema the table belongs to, the system automatically adds the default Sheman name to the table. For example, when we access the database, we access the EMP table under the Scott user, through the select * from EMP; In fact, the complete syntax for this SQL statement is select * from Scott.emp. The full name of an object in the database is Schema.object, not user.object. Similarly, if we do not specify the schema of the object when creating the object, the schema of the object is the default schema for the user, but in the default table space.

Table Space vs. user's relational tablespace and data file schema

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.