SAP RDBMS Concept

download SAP RDBMS Concept

of 9

Transcript of SAP RDBMS Concept

  • 8/18/2019 SAP RDBMS Concept

    1/9

     

    Why Oracle

    Client/server environments (distributed processing)

    Large databases and space management

    Oracle supports large numbers of concurrent users executing a variety of

    database applications operating on the same data. It minimizes data contention

    and guarantees data concurrency.

    Oracle softare allos different types of computers and operating systems to

    share information across netor!s.

    Oracle maintains the preceding features ith a high degree of overall system

     performance. "atabase users do not suffer from slo processing performance.

    #t some sites$ Oracle or!s %& hours per day ith no don time to limit

    database throughput. 'ormal system operations such as database bac!up and

     partial computer system failures do not interrupt database use.

    Oracle can selectively control the availability of data$ at the database level and

    subdatabase level.

    Oracle softare or!s under different operating systems. #pplications

    developed for Oracle can be ported to any operating system ith little or no

    modification.

  • 8/18/2019 SAP RDBMS Concept

    2/9

     

    Oracle Instance

    very time a database is started$ a system global area (*+#) is allocated and

    Oracle bac!ground processes are started.

    • A user process executes the code of an application program (such as an

    Oracle Forms application) or an Oracle Tool (such as Oracle EnterpriseManager).• Oracle processes are server processes that perform wor for the user

    processes and !acground processes that perform maintenance wor forthe Oracle server.

    ,he system global area is an area of memory used for database information

    shared by the database users.

    ,he combination of the bac!ground processes and memory buffers is called an

    Oracle instance.

    #n Oracle instance has to types of processes- user processes and Oracle

     processes.

  • 8/18/2019 SAP RDBMS Concept

    3/9

     

    Database Structure and Space Management

    #n Oracle database is a collection of data that is treated as a unit. ,he purpose

    of a database is to store and retrieve related information.

    ,he database has logical structures and physical structures.

    ecause the physical and logical structures are separate$ the physical storage of

    data can be managed ithout affecting the access to logical storage structures.

  • 8/18/2019 SAP RDBMS Concept

    4/9

     

    Logical Database Structures,he logical structures of an Oracle database include tablespaces$ schema

    obects$ data bloc!s$ extents$ and segments.,ablespaces- A data!ase is divided into logical storage units called ta!lespaces"

    which group related logical structures together. For example" ta!lespacescommonl# group all of an application$s o!%ects to simplif# some administrativeoperations.

    This figure illustrates t

    he following&

    Each data!ase is logicall# divided into one or more ta!lespaces. One or more datafiles are explicitl# created for each ta!lespace to ph#sicall#

    store the data of all logical structures in a ta!lespace.

    The com!ined si'e of a ta!lespace$s datafiles is the total storage capacit# of theta!lespace (TEM ta!lespace has * M+ storage capacit# while ,E-ta!lespace has M+).

    The com!ined storage capacit# of a data!ase$s ta!lespaces is the total storagecapacit# of the data!ase (/ M+).

    ,he relationship among databases$ tablespaces and datafiles-

  • 8/18/2019 SAP RDBMS Concept

    5/9

     

    Logical Database Structures

    Online and Offline ,ablespaces- A ta!lespace can !e online (accessi!le) or offline (not accessi!le). A ta!lespace is normall# online so that users can access theinformation within the ta!lespace. 0owever" sometimes a ta!lespace ma# !e

    taen offline to mae a portion of the data!ase unavaila!le while allowing normalaccess to the remainder of the data!ase. This maes man# administrative tasseasier to perform.

    *chemas and *chema Obects- A schema is a collection of data!ase o!%ects.Schema objects are the logical structures that directl# refer to the data!ase$sdata. chema o!%ects include such structures as ta!les" views" se1uences" stored

    procedures" s#non#ms" indexes" clusters" and data!ase lins. There is no relationship !etween a ta!lespace and a schema2 o!%ects in the same

    schema can !e in different ta!lespaces" and a ta!lespace can hold o!%ects fromdifferent schemas.

    Oracle "ata loc!s- At the finest level of granularit#" Oracle data!ase data isstored in data !locs. One data !loc corresponds to a specific num!er of !#tes

    of ph#sical data!ase space on dis. A data !loc si'e is specified for each Oracledata!ase when the data!ase is created. A data!ase uses and allocates freedata!ase space in Oracle data !locs.

    xtents- The next level of logical data!ase space is called an extent. An extent isa specific num!er of contiguous data !locs" o!tained in a single allocation" usedto store a specific t#pe of information.

  • 8/18/2019 SAP RDBMS Concept

    6/9

     

    Logical Database Structures

    *egments- The level of logical data!ase storage a!ove an extent is called asegment. A segment is a set of extents allocated for a certain logical structure.For example" the different t#pes of segments include&

    • data segment: Each non3clustered ta!le has a data segment. All of theta!le$s data is stored in the extents of its data segment. For a partitionedta!le" each partition has a data segment.

    • index segment: Each index has an index segment that stores all of itsdata. For a partitioned index" each partition has an index segment.

    • rollback segment: One or more roll!ac segments for a data!ase arecreated !# the data!ase administrator to temporaril# store undoinformation.The information in a roll!ac segment is used&

    • To generate read3consistent data!ase information• 4uring data!ase recover#• To roll!ac uncommitted transactions for users

    • temporary segment: Temporar# segments are created !# Oracle when a56 statement needs a temporar# wor area to complete execution.7hen the statement finishes execution" the temporar# segment$s extentsare returned to the s#stem for future use.

    • Oracle d#namicall# allocates space when the existing extents of asegment !ecome full. Therefore" when the existing extents of a segment

    are full" Oracle allocates another extent for that segment as needed.

  • 8/18/2019 SAP RDBMS Concept

    7/9

     

    Physical Database Structures

    "atafiles- Ever# Oracle data!ase has one or more ph#sical datafiles. A data!ase$sdatafiles contain all the data!ase data. The data of logical data!ase structuressuch as ta!les and indexes is ph#sicall# stored in the datafiles allocated for a

    data!ase.

    The characteristics of datafiles are&

    A datafile can !e associated with onl# one data!ase.

    4atafiles can have certain characteristics set to allow them to automaticall#extend when the data!ase runs out of space.

    One or more datafiles form a logical unit of data!ase storage called ata!lespace" as discussed earlier in this chapter.

    ,he 0se of "atafiles- 

    The data in a datafile is read" as needed" during normal data!ase operation andstored in the memor# cache of Oracle. For e.g." assume that a user wants toaccess some data in a ta!le of a data!ase. 8f the re1uested information is notalread# in the memor# cache for the data!ase" it is read from the appropriatedatafiles and stored in memor#.

    Modified or new data is not necessaril# written to a datafile immediatel#. Toreduce the amount of dis access and increase performance" data is pooled inmemor# and written to the appropriate datafiles all at once" as determined !# the4+7- !acground process of Oracle.

  • 8/18/2019 SAP RDBMS Concept

    8/9

     

    Physical Database Structures

    1edo Log 2iles- The primar# function of the redo log is to record all changesmade to data. hould a failure prevent modified data from !eing permanentl#written to the datafiles" the changes can !e o!tained from the redo log and wor

    is never lost.

    Ever# Oracle data!ase has a set of two or more redo log files. The set of redolog files for a data!ase is collectivel# nown as the data!ase$s redo log.

    A redo log is made up of redo entries (also called redo records)" each of whichis a group of change vectors descri!ing a single atomic change to the data!ase.

    -edo log files are critical in protecting a data!ase against failures. To protect

    against a failure involving the redo log itself" Oracle allows a multiplexed redolog so that two or more copies of the redo log can !e maintained on differentdiss.

    ,he 0se of 1edo Log 2iles The information in a redo log file is used onl# torecover the data!ase from a s#stem or media failure that prevents data!ase datafrom !eing written to a data!ase$s datafiles.

    For e.g" if an unexpected power outage terminates data!ase operation" data inmemor# cannot !e written to the datafiles and the data is lost. 0owever" an#lost data can !e recovered when the data!ase is opened" after power isrestored. +# appl#ing the information in the most recent redo log files to thedata!ase$s datafiles" Oracle restores the data!ase to the time at which thepower failure occurred.

    The process of appl#ing the redo log during a recover# operation is called rolling

    forward.

  • 8/18/2019 SAP RDBMS Concept

    9/9

     

    Physical Database Structures

    Control 2iles- Ever# Oracle data!ase has a control file. A control file containsentries that specif# the ph#sical structure of the data!ase. For example" itcontains the following t#pes of information&

    4ata!ase name

    9ames and locations of datafiles and redo log files

    Time stamp of data!ase creation

    6ie the redo log" Oracle allows the control file to !e multiplexed for protection ofthe control file.

    ,he 0se of Control 2iles- Ever# time an instance of an Oracle data!ase isstarted" its control file is used to identif# the data!ase and redo log files thatmust !e opened for data!ase operation to proceed. 8f the ph#sical maeup of thedata!ase is altered (for example" a new datafile or redo log file is created)" thecontrol file is automaticall# modified !# Oracle to reflect the change.

    A control file is also used if data!ase recover# is necessar#.