SlideShare a Scribd company logo
1 of 46
Download to read offline
Overview of Oracle Database

 Lee, JeongKyu (jelee@bridgeport.edu)
Part 1. Introduction to Database System


  Introduction to Database


  History of RDBMS


  Entity-Relationship Modeling

  Database Language
Introduction to Database

   File-Based Approach
      Each program defines and manages its own data
      Limitation
            Separation and isolation of data
            Duplication of data
            Data dependence
            Incompatibility of files
            Fixed queries/proliferation of application program

   Database Approach
      A shared collection of logically related data, designed
       to meet the information needs of an organization
   Database Management System(DBMS)
      A software system that enables users to define, create and
       maintain the database and provides controlled access to
       database
          DDL
          DML : procedural, non-procedural
          Control : security, integrity, concurrency control,
                   recovery control, user-accessible catalog




   Components of the DBMS Environment
      Hardware - Software - Data - Procedures - People
   Advantages of DBMS
     - Control of data redundancy - Economy of scale
     - Data consistency            - Balance of conflicting requirements
     - More information from the same amount of data
     - Sharing of data             - Improved data accessibility and
         responsiveness
     - Improved data integrity     - Increased productivity
     - Improved security           - Improved maintenance through data
         independence
     - Enforcement of standards    - Increased concurrency
                                   - Improved backup and recovery services

   Disadvantages of DBMS
     - Complexity, Size, Cost of DBMSs, Additional H/W costs
     - Cost of conversion, Performance, Higher impact of a failure
   Three-Level Database Architecture
      External Level
         The users’ view of the database

      Conceptual Level
         The community view of the database

      Internal Level
         The physical representation of the database on the computer
   Functions of a DBMS
     1. Data storage, retrieval, and update
     2. A user-accessible catalog
     3. Transaction support
     4. Concurrency control services
     5. Recovery services
     6. Authorization services
     7. Support for data communication
     8. Integrity services
     9. Services to promote data independence
     10. Utility services
   Components of a DBMS
     Programmers     Users               DBA
     Application                       Database
                    Queries
      Programs                         Schema


        DML          Query               DDL       DBMS
     preprocessor   processor          compiler


       Program      Database          Dictionary
      object code   manager            manager


        Access        File
       methods      manager


       System                   Database and
        buffers                 system catalog
   Components of Database Manager


                    Authorization
                       control


        Integrity    Command          Query
        checker      processor       optimizer


                    Transaction
                                     Scheduler
                      manager

                                                 Data
                       Buffer        Recovery
                                                 Manager
                      manager        manager
History of RDBMS

   History of DBMS
      1960s - Apollo moon-landing project, GUAM
      mid 1960s - IMS by IBM (hierarchical DBMS)
      mid 1960s - IDS by GE (network DBMS)
      1965 - CODASYL(Conference on Data SYStems
       Language)
      1967 -DBTG(Data Base Task Group)
      1970 - E.F.Codd of the IBM Research Lab.
      Late 1970s - System R project at IBM
      1980s - commercial relational DBMS(DB2, Oracle,
        Informix..)
      Now - OODBMS, ORDBMS
   Terminology
      Relation : a relation is a table with columns and rows
      Attribute : an attribute is a named column of a relation
      Domain : a domain is the set of allowable values for
       one or more attributes
      Tuple : a tuple is a row of a relation
      Degree : the degree of a relation is the number of
       attributes it contrains
      Cardinality : the cardinality of a relation is the number
       of tuples it contains
      Relational database : a collection of normalized
       relation
   Properties of Relations
      The relation has a name that is distinct from all other
       relation names
      Each cell of the relation contains exactly on atomic
       value
      Each attribute has a distinct name
      The values of an attribute are all from the same domain
      The order of attributes has no significance
      Each tuple is distinct; there are no duplicate tuples
      The order of tuples has no significance, theoretically
   When is a DBMS Relational?
      Foundational rules
         Rule 0 : Foundational rule Rule 12 : Nonsubversion rule

      Structural rules
         Rule 1 : Information representation       Rule 6 : View updateing

      Integrity rules
         Rule 3 : Systematic treatment of null values               Rule 10 : Integrity independance

      Data manipulation rules
         Rule2 : Guaranteed access                 Rule 4 : Dynamic online catalog based on the
                                                            relational model
         Rule5 : Comprehensive data sublanguage         Rule7 : High-level insert, update, delete

      Data independence rules
         Rule8 : Physical data independence        Rule 9 : Logical data independence
         Rule11 : Distribution independence
Entity-Relationship Modeling

   Concepts of the E-R Modeling
      Entity Types
        An object or concept that is identified by the enterprise as having an
        independent existence
      Attributes
        A property of an entity or a relationship type
      Relationship Types
        A meaningful association among entity types
   Normalization
      A technique for producing a set of relations with desirable
       properties, given the data requirements of an enterprise
      UNF is a table that contains one or more repeating groups
      1NF is a relation in which the intersection of each row and column contains one
         and only one value

      2NF is a relation that is in 1NF and every non-primary-key attribute is fully
         functionally dependent on the primary key.

      3NF is a relation that is in 1NF, 2NF in which no non-primary-key attribute is
         transitively dependent on the primary key

      BCNF is a relation in which every determinant is a candidate key
      4NF is a relation that is in BCNF and contains no trivial multi-valued
         dependency

      5NF is a relation that contains no join dependency
   Conceptual Database Design
      The process of constructing a model of the information
       used in an enterprise, independent of all physical
       considerations
 Logical Database Design
      The process of constructing a model of the information
       used in an enterprise based on a specific data model,
       but independent of a particular DBMS and other
       physical considerations.
   Physical Database Design
      The process of producing a description of the
       implementation of the database on secondary storage;
       it describes the storage structures and access
       methods used to archieve efficient access to the data
