The Architecture of Oracle

Slides:



Advertisements
Similar presentations
Introduction to Oracle
Advertisements

Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Oracle Architectural Components
Harvard University Oracle Database Administration Session 5 Data Storage.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Backup and Recovery Part 1.
Introduction History The principles of the relational model were first outlined by Dr. E.F Codd in a June 1970 paper is called “A Relational Model of Data.
Oracle Architecture. Database instance When a database is started the current state of the database is given by the data files, a set of background (BG)
INTRODUCTION TO ORACLE. 2 Before Databases  Information was kept in files:  Each field describes one piece of information about student  Fields are.
IS 4510 – Database Administration Module – 1 Database Architecture 9/14/20141Compiled by: Zafar Iqbal Khan.
Oracle Architecture Client Computer Application Server Oracle Database Lan Or Internet Lan Or Internet Client Server Environment Application By Java or.Net.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Oracle Database Administration Database files Logical database structures.
Oracle Documentation Oracle DBA Course (9i, 10g, 11g) Lecture 1: Oracle Architectural Components.
OTHER DATABASE MODELS OTHER DATABASE MODELS The relational database is not the only database model in use today. Two other common models are distributed.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Basic Oracle Architecture
Database Technical Session By: Prof. Adarsh Patel.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
7202ICT – Database Administration
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Anton TopurovIT-DB 23 April 2013 Introduction to Oracle2.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
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.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
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.
Database Storage Structures
D Copyright © Oracle Corporation, All rights reserved. Loading Data into a Database.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown President System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2003.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
What is Oracle ? Oracle is a relational database management system. It is a management system which uses the relational data model. In the relational data.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Database structure and space Management
Oracle Architectural Components
Chapter 10 Transaction Management and Concurrency Control
Introduction To Oracle 10g
CS347 Spring 2017 – Quiz 5 Preparation - Solutions UTEID _________
Database administration
Presentation transcript:

The Architecture of Oracle David Konopnicki (Revised by Mordo Shalom – 2004)

Source Oracle 9i Database Concepts Available on the course Web Site. We will learn the internal structure of Oracle 9i.

The Oracle Server The Oracle server consists of an Oracle database and an Oracle instance. Database structure: Physical DB struct: determined by the OS. Three types of files: datafiles, redo log files, control files. Logical DB struct: Tablespaces, Schema objects.

Database Structure Structures: Structures are well-defined objects (such as tables, views, indexes, and so on) that store or access the data of a database. Structures and the data contained within them can be manipulated by operations. Operations: Operations are clearly defined actions that allow users to manipulate the data and structures of a database. The operations on a database must adhere to a predefined set of integrity rules. Integrity Rules:Integrity rules are the laws that govern which operations are allowed on the data and structures of a database. Integrity rules protect the data and the structures of a database.

Schema Object - Table A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user-accessible data. Table data is stored in rows and columns. Every table is defined with a table name and set of columns. Each column is given a column name, a datatype and a width. Once a table is created, valid rows of data can be inserted into it. The table's rows can then be queried, deleted, or updated. To enforce defined business rules on a table's data, integrity constraints and triggers can also be defined for a table.

Tables

Datatypes

Schema Object - View A view is a custom-tailored presentation of the data in one or more tables. A view can also be thought of as a "stored query". Like tables, views can be queried, updated, inserted into, and deleted from, with restrictions. All operations performed on a view actually affect the base tables of the view. Views are often used to do the following: Provide an additional level of table security by restricting access to a predetermined set of rows and columns of a table. Hide data complexity. Simplify commands for the user. Present the data in a different perspective from that of the base table. Store complex queries.

Views

Other Schema Objects Indexes are created on one or more columns of a table. Once created, an index is automatically maintained and used by Oracle. Changes to table data are automatically incorporated into all relevant indexes with complete transparency to the users. Clusters are groups of one or more tables physically stored together because they share common columns and are often used together. Hash clusters: a row is stored in a hash cluster based on the result of applying a hash function to the row's cluster key value. All rows with the same hash key value are stored together on disk.

Indexes Oracle uses B*- tree indexes that are balanced to equalize access times to any row

Clusters

Hash Clusters

Not Null Integrity Constraint

Unique Key

Unique Keys

Primary Key

Referencial Integrity

Foreign Key

Self-referential constaint

