Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.

Slides:



Advertisements
Similar presentations
CHAPTER 4 Tablespaces and Datafiles. Introduction After installing the binaries, creating a database, and configuring your environment, the next logical.
Advertisements

Rollback Segments Nilendu Misra (MAR99)
The Architecture of Oracle
Module 2: Database Architecture
Introduction to Oracle
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
School of Computing and Management Sciences © Sheffield Hallam University The slowest task in any record retrieval is reading from disk (It can be 500.
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
Primer on Structure& Storage Analysis Primer on Structure & Storage Analysis This presentation is supposed to give a simple and brief overview for storage.
Basic Storage Concepts and Settings
Data archival using Partitioning and Partition Maintenance O/o the A.G.(A&E)-II NagpurMaharashtra.
Introduction to Structured Query Language (SQL)
Harvard University Oracle Database Administration Session 5 Data Storage.
Oracle Database Architecture An Oracle server: –Is a database management system that provides an open, comprehensive, integrated approach to information.
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
INTRODUCTION TO ORACLE
Oracle Data Definition Language (DDL)
Oracle Database Administration Database files Logical database structures.
IT Database Administration Section 03. Tablespaces and the DBA  Important for DBAs – logical units of database storage Made up of physical operating-system.
9/11/2015ISYS366 - Week051 ISYS366 – Week 5-6 Database Tuning - User and Rollback Data Spaces, Recovery, Backup.
Oracle Database Architecture An Oracle server: –Is a database management system that provides an open, comprehensive, integrated approach to information.
Database Administration TableSpace & Data File Management
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
7202ICT Database Administration Lecture 7 Managing Database Storage Part 2 Orale Concept Manuel Chapter 3 & 4.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
1 CG171 - Database Implementation and Development (Physical Database Design) – Lecture 7 Storage Allocation & Data Access Methods By Dr. Akhtar Ali.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
9 Storage Structure and Relationships. 9-2 Objectives Listing the different segment types and their uses Controlling the use of extents by segments Stating.
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 7 Basic Table Management.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
Oracle 10g Database Administrator: Implementation and Administration Chapter 7 Basic Table Management.
Commercial RDBMSs Access and Oracle. Access DBMS Architchecture  Can be used as a standalone system on a single PC: -JET Engine -Microsoft Data Engine.
Database structure and space Management. Segments The level of logical database storage above an extent is called a segment. A segment is a set of extents.
Week 3 Lecture 2 Basic Storage Concepts and Settings.
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
Week 4 Lecture 2 Advanced Table Management. Learning Objectives  Create tables with large object (LOB) columns and tables that are index-organized 
Database Storage Structures
Locally Managed Tablespaces in Oracle8i Raghav Vinjamuri
Harvard University Oracle Database Administration Session 6 Object Storage.
6 Copyright © 2007, Oracle. All rights reserved. Managing Database Storage Structures.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
Managing Tablespaces and Data Files
10 Managing Rollback Segments Objectives Planning the number and size of rollback segments Creating rollback segments using appropriate storage.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
G Copyright © 2006, Oracle. All rights reserved. Miscellaneous Topics.
Chapter 3 Logical Database Layouts Database Processing Chapter 3 - OFA.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
Unit 6 Seminar. Indexed Organized Tables Definition: Index Organized Tables are tables that, unlike heap tables, are organized like B*Tree indexes.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Physical Database Structure .
IT Database Administration Section 05. Rollback Segments: An Introduction  What are they?  Space within a database used to store “before” images.
8 Copyright © Oracle Corporation, All rights reserved. Managing Tablespaces and Data files.
1 Chapters 19 and 20  Ch. 19: By What Authority? Users Roles Grant and revoke Synonyms  Ch. 20: Changing the Oracle Surroundings Indexes Clusters Sequences.
Introduction To Oracle
Table spaces.
Database structure and space Management
Database Tuning - User and Rollback Data Spaces, Recovery, Backup
Oracle 10g Database Administrator: Implementation and Administration
Database Management  .
Database structure and space Management
Managing Database Storage Structures
Physical Database Structure .
Structured Query Language
Introduction To Oracle 10g
Storage Structure and Relationships
Managing Tables.
Managing Tablespaces and Data Files
ISYS366, Oracle Disk Internals
Database administration
Presentation transcript:

Database structure and space Management

Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical database structure, the physical storage of data can be managed without affecting the access to logical storage structures.

Database structures LogicalPhysical

Logical Database Structure 1. Tablespace - stores related database objects 2. Segments - stores an individual database object, such as a table or an index 3. Extent - a contiguous unit of storage space within a segment 4. Data Block - smallest storage unit that the database can address. Extents consist of data blocks

Logical Database Structure Segments Data blocks Extents Tablespace

Each Database is logically divided into one or more table spaces Table space can be online (accessible) {default} or offline (Not accessible( You can create a new tablespace to increase the size of a database The database Administrator can bring any tablespace in an oracle online or offline

Database, Tablespaces, and data files Oracle stores data logically in tablespaces and physically in datafiles associated with the corresponding tablespace.

Database, Tablespaces, and data files The relationship among databases, tablespaces, and data files : 1. Each database is logically divided into one or more tablespaces. 2. One or more data files are explicitly created for each tablespace to physically store the data of all logical structures in a tablespace. 3. The combined size of a tablespace's data files in the total storage capacity of the tablespace. 4. The combined storage capacity of a database's tablespaces is the total storage capacity of the database

Allocate More Space for a Database The size of a tablespace is the size of the datafiles that constitute the tablespace. The size of a database is the collective size of the tablespaces that constitute the database. You can enlarge a database in three ways: ◦ Add a datafile to a tablespace ◦ Add a new tablespace ◦ Increase the size of a datafile ◦ When you add another datafile to an existing tablespace, you increase the amount of disk space allocated for the corresponding tablespace

Create table space CREATE TABLESPACE tablespace_name DATAFILE file_name [SIZE integer M] [REUSE] DEFAULT STORAGE ( INITIAL integer M NEXT integer M MINEXTENTS integer MAXEXTENTS integer PCTINCREASE integer ) ONLINE or OFFLINE PERMANENT or TEMPORARY;

Create table space TABLESPACE : Tablespace in which you want the table to reside. INITIAL SIZE: The size for the initial extent of the table. NEXT SIZE: The value for any additional extents the table may take through growth. MINEXTENTS and MAXEXTENTS: Identify the minimum and maximum extents allowed for the table. PCTINCREASE: Identifies the percentage the next extent will be increased each time the table grows, or takes another extent.

Example CREATE TABLESPACE tp DATAFILE 'df.ora' SIZE 10M DEFAULT STORAGE( INITIAL 10K NEXT 50K MINEXTENTS 1 MAXEXTENTS 999 PCTINCREASE 10) ONLINE permanent;

Create Table SQL Statement: CREATE TABLE table_name (column_name data_type [DEFAULT exp] [CONSTRAINT]) TABLESPACE tablespace_name STORAGE (INITIAL size K or M NEXT size K or M MINEXTENTS value MAXEXTENTS value PCTINCREASE value);

Example CREATE TABLE maha ( id NUMBER CONSTRAINT co_id PRIMARY KEY, name varchar(20)) TABLESPACE tp STORAGE ( INITIAL 7000 NEXT 7000 MINEXTENTS 1 MAXEXTENTS 5 PCTINCREASE 5 ) ;

Table space Most major RDBMSs have default settings for table sizes and table locations. If you do not specify table size and location, then the table will take the defaults. The defaults may be very undesirable, especially for large tables.