Database Language

   SQL
      1974 - SEQUEL by D.Chamberlin (IBM)
      1975 - SQUARE by Boyce (System R project)
      1976 - SEQUEL/2 (SQL) by Chamberlin and Boyce)
      late 1970 - SQL(Oracle), QUEL(Ingres)
      1982 - Relational Database Language(RDL) : ANSI
      1987 - ISO standard
      1989 - Integrity Enhancement Feature (ISO)
      1992 - SQL2(SQL92) : ISO
   DML
      SELECT
      INSERT
      UPDATE
      DELETE
   DDL
      CREATE(DROP) SCHEMA
      CREATE(ALTER, DROP) DOMAIN
      CREATE(ALTER, DROP) TABLE
      CREATE(DROP) VIEW
      CREATE(DROP) INDEX
   Advanced SQL
      View
      Integrity Enhancement Feature
          Primary key
          Unique
          Foreign key
      Access Control
      Embedded SQL
      Host Language Variables
      Application Programming Interface
      Dynamic SQL
Part 2. Understanding Oracle Database


  Overview of oracle Database Architecture

  Memory Structure

  Process Structure

  Storage Structure

  New Features
Overview of Oracle Architecture

PMON     SMON       RECO      D000          S000      P000     * Total SGA Size :
                                                                    1700 Mbyte
                                                               * Fixed Size :
                                                   Redo Log            70 Kbyte
                           SGA                      Buffer
  Shared SQL Area     Database Buffer Cashe
                                                               * Variavle Size :
                                                                     490 MByte


                                                                       TL-812
  4,000,000 KByte     1,200,000 KByte          2,100 KByte


                      DBW0            CKPT            LGWR
  Server
                             Data File
                               Raw Device                                ARCH
       USER
                                                              Archive Log Mode(50M)
Memory Structure : Shared Pool

          Shared Pool                      Shared Pool Contents
                                          - Text of the SQL or PL/SQL statement
Library Cache         Dictionary
                      Cache               - Parsed form of the SQL or PL/SQL statement
                                          - Execution plan for the SQL or PL/SQL
    Shared
                                            statements
   SQL Area
                                          - Data dictionary cache containing rows of data
                                            dictionary information
                     Control Structures
                     for example:            Library Cache
PL/SQL Procedures                         - shared SQL area
                     Character Set
and Package          Conversion           - private SQL area
                     Memory
                     Network Security     - PL/SQL procedures and package
                     Attributes
Control Structures                        - control structures : lock and library cache handles
for examples;        and so on ..
                                             Dictionary Cache
Locks
Library                                   - names of all tables and views in the database
Cache handles         Reusable
and so on ...         Runtime             - names and datatypes of columns in database tables
                      Memory              - privileges of all Oracle users
                                             SHARED_POOL_SIZE
Memory Structure :Database Buffer Cache

 Database Buffer Cache holds copies of data blocks read from disk
 All users concurrently connected to the system share access to the buffer cache
 Dirty List
 LRU List
 Size = DB_BLOCK_SIZE * DB_BLOCK_BUFFERS




                SGA                  Database Buffer Cache
               Shared Pool

                   Shared SQL Area
Memory Structure :Redo Log Buffer

   Circular buffer containing information about changes made to the database
   save it redo entry
   Redo Entries is used when Database Recovery
   DBWR write contents of Redo Log Buffer to Online Redo Log
   LOG_BUFFER



                                                           change vector #1
         redo record
                                                           change vector #1

                                                           change vector #1
Oracle Processes

       SNPn       SMON          PMON            RECO              LCK0


       Pnnn
                                          SGA
                    Database Buffer Cache               Redo Log
                                                         Buffer
                                                                                    Offline
                                                                                    Storage
                                                                                    Device
               Dedicated
        Snnn     Server
                Process
                                DBWR              LGWR                   ARCH

Dnnn
                       User
                      Process            CKPT

                                                                                Control
                                                                                 Files
Users                                                  Redo Log
                                 Data                    Files
                                 Files
Background Process

   DBWR (Database Writer)
    - write all dirty buffers to datafiles
    - Use a LRU algorithm to keep most recently used blocks in memory
    - Defers write for I/O optimization
         dirty list reaches a threshold length
         A process scnas a specifed number of buffer in the LRU without finding free buffer
         A time-out occurs
         DBWR checkpoint occurs

   LGWR (Log Writer)
    - writes redo log entries to disk
         Commit occurs
         The redo log buffers pool becomes one-third full
         DBWR completes cleaning the buffer blocks at a checkpoint
         LGWR time-out
    - A commit confirmation is not issued until the tx has been recorded in the rego
     log file
Cont’d

   PMON (Process Monitor)
    - Cleans up abnormally terminated connection
    - Rolls back uncommited transactions
    - Releases locks held by a terminated process
    - Frees SGA resources allocated to the failed processes
    - Database maintenance


   SMON (System Monitor)
    - Performs automatic instance recovery
    - Reclaims space used by temporary segments no longer in use
    - Merges contiguous area of free space in the datafile
Cont’d

   CKPT (Check Point)
    - is enabled by setting the parameter CHECKPOINT_PROCESS=TRUE
    - If enabled, take over LGWR’s task of updating files at a checkpoint
    - Updates header of datafiles and control files at the end of checkpoint
    - More frequent checkpoint reduce recovery time from instance failure
    - CKPT improve the performance of database with many database files
   ARCH (Archiver)
    - Copies redo log files to tape or disk for media failure
    - Operates only when a log switch occurs
    - Is optional and is only needed when in ARCHIVELOG mode
    - May write to a tape drive or to a disk
   LCKn (Lock), Dnnn (Dispatcher), Snnn (Server),
    RECO (Recover), Pnnn(Parallel), SNPn(Job Queue),
    QMNn(Queue Monitor),