Schema Object – Program Unit The term "program unit" is used to refer to stored procedures, functions, and packages. A procedure or function is a set of SQL and PL/SQL (Oracle's procedural language extension to SQL) statements grouped together as an executable unit to perform a specific task. Stored procedures.

The Data Dictionary An Oracle data dictionary is a set of tables and views that are used as a read-only reference about the database. Stores information about both the logical and physical structure of the database. the valid users of an Oracle database information about integrity constraints defined for tables in the database how much space is allocated for a schema object and how much of it is being used

Tablespaces and Data Files

Tablespace and Datafiles

Data Files Every Oracle database has one or more physical datafiles. A database's datafiles contain all the database data (e.g. tables and indexes). characteristics of datafiles: Associated with only one database. Automatically extend when the database runs out of space. One or more datafiles form a logical unit of database storage called a tablespace.

Data Blocks, Extents and Segments

Segments A segment is a set of extents allocated for a certain logical structure. the different types of segments include the following: Data Segments: All of the table's data is stored in the extents of its data segment. Index Segments:Each index has an index segment that stores all of its data. Rollback Segments (Will be deprecated) Temporary Segments

Extents An extent is a specific number of contiguous data blocks, obtained in a single allocation, used to store a specific type of information.

Logical Database Structures Disk Space: Data Blocks At the finest level of granularity, an Oracle database's data is stored in data blocks. One data block corresponds to a specific number of bytes of physical database space on disk. (Standard and non-standard block sizes) A data block size is specified for each Oracle database when the database is created. A database uses and allocates free database space in Oracle data blocks.

Data Blocks Header: general block info: block address and the type of segment; for example, data, index, or rollback. Table Directory: info about the tables having rows in this block. Row Directory: row info about the actual rows in the block Row Data

PCTFREE The PCTFREE parameter is used to set the percentage of a block to be reserved (kept free) for possible updates to rows that already are contained in that block.

PCTUSED After a data block becomes full, as determined by PCTFREE, Oracle does not consider the block for the insertion of new rows until the percentage of the block being used falls below the parameter PCTUSED. Before this value is achieved, Oracle uses the free space of the data block only for updates to rows already contained in the data block.

PCTFREE and PCTUSED

Row Format and Sizes Oracle stores each row of a database table as one or more row pieces

Allocation of space in Hash Clusters

Access Through Cache The data in a datafile is read, as needed, during normal database operation and stored in the memory cache of Oracle. Modified or new data is not necessarily written to a datafile immediately. To reduce the amount of disk access and increase performance, data is pooled in memory and written to the appropriate datafiles all at once, as determined by the DBWn background process of Oracle.

Redo Log Files Every Oracle database has a set of two or more redo log files. This is called the redo log. Records all changes made to data. Should a failure prevent modified data from being permanently written to the datafiles, the changes can be obtained from the redo log and work is never lost. To protect against a failure involving the redo log itself, Oracle allows a multiplexed redo log so that two or more copies of the redo log can be maintained on different disks.

Control File A control file contains entries that specify the physical structure of the database. database name names and locations of a database's datafiles and redo log files time stamp of database creation Like the redo log, Oracle allows the control file to be multiplexed for protection of the control file.

An Oracle Instance The combination of the background processes and memory buffers is called an Oracle instance. A system global area (SGA) is allocated and Oracle background processes are started at instance startup. The system global area is a an area of memory used for database information shared by the database users.

An Oracle Instance If the user and server processes are on different computers of a network, the user process and server process communicate using SQL*Net. SQL*Net is Oracle's interface to standard communications protocols that allows for the proper transmission of data between computers.

Server Architecture An Oracle Server uses memory structures and processes to manage and access the database. All memory structures exist in the main memory of the computers that constitute the database system. Processes are jobs or tasks that work in the memory of these computers.

The SGA Users currently connected to an Oracle Server share the data in the system global area. For optimal performance, the entire system global area should be as large as possible (while still fitting in real memory) Contains: The database buffers (for data), Redo log buffer (for log entries), The shared pool (for SQL), and cursors. These areas have fixed sizes and are created during instance startup.

User Processes A user process is created and maintained to execute the software code of an application program (such as a Pro*C/C++ program) or an Oracle tool (such as sqlplus). The user process also manages the communication with the server processes.

User Processes (Proxies) Oracle creates server processes to handle requests from connected user processes. Carry out requests of the associated user process (e.g., read data into buffers). Oracle can be configured to vary the number of user processes per server process.

User Processes - Dispatcher In multithreaded configurations, The communication between the user processes and the shared server processes is optionally done through the dispatcher processes

Background Processes - DBWn Database Writer (DBWn) writes modified blocks from the database buffer cache to the datafiles. DBWn does not need to write blocks when a transaction commits DBWn is optimized to minimize disk writes.

Background Processes - LGWR Log Writer (LGWR) The Log Writer writes redo log entries to disk. Redo log data is generated in the redo log buffer of the system global area. As transactions commit and the log buffer fills, LGWR writes redo log entries into an online redo log file.

Background Processes-CKPT Checkpoint (CKPT) At specific times, all modified database buffers are written to the datafiles by DBWn; this is a checkpoint. CKPT is responsible for signaling DBWn at checkpoints and updating all the datafiles and control files to indicate the most recent checkpoint.

Bacground Processes - ARCn Archiver (ARCn) copies the online redo log files to archival storage when they are full. (OPTIONAL)

Background Processes - SMON System Monitor (SMON) performs instance recovery at instance startup. SMON also coalesces free extents within the database to make free space contiguous and easier to allocate.

Background Processes - PMON Process Monitor (PMON) performs process recovery when a user process fails. PMON is responsible for cleaning up the cache and freeing resources that the process was using. PMON also checks on dispatcher and server processes and restarts them if they have failed.

Bacground Processes - RECO Recoverer (RECO) used to resolve distributed transactions pending due to a network or system failure in a distributed database.

Bacground Processes - LMS Lock Manager Server (LMS) used for inter- instance locking in Oracle9i Real Application Clusters. Oracle9i Real Application Clusters are multiple instances accessing a common database residing in cluster disks.