Relationships between databases, table spaces, and tables in Oracle

Source: Internet
Author: User
In Oracle, table space is the storage concept, the establishment of table space needs to have a corresponding data file, the data file is established directly after the allocation of a certain amount of disk space to it, so that the database storage space can be effectively managed. Then specify the table space when building the table, the table data will be in the table space corresponding to the data file, and MySQL kind of each table a file in a way, more controllable storage.

Oracle and MySQL are different, there is no concept of database in MySQL, but the concept of the instance, of course, you can also create different user in the instance to distinguish, each user corresponding table is relatively independent, such as two user can be built under the same name of the table, However, it can be used interactively through authorization.

The database was built after Oracle was installed to execute the DBCA instance.
The Build table space statement is CREATE tablespace tbs_default datafile
'/APP/ORADATA/SYS_TBS/TBS_DEFAULT.DBF ' size 500M
LOGGING
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
/
The main point here is to specify the corresponding datafile.

The building table is basically the same, for example
CREATE TABLE (col_1 number (8), col_2 char (2), Col_3 date)
Tablespace Tbs_default
/
The database should not be deleted, in this regard you can see the user operation of the statement on it.
Drop tablespace tbs_name including contents and datafiles;--delete tablespace and data file
drop table Tab_name Purge; --Delete the table.

Relationships between databases, table spaces, and tables in Oracle

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.