Server/User Process

   User Processes
    - A user process is used when a user runs an application program
    - Runs the tool/application and is considered the client
    - Passes SQL to the server process and receives the results


   Server Processes
    - A server process must place the data in the database buffer cache
    - Parce and execute SQL statements
    - Read data blocks from disk into the shred database buffers of the SGA
    - Return the results of SQL statements to the user process
        Parse : check syntax, security access, object resolution, optimization
        Execute : applies the parse tree to the data, perform a physical read and
          change
        Fetch : Passes data to the user (only SELECT)
Oracle Files

   Datafile
   Redo Log Files
   Control Files
   Parameter File
   Archive File
   Log File (alert*.log, sqlnet.log, listener.log...)
   Trace File
Storage Architecture

    Physical storage structures
       Data files
       Segments
       Extents
       Blocks
    Logical storage structures
       Tablespaces
       Tables / Clusters / Indexes
       Rows
       Columns
Physical Storage Architecture
   Relationship among Segments, Extents, and Blocks


                Segment
                   96K


                Extent        Extent
                  24K            72K            2K
                                                2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K
                         2K       2K   2K       2K



                              Database Blocks
Logical Storage Architecture

   Relationship between tablespaces and datafiles



       Database

        System Tablespace        USER Tablespace



         DATA1.ORA   DATA2.ORA
                                     DATA3.ORA
Cont’d
   Objects stored in tablespaces


    Tablespace (one or more datafiles)



          Table                                Table                     INDEX

          INDEX                 INDEX                  INDEX             INDEX
                                INDEX                  INDEX
          INDEX                                                            Table
                                INDEX                  INDEX


             Database Files                              Objects
             (Physical structures associated             (stored in tablespace may
             with only one tablespace)                   span serveral datafiles)
Block


         Header        General Block Information
    Table Dictionary   (Block add, Segment type)
    Row Dictionary     85 ~ 100 bytes

        Free Space     Table info in Cluster


                       Row info in Block
                       (2 byte per row)

        Row Data
                       using when New Row
                       Insert or Update
                       (pctfree, pctused)

                       Table or Index Data
PCTFREE / PCTUSED
        PCTFREE                        PCTUSED



         20% Free space

                                      61% Free space




           PCTFREE = 20                   PCTUSED = 40

 Insert new row until 80%    Can insert new row when below 60%
                              When Usage is below 40% (61% Free
 20% use when Update          space), block is listed in FREELIST
Extent

A   set of contiguous database blocks within a datafile.
 Extent are    allocated when.
 - The segment is created (INITIAL EXTENT)
 - The segments grows (NEXT EXTENT)
 - The table is altered to allocate extents.

 Extent are    de-allocated when the
 - The segment is dropped and truncated.
 - The segment is larger than optimal and contains free extents
  (for rollback segments only)

 Each   segment is created with at least on extend( initial extent )
 ( Rollback segment : 2)

 ALTER      TABLE table_name DEALLOCATE UNUSED
Segment

   a set of one or more extents that contains all the data for a specific type of logical storage
    structure within a tablespace
   Data Segment
    - A collection of extents that holds all of the data for a table or a cluster
   Index Segment
    - A collection of extents that holds all of the index data for search optimization on large tables
    and clusters
   Rollback Segment
    - A collection of extents that holds rollback data for rollback, read-consistency, or recovery
   Temporary segment
    - A collection of extents that holds data belonging to temporary tables created during a sort
    operation
   Bootstrap segment
    - An extent that contains dictionary definitions for dictionary tables to be loaded when the
    database is opened.
Oracle8 New Feature

VLDB, Warehouse              OLTP
Parallel DML                 Advanced Queuing
Parallel Index Scans         XA rewrite
Star Query Optimization      Memory reduction
Partitioning                 Serially reusable memory
Parallel Backup/Recovery     New OCI Interface
Incremental Backup           Improve Function Performance
Point-in-time Recovery
Objects                      Network Computing
Object Relational Database   Simple User Integration
Object Type                  Simple Maintenance
Object View                  Simple Development
Oracle8i New Features

    Data Warehousing                      OLTP
 Summary management                   Publish and subscribe capabilities
 Analytic function                    Database event trigger

 Hash and Composite Paritioning       Single table hash cluster

 Resource Management                  Object type column in partition table

 Transportable tablespace             Partitioned index-organized table

 Functional index, virtual column     Stable optimizer execution plans


Application Development                   Security
 Oracle Jserver, VM in Database       Virtual Private Database
 Java stored procedure, function..    LDAP integration

 SQLJ: embedded SQL in Java           N-tier authentication/authorization

 WebDB                                SSL and X.509v3, RAIDUS support

                                       Data encrypt, decrypt
Oracle 9i - The eBusiness Platform

 Oracle9i continues Oracle8i's focus on the Internet by providing a series of
    specific capabilities and product bundles targeted at eBusiness environments. In
    addition, Oracle9i continues to add features and capabilities that extends existing
    investment in mission-critical infrastructure. Oracle9i has been designed with
    focus on certain key development areas.



 Key Infrastructure Area                           Key Application Area
 Availability                                       Internet Contents Management
   Scalability and Performance                      B2B and B2C eBusiness
   Security                                         Packaged Application
   Development Platform                             Business Intelligence
   Manageability
 Windows2000 Integration
Oracle Client/Server Architecture


                                NETWORK


  Client                                                           Server b
Application

  Client/Server                                            Server/Server



                                 Server A
 Benefit of Client/Server Component
  - Database S/W work on Server              - Only Server upgrade to increase size
  - Minimize network resource                - Minimize Client H/W spec
  - concurrency, consistency, transparency   - concurrency, consistency, transparency
SQL*Net

   What is SQL*Net?
    - Oracle’s Client/Server middleware product
    - transparent connection from client tool to DB ( from on DB to another )
    - works across multiple network protocol and operation system
   What is TNS?
    - Transparent Network Substrate
    - Oracle’s Network applications to access the underlying network protocols transparently
    - TNS-based application, Oracle Protocol Adapters, Network software like TCP/IP
   Configuration File
    - TNSNAME.ORA        ( Client )
    - TNSNAV.ORA ( Client )
    - SQLNET.ORA ( Client, Server )
    - LISTENER.ORA ( Server )
SQL*Net Configuration

   TNSNAME.ORA                   LISTENER.ORA
info =                         LISTENER=
 (DESCRIPTION=                 (ADDRESS_LIST=
     (ADDRESS_LIST=
                               (ADDRESS=
         (ADDRESS=
                                 (PROTOCOL=tcp)
            (PROTOCOL=tcp)
            (HOST=brinfoa01)     (HOST=brinfoa01)
            (PORT=1521)          (PORT=1521)
          )                    )
      )                        )
   (CONNECT_DATA=              SID_LIST_LISTENER=
        (SID=BRBINFO1)              (SID_LIST=
   )                                (SID_DESC=
 )                                  (SID_NAME=BRBINFO1)
                                    (ORACLE_HOME=/oracle7/oracle7)
                                    (ENVS='EPC_DISABLED=TRUE')
                                    )
                                    )
   SQLNET.ORA                 STARTUP_WAIT_TIME_LISTENER=0
# SQLNET.EXPIRE_TIME = 0       CONNECT_TIMEOUT_LISTENER=0
                               LOG_DIRECTORY_LISTENER=/oracle7/oracle7/network/log
SQLNET.AUTHENTICATION_S
                               LOG_FILE_LISTENER=listener
  ERVICES=(none, beq)
                               TRACE_LEVEL_LISTENER=OFF
Net8

Networking Challenge
   Support large mission-critical
    client/server, and provide migration
    path towards distributed object
    architecture


   Net8 Focus
     1. Scalability : Connection Pooling, Multiplexing(Connection Manager)
     2. Manageability : Configuration-free installation option,
        Centralized client administration, Automated client configuration
     3. Security : Oracle Security Server
ODBC / oo4o / JDBC

 ODBC (Open Database Connectivity )
 - Provide a way for client program (eg VB, Excel, Access) to access database
 - is a standardized API, developed according to the specification of the SQL
  Access Group, than allows one to connect to SQL database

 oo4o (Oracle Object for OLE)
 - a middleware product manufactured by Oracle that allows native access to Oracle7
  databases from client applications via the Microsoft OLE standard
 - OLE 2.0 Automation Server, Oracle Data Control, Two C++ Class Library

 JDBC (Java Database Connectivity )
 - a set of classes and interfaces written in Java to allow other Java programs to send
  SQL statements to a relational database management system
 - JDBC Thin for Java applets, JDBC OCI for Java application

More Related Content

What's hot

Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1sriprasoon
 
How Apollo Group Evaluted MongoDB
How Apollo Group Evaluted MongoDBHow Apollo Group Evaluted MongoDB
How Apollo Group Evaluted MongoDBJeremy Taylor
 
Relational
RelationalRelational
Relationaldieover
 
Sql server difference faqs- 6
Sql server difference faqs- 6Sql server difference faqs- 6
Sql server difference faqs- 6Umar Ali
 
Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...
Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...
Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...Mark Matienzo
 
Cidr11 paper32
Cidr11 paper32Cidr11 paper32
Cidr11 paper32jujukoko
 
"A Study of I/O and Virtualization Performance with a Search Engine based on ...
"A Study of I/O and Virtualization Performance with a Search Engine based on ..."A Study of I/O and Virtualization Performance with a Search Engine based on ...
"A Study of I/O and Virtualization Performance with a Search Engine based on ...Lucidworks (Archived)
 
Chapter01 introduction
Chapter01 introductionChapter01 introduction
Chapter01 introductionNgeam Soly
 
Implementation of nosql for robotics
Implementation of nosql for roboticsImplementation of nosql for robotics
Implementation of nosql for roboticsJoão Gabriel Lima
 
Mydb 2010 - AbhijeetKalsi
Mydb 2010 - AbhijeetKalsiMydb 2010 - AbhijeetKalsi
Mydb 2010 - AbhijeetKalsiAbhijeet Kalsi
 
Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey sharonyb
 
Characterization of hadoop jobs using unsupervised learning
Characterization of hadoop jobs using unsupervised learningCharacterization of hadoop jobs using unsupervised learning
Characterization of hadoop jobs using unsupervised learningJoão Gabriel Lima
 
New York City and Baltimore Semantic Web Meetups 20130221/20120226
New York City and Baltimore Semantic Web Meetups 20130221/20120226New York City and Baltimore Semantic Web Meetups 20130221/20120226
New York City and Baltimore Semantic Web Meetups 20130221/201202263 Round Stones
 
A history and evaluation of system r
A history and evaluation of system rA history and evaluation of system r
A history and evaluation of system rsugeladi
 
E force dnw rewrite-draft-v7-080607
E force dnw rewrite-draft-v7-080607E force dnw rewrite-draft-v7-080607
E force dnw rewrite-draft-v7-080607Debjani Roy
 

What's hot (20)

DBMS
DBMSDBMS
DBMS
 
Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1
 
project report
project reportproject report
project report
 
How Apollo Group Evaluted MongoDB
How Apollo Group Evaluted MongoDBHow Apollo Group Evaluted MongoDB
How Apollo Group Evaluted MongoDB
 
Relational
RelationalRelational
Relational
 
ORACLE 9i
ORACLE 9iORACLE 9i
ORACLE 9i
 
