Oracle Advanced Notes-Administrator 1-Database logical Structure

Source: Internet
Author: User

-------------------------------Logical Structure------------------------------------

Reference Document: Chapter 12

Tablespace table Space Maximum storage unit Establishment object specifies that the table space is stored

Segment segment: Can store data table segment (set up table XS must suggest segment XS)

Extent Area: Space allocation unit (at least one area of the object)

Oracle data Block database blocks minimum i/0 units

Contiguous data blocks store the same type of data region as a segment in a single table space only one table space in a single database

For example: I set up a table xs (ID number, name char (10)) to specify that the Tablespace insert 1 data for users

CREATE TABLE Scott.xs (ID number, name char (TEN)) tablespace users;

INSERT into SCOTT.XS values (1, ' Tom ');

650) this.width=650; "title=" clip_image002 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image002 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 1406909833xmtp.jpg "" 244 "height="/>

Commit

650) this.width=650; "title=" clip_image003 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image003 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 140690983366ei.png "" 244 "height=" 94 "/>

The data that is inserted into the XS segment is allocated in the Users table space

How much space is allocated to the XS segment, if I continue to insert data, the segment will be full and continue to allocate space in extent units

Select Segment_name,segment_type, tablespace_name,extent_id, BLOCKS

From Dba_extents

where OWNER = ' SCOTT ' and segment_name= ' XS ';

650) this.width=650; "title=" clip_image005 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image005 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 1406909833a9jb.jpg "" 244 "height="/>

Segment name XS

is a table segment

Using space is the users

extent_id First District is 0 (numbering starting from 0)

Blocks occupies 8 blocks

What is the size of a block?

Sql> Show Parameter Db_block_size

650) this.width=650; "title=" clip_image007 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image007 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 1406909833hkrk.jpg "244" height= "Notoginseng"/>

Summary: I set up a segment XS using the uses table space, allocating 1 zones to occupy 8 blocks total size of 64K

Continue inserting, what if the amount of data is larger than the 64K database?

INSERT INTO SCOTT.XS select * from Scott.xs;

650) this.width=650; "title=" clip_image008 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image008 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 1406909834pb0m.png "" 244 "height=" "The/>

650) this.width=650; "title=" clip_image009 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image009 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 14069098341dfj.png "" 244 "height="/>

Sql> Select Segment_name,segment_type, tablespace_name,extent_id, BLOCKS

From Dba_extents

where OWNER = ' SCOTT ' and segment_name= ' XS ';

650) this.width=650; "title=" clip_image011 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image011 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 1406909834lpkt.jpg "" 244 "height="/>

Area is a contiguous block of data

block_id Start number

Select Segment_name,segment_type, tablespace_name,extent_id, block_id,blocks

From Dba_extents

where OWNER = ' SCOTT ' and segment_name= ' XS ';

650) this.width=650; "title=" clip_image013 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" clip_image013 "src=" http://img1.51cto.com/attachment/201408/1/9202005_ 1406909834yyas.jpg "" 244 "height="/>

Tablespaces and data files table space relationships

Table spaces are divided into large file tablespaces: Only 1 data files in a tablespace can be supported to 128T (?).

Small file Tablespace (default): There can be multiple data files in a table space

System and Sysaux are forced by default when building a library

System must be online, storage is core function (data dictionary)

Sysaux Information for storing EM

System Sysaux does not recommend storing user data

Summarize:

1 Oracle Server =instance +database

2 instance =meomoy +process

3 Physical Structure

4 Logical Structure

Related Article

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.