Search Computing Overview
Search Computing OverviewSearch Computing Overview
Search Computing Overview
 
Sql server difference faqs- 6
Sql server difference faqs- 6Sql server difference faqs- 6
Sql server difference faqs- 6
 
Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...
Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...
Accessioning-Based Metadata Extraction and Iterative Processing: Notes From t...
 
Cidr11 paper32
Cidr11 paper32Cidr11 paper32
Cidr11 paper32
 
"A Study of I/O and Virtualization Performance with a Search Engine based on ...
"A Study of I/O and Virtualization Performance with a Search Engine based on ..."A Study of I/O and Virtualization Performance with a Search Engine based on ...
"A Study of I/O and Virtualization Performance with a Search Engine based on ...
 
Ch12
Ch12Ch12
Ch12
 
Chapter01 introduction
Chapter01 introductionChapter01 introduction
Chapter01 introduction
 
Implementation of nosql for robotics
Implementation of nosql for roboticsImplementation of nosql for robotics
Implementation of nosql for robotics
 
Mydb 2010 - AbhijeetKalsi
Mydb 2010 - AbhijeetKalsiMydb 2010 - AbhijeetKalsi
Mydb 2010 - AbhijeetKalsi
 
Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey
 
Characterization of hadoop jobs using unsupervised learning
Characterization of hadoop jobs using unsupervised learningCharacterization of hadoop jobs using unsupervised learning
Characterization of hadoop jobs using unsupervised learning
 
New York City and Baltimore Semantic Web Meetups 20130221/20120226
New York City and Baltimore Semantic Web Meetups 20130221/20120226New York City and Baltimore Semantic Web Meetups 20130221/20120226
New York City and Baltimore Semantic Web Meetups 20130221/20120226
 
A history and evaluation of system r
A history and evaluation of system rA history and evaluation of system r
A history and evaluation of system r
 
E force dnw rewrite-draft-v7-080607
E force dnw rewrite-draft-v7-080607E force dnw rewrite-draft-v7-080607
E force dnw rewrite-draft-v7-080607
 

Similar to Lee oracle

Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle databaseSamar Prasad
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle databaseSamar Prasad
 
Database-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptxDatabase-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptxsqlserver4
 
Database systems - Chapter 2 (Remaining)
Database systems - Chapter 2 (Remaining)Database systems - Chapter 2 (Remaining)
Database systems - Chapter 2 (Remaining)shahab3
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationGuru Ji
 
Chapter 2 database environment
Chapter 2 database environmentChapter 2 database environment
Chapter 2 database environment>. <
 
csedatabasemanagementsystemppt-170825044344.pdf
csedatabasemanagementsystemppt-170825044344.pdfcsedatabasemanagementsystemppt-170825044344.pdf
csedatabasemanagementsystemppt-170825044344.pdfSameerKhanPathan7
 
Database management-system
Database management-systemDatabase management-system
Database management-systemkalasalingam
 
Database management system
Database management systemDatabase management system
Database management systemRizwanHafeez
 
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
DATABASE    MANAGEMENT SYSTEM	 ARCHITECTUREDATABASE    MANAGEMENT SYSTEM	 ARCHITECTURE
DATABASE MANAGEMENT SYSTEM ARCHITECTUREDeepakM509554
 
data base management system (DBMS)
data base management system (DBMS)data base management system (DBMS)
data base management system (DBMS)Varish Bajaj
 

Similar to Lee oracle (20)

Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle database
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle database
 
Oracle archi ppt
Oracle archi pptOracle archi ppt
Oracle archi ppt
 
Database-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptxDatabase-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptx
 
Database systems - Chapter 2 (Remaining)
Database systems - Chapter 2 (Remaining)Database systems - Chapter 2 (Remaining)
Database systems - Chapter 2 (Remaining)
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
 
ICT L5+.pptx
ICT L5+.pptxICT L5+.pptx
ICT L5+.pptx
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Chapter 2 database environment
Chapter 2 database environmentChapter 2 database environment
Chapter 2 database environment
 
database
databasedatabase
database
 
csedatabasemanagementsystemppt-170825044344.pdf
csedatabasemanagementsystemppt-170825044344.pdfcsedatabasemanagementsystemppt-170825044344.pdf
csedatabasemanagementsystemppt-170825044344.pdf
 
Database Management System ppt
Database Management System pptDatabase Management System ppt
Database Management System ppt
 
Database management-system
Database management-systemDatabase management-system
Database management-system
 
Database management system
Database management systemDatabase management system
Database management system
 
DBMS
DBMSDBMS
DBMS
 
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
DATABASE    MANAGEMENT SYSTEM	 ARCHITECTUREDATABASE    MANAGEMENT SYSTEM	 ARCHITECTURE
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
 
data base management system (DBMS)
data base management system (DBMS)data base management system (DBMS)
data base management system (DBMS)
 
data base manage ment
data base manage mentdata base manage ment
data base manage ment
 
Sql no sql
Sql no sqlSql no sql
Sql no sql
 
RDBMS to NoSQL. An overview.
RDBMS to NoSQL. An overview.RDBMS to NoSQL. An overview.
RDBMS to NoSQL. An overview.
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Lee oracle

  • 1. Overview of Oracle Database Lee, JeongKyu (jelee@bridgeport.edu)
  • 2. Part 1. Introduction to Database System  Introduction to Database  History of RDBMS  Entity-Relationship Modeling  Database Language
  • 3. Introduction to Database  File-Based Approach  Each program defines and manages its own data  Limitation  Separation and isolation of data  Duplication of data  Data dependence  Incompatibility of files  Fixed queries/proliferation of application program  Database Approach  A shared collection of logically related data, designed to meet the information needs of an organization
  • 4. Database Management System(DBMS)  A software system that enables users to define, create and maintain the database and provides controlled access to database  DDL  DML : procedural, non-procedural  Control : security, integrity, concurrency control, recovery control, user-accessible catalog  Components of the DBMS Environment  Hardware - Software - Data - Procedures - People
  • 5. Advantages of DBMS - Control of data redundancy - Economy of scale - Data consistency - Balance of conflicting requirements - More information from the same amount of data - Sharing of data - Improved data accessibility and responsiveness - Improved data integrity - Increased productivity - Improved security - Improved maintenance through data independence - Enforcement of standards - Increased concurrency - Improved backup and recovery services  Disadvantages of DBMS - Complexity, Size, Cost of DBMSs, Additional H/W costs - Cost of conversion, Performance, Higher impact of a failure
  • 6. Three-Level Database Architecture  External Level The users’ view of the database  Conceptual Level The community view of the database  Internal Level The physical representation of the database on the computer
  • 7. Functions of a DBMS 1. Data storage, retrieval, and update 2. A user-accessible catalog 3. Transaction support 4. Concurrency control services 5. Recovery services 6. Authorization services 7. Support for data communication 8. Integrity services 9. Services to promote data independence 10. Utility services
  • 8. Components of a DBMS Programmers Users DBA Application Database Queries Programs Schema DML Query DDL DBMS preprocessor processor compiler Program Database Dictionary object code manager manager Access File methods manager System Database and buffers system catalog
  • 9. Components of Database Manager Authorization control Integrity Command Query checker processor optimizer Transaction Scheduler manager Data Buffer Recovery Manager manager manager
  • 10. History of RDBMS  History of DBMS  1960s - Apollo moon-landing project, GUAM  mid 1960s - IMS by IBM (hierarchical DBMS)  mid 1960s - IDS by GE (network DBMS)  1965 - CODASYL(Conference on Data SYStems Language)  1967 -DBTG(Data Base Task Group)  1970 - E.F.Codd of the IBM Research Lab.  Late 1970s - System R project at IBM  1980s - commercial relational DBMS(DB2, Oracle, Informix..)  Now - OODBMS, ORDBMS
  • 11. Terminology  Relation : a relation is a table with columns and rows  Attribute : an attribute is a named column of a relation  Domain : a domain is the set of allowable values for one or more attributes  Tuple : a tuple is a row of a relation  Degree : the degree of a relation is the number of attributes it contrains  Cardinality : the cardinality of a relation is the number of tuples it contains  Relational database : a collection of normalized relation
  • 12. Properties of Relations  The relation has a name that is distinct from all other relation names  Each cell of the relation contains exactly on atomic value  Each attribute has a distinct name  The values of an attribute are all from the same domain  The order of attributes has no significance  Each tuple is distinct; there are no duplicate tuples  The order of tuples has no significance, theoretically
  • 13. When is a DBMS Relational?  Foundational rules Rule 0 : Foundational rule Rule 12 : Nonsubversion rule  Structural rules Rule 1 : Information representation Rule 6 : View updateing  Integrity rules Rule 3 : Systematic treatment of null values Rule 10 : Integrity independance  Data manipulation rules Rule2 : Guaranteed access Rule 4 : Dynamic online catalog based on the relational model Rule5 : Comprehensive data sublanguage Rule7 : High-level insert, update, delete  Data independence rules Rule8 : Physical data independence Rule 9 : Logical data independence Rule11 : Distribution independence
  • 14. Entity-Relationship Modeling  Concepts of the E-R Modeling  Entity Types An object or concept that is identified by the enterprise as having an independent existence  Attributes A property of an entity or a relationship type  Relationship Types A meaningful association among entity types
  • 15. Normalization  A technique for producing a set of relations with desirable properties, given the data requirements of an enterprise  UNF is a table that contains one or more repeating groups  1NF is a relation in which the intersection of each row and column contains one and only one value  2NF is a relation that is in 1NF and every non-primary-key attribute is fully functionally dependent on the primary key.  3NF is a relation that is in 1NF, 2NF in which no non-primary-key attribute is transitively dependent on the primary key  BCNF is a relation in which every determinant is a candidate key  4NF is a relation that is in BCNF and contains no trivial multi-valued dependency  5NF is a relation that contains no join dependency
  • 16. Conceptual Database Design  The process of constructing a model of the information used in an enterprise, independent of all physical considerations  Logical Database Design  The process of constructing a model of the information used in an enterprise based on a specific data model, but independent of a particular DBMS and other physical considerations.  Physical Database Design  The process of producing a description of the implementation of the database on secondary storage; it describes the storage structures and access methods used to archieve efficient access to the data
  • 17. Database Language  SQL  1974 - SEQUEL by D.Chamberlin (IBM)  1975 - SQUARE by Boyce (System R project)  1976 - SEQUEL/2 (SQL) by Chamberlin and Boyce)  late 1970 - SQL(Oracle), QUEL(Ingres)  1982 - Relational Database Language(RDL) : ANSI  1987 - ISO standard  1989 - Integrity Enhancement Feature (ISO)  1992 - SQL2(SQL92) : ISO
  • 18. DML  SELECT  INSERT  UPDATE  DELETE  DDL  CREATE(DROP) SCHEMA  CREATE(ALTER, DROP) DOMAIN  CREATE(ALTER, DROP) TABLE  CREATE(DROP) VIEW  CREATE(DROP) INDEX
  • 19. Advanced SQL  View  Integrity Enhancement Feature  Primary key  Unique  Foreign key  Access Control  Embedded SQL  Host Language Variables  Application Programming Interface  Dynamic SQL
  • 20. Part 2. Understanding Oracle Database  Overview of oracle Database Architecture  Memory Structure  Process Structure  Storage Structure  New Features
  • 21. Overview of Oracle Architecture PMON SMON RECO D000 S000 P000 * Total SGA Size : 1700 Mbyte * Fixed Size : Redo Log 70 Kbyte SGA Buffer Shared SQL Area Database Buffer Cashe * Variavle Size : 490 MByte TL-812 4,000,000 KByte 1,200,000 KByte 2,100 KByte DBW0 CKPT LGWR Server Data File Raw Device ARCH USER Archive Log Mode(50M)
  • 22. Memory Structure : Shared Pool Shared Pool  Shared Pool Contents - Text of the SQL or PL/SQL statement Library Cache Dictionary Cache - Parsed form of the SQL or PL/SQL statement - Execution plan for the SQL or PL/SQL Shared statements SQL Area - Data dictionary cache containing rows of data dictionary information Control Structures for example:  Library Cache PL/SQL Procedures - shared SQL area Character Set and Package Conversion - private SQL area Memory Network Security - PL/SQL procedures and package Attributes Control Structures - control structures : lock and library cache handles for examples; and so on ..  Dictionary Cache Locks Library - names of all tables and views in the database Cache handles Reusable and so on ... Runtime - names and datatypes of columns in database tables Memory - privileges of all Oracle users  SHARED_POOL_SIZE
  • 23. Memory Structure :Database Buffer Cache  Database Buffer Cache holds copies of data blocks read from disk  All users concurrently connected to the system share access to the buffer cache  Dirty List  LRU List  Size = DB_BLOCK_SIZE * DB_BLOCK_BUFFERS SGA Database Buffer Cache Shared Pool Shared SQL Area
  • 24. Memory Structure :Redo Log Buffer  Circular buffer containing information about changes made to the database  save it redo entry  Redo Entries is used when Database Recovery  DBWR write contents of Redo Log Buffer to Online Redo Log  LOG_BUFFER change vector #1 redo record change vector #1 change vector #1
  • 25. Oracle Processes SNPn SMON PMON RECO LCK0 Pnnn SGA Database Buffer Cache Redo Log Buffer Offline Storage Device Dedicated Snnn Server Process DBWR LGWR ARCH Dnnn User Process CKPT Control Files Users Redo Log Data Files Files
  • 26. Background Process  DBWR (Database Writer) - write all dirty buffers to datafiles - Use a LRU algorithm to keep most recently used blocks in memory - Defers write for I/O optimization  dirty list reaches a threshold length  A process scnas a specifed number of buffer in the LRU without finding free buffer  A time-out occurs  DBWR checkpoint occurs  LGWR (Log Writer) - writes redo log entries to disk  Commit occurs  The redo log buffers pool becomes one-third full  DBWR completes cleaning the buffer blocks at a checkpoint  LGWR time-out - A commit confirmation is not issued until the tx has been recorded in the rego log file
  • 27. Cont’d  PMON (Process Monitor) - Cleans up abnormally terminated connection - Rolls back uncommited transactions - Releases locks held by a terminated process - Frees SGA resources allocated to the failed processes - Database maintenance  SMON (System Monitor) - Performs automatic instance recovery - Reclaims space used by temporary segments no longer in use - Merges contiguous area of free space in the datafile
  • 28. Cont’d  CKPT (Check Point) - is enabled by setting the parameter CHECKPOINT_PROCESS=TRUE - If enabled, take over LGWR’s task of updating files at a checkpoint - Updates header of datafiles and control files at the end of checkpoint - More frequent checkpoint reduce recovery time from instance failure - CKPT improve the performance of database with many database files  ARCH (Archiver) - Copies redo log files to tape or disk for media failure - Operates only when a log switch occurs - Is optional and is only needed when in ARCHIVELOG mode - May write to a tape drive or to a disk  LCKn (Lock), Dnnn (Dispatcher), Snnn (Server), RECO (Recover), Pnnn(Parallel), SNPn(Job Queue), QMNn(Queue Monitor),
  • 29. Server/User Process  User Processes - A user process is used when a user runs an application program - Runs the tool/application and is considered the client - Passes SQL to the server process and receives the results  Server Processes - A server process must place the data in the database buffer cache - Parce and execute SQL statements - Read data blocks from disk into the shred database buffers of the SGA - Return the results of SQL statements to the user process  Parse : check syntax, security access, object resolution, optimization  Execute : applies the parse tree to the data, perform a physical read and change  Fetch : Passes data to the user (only SELECT)
  • 30. Oracle Files  Datafile  Redo Log Files  Control Files  Parameter File  Archive File  Log File (alert*.log, sqlnet.log, listener.log...)  Trace File
  • 31. Storage Architecture  Physical storage structures  Data files  Segments  Extents  Blocks  Logical storage structures  Tablespaces  Tables / Clusters / Indexes  Rows  Columns
  • 32. Physical Storage Architecture  Relationship among Segments, Extents, and Blocks Segment 96K Extent Extent 24K 72K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K Database Blocks
  • 33. Logical Storage Architecture  Relationship between tablespaces and datafiles Database System Tablespace USER Tablespace DATA1.ORA DATA2.ORA DATA3.ORA
  • 34. Cont’d  Objects stored in tablespaces Tablespace (one or more datafiles) Table Table INDEX INDEX INDEX INDEX INDEX INDEX INDEX INDEX Table INDEX INDEX Database Files Objects (Physical structures associated (stored in tablespace may with only one tablespace) span serveral datafiles)
  • 35. Block Header General Block Information Table Dictionary (Block add, Segment type) Row Dictionary 85 ~ 100 bytes Free Space Table info in Cluster Row info in Block (2 byte per row) Row Data using when New Row Insert or Update (pctfree, pctused) Table or Index Data
  • 36. PCTFREE / PCTUSED PCTFREE PCTUSED 20% Free space 61% Free space PCTFREE = 20 PCTUSED = 40  Insert new row until 80%  Can insert new row when below 60%  When Usage is below 40% (61% Free  20% use when Update space), block is listed in FREELIST
  • 37. Extent A set of contiguous database blocks within a datafile.  Extent are allocated when. - The segment is created (INITIAL EXTENT) - The segments grows (NEXT EXTENT) - The table is altered to allocate extents.  Extent are de-allocated when the - The segment is dropped and truncated. - The segment is larger than optimal and contains free extents (for rollback segments only)  Each segment is created with at least on extend( initial extent ) ( Rollback segment : 2)  ALTER TABLE table_name DEALLOCATE UNUSED
  • 38. Segment  a set of one or more extents that contains all the data for a specific type of logical storage structure within a tablespace  Data Segment - A collection of extents that holds all of the data for a table or a cluster  Index Segment - A collection of extents that holds all of the index data for search optimization on large tables and clusters  Rollback Segment - A collection of extents that holds rollback data for rollback, read-consistency, or recovery  Temporary segment - A collection of extents that holds data belonging to temporary tables created during a sort operation  Bootstrap segment - An extent that contains dictionary definitions for dictionary tables to be loaded when the database is opened.
  • 39. Oracle8 New Feature VLDB, Warehouse OLTP Parallel DML Advanced Queuing Parallel Index Scans XA rewrite Star Query Optimization Memory reduction Partitioning Serially reusable memory Parallel Backup/Recovery New OCI Interface Incremental Backup Improve Function Performance Point-in-time Recovery Objects Network Computing Object Relational Database Simple User Integration Object Type Simple Maintenance Object View Simple Development
  • 40. Oracle8i New Features Data Warehousing OLTP  Summary management  Publish and subscribe capabilities  Analytic function  Database event trigger  Hash and Composite Paritioning  Single table hash cluster  Resource Management  Object type column in partition table  Transportable tablespace  Partitioned index-organized table  Functional index, virtual column  Stable optimizer execution plans Application Development Security  Oracle Jserver, VM in Database  Virtual Private Database  Java stored procedure, function..  LDAP integration  SQLJ: embedded SQL in Java  N-tier authentication/authorization  WebDB  SSL and X.509v3, RAIDUS support  Data encrypt, decrypt
  • 41. Oracle 9i - The eBusiness Platform  Oracle9i continues Oracle8i's focus on the Internet by providing a series of specific capabilities and product bundles targeted at eBusiness environments. In addition, Oracle9i continues to add features and capabilities that extends existing investment in mission-critical infrastructure. Oracle9i has been designed with focus on certain key development areas. Key Infrastructure Area Key Application Area  Availability  Internet Contents Management  Scalability and Performance  B2B and B2C eBusiness  Security  Packaged Application  Development Platform  Business Intelligence  Manageability  Windows2000 Integration
  • 42. Oracle Client/Server Architecture NETWORK Client Server b Application Client/Server Server/Server Server A  Benefit of Client/Server Component - Database S/W work on Server - Only Server upgrade to increase size - Minimize network resource - Minimize Client H/W spec - concurrency, consistency, transparency - concurrency, consistency, transparency
  • 43. SQL*Net  What is SQL*Net? - Oracle’s Client/Server middleware product - transparent connection from client tool to DB ( from on DB to another ) - works across multiple network protocol and operation system  What is TNS? - Transparent Network Substrate - Oracle’s Network applications to access the underlying network protocols transparently - TNS-based application, Oracle Protocol Adapters, Network software like TCP/IP  Configuration File - TNSNAME.ORA ( Client ) - TNSNAV.ORA ( Client ) - SQLNET.ORA ( Client, Server ) - LISTENER.ORA ( Server )
  • 44. SQL*Net Configuration  TNSNAME.ORA  LISTENER.ORA info = LISTENER= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS_LIST= (ADDRESS= (ADDRESS= (PROTOCOL=tcp) (PROTOCOL=tcp) (HOST=brinfoa01) (HOST=brinfoa01) (PORT=1521) (PORT=1521) ) ) ) ) (CONNECT_DATA= SID_LIST_LISTENER= (SID=BRBINFO1) (SID_LIST= ) (SID_DESC= ) (SID_NAME=BRBINFO1) (ORACLE_HOME=/oracle7/oracle7) (ENVS='EPC_DISABLED=TRUE') ) )  SQLNET.ORA STARTUP_WAIT_TIME_LISTENER=0 # SQLNET.EXPIRE_TIME = 0 CONNECT_TIMEOUT_LISTENER=0 LOG_DIRECTORY_LISTENER=/oracle7/oracle7/network/log SQLNET.AUTHENTICATION_S LOG_FILE_LISTENER=listener ERVICES=(none, beq) TRACE_LEVEL_LISTENER=OFF
  • 45. Net8 Networking Challenge  Support large mission-critical client/server, and provide migration path towards distributed object architecture  Net8 Focus 1. Scalability : Connection Pooling, Multiplexing(Connection Manager) 2. Manageability : Configuration-free installation option, Centralized client administration, Automated client configuration 3. Security : Oracle Security Server
  • 46. ODBC / oo4o / JDBC  ODBC (Open Database Connectivity ) - Provide a way for client program (eg VB, Excel, Access) to access database - is a standardized API, developed according to the specification of the SQL Access Group, than allows one to connect to SQL database  oo4o (Oracle Object for OLE) - a middleware product manufactured by Oracle that allows native access to Oracle7 databases from client applications via the Microsoft OLE standard - OLE 2.0 Automation Server, Oracle Data Control, Two C++ Class Library  JDBC (Java Database Connectivity ) - a set of classes and interfaces written in Java to allow other Java programs to send SQL statements to a relational database management system - JDBC Thin for Java applets, JDBC OCI for Java application