Data Visualisation Notes
Data Visualisation Notes
Slide 2
Session Outline
The key topics to be covered in the session are as follows:
• The fundamental principle of DBMS and three level
architecture
• Oracle server architecture
– Conceptual schema: description of the logical structure of all data in the database
External
Logical Structures
Physical Structures
Slide 5
Oracle Server
An Oracle server:
• Is a database management system that provides an open, comprehensive,
integrated approach to data management
• Consists of two parts:
– Instance
• A set of Oracle processes and an allocation of memory (SGA)
– Database
• A collection of physical operating system files
– These two parts are very closely related but a database can be mounted and
opened by many instances. An instance may mount and open only a single
Database
Physical storage
structures
Slide 8
Oracle Memory Structures
SGA –System Global Area SGA
Database
• Group of shared memory buffer cache
structures, known as SGA Redo log Pools
buffer
components, that contain
data and control
information for one
instance.
Server Background
PGA-Program Global Area PGA process
process 1
• Memory regions that
contain data and control Server
PGA PGA
process 2
information for a server or
background process. Slide 9
Memory Structures: SGA
• Database buffer cache:
– Caches blocks of data retrieved from the database.
• Redo log buffer:
– Caches redo information (used for instance recovery) until it can be written to
the physical redo log files stored on the disk.
• Various pools:
– Shared pool:
• Caches various constructs that can be shared among users.
– Large pool:
• Optional area that provides large memory allocations for certain large processes,
such as Oracle backup and recovery operations, and I/O server processes.
– Java pool:
• Used for all session-specific Java code and data in the Java Virtual Machine (JVM).
– Streams pool:
• Used by Oracle Streams to store information required
Slide 10 by capture and apply.
Memory Structures: PGA
• A Program Global Area (PGA) is a memory region that contains data and control
– Each server process has its own private PGA that is created when the server process is started
• Access to the PGA is exclusive to that server process, and the PGA is read and
instance PGA)
– Database initialisation parameters are used to set the size of the instance PGA, not individual PGAs
Slide 11
Process Architecture
• User process
– Is started when a database user or a batch
process connects to Oracle Database.
• Database processes
– Server process:
• Is started when a user establishes a session.
– Background processes:
• Are started when an Oracle instance is started.
Slide 12
Oracle Processes
Background Processes
Slide 13
Server Processes
• Oracle creates server processes to handle the requests
of user processes connected to instance.
• Server process:
– Parses and runs SQL statements issued through the application.
– Reads necessary data blocks from data files on disk into the
shared database buffers of the SGA (if the blocks are not
already present in the SGA).
– Returns results in such a way that the application can process
the information.
– Can be configured as a dedicated server or a shared server.
Slide 14
Background Processes
DBWn :
– Writes modified (dirty) buffers from the database buffer cache to disk.
LGWR:
– Writes the redo log buffer to a redo log file on disk when:
• when a user process commits a transaction,
• when the redo log buffer is one-third full,
• Before a DBWn process writes modified buffers to disk.
CKPT:
– At specific times CKPT starts a checkpoint request by sending a
message to DBWn to begin writing dirty buffers
– CKPT then writes checkpoint information to control file and each data
file header to indicate the most recent checkpoint.
– When a checkpoint occurs, all changes made by committed
transactions are written to datafiles on disk.
Slide 15
Background Processes
SMON :
– Performs instance recovery when the instance is started following a
failure.
PMON:
– Performs process recovery when a user process fails
– Cleans up the cache and frees resources that the process was using
– Monitors sessions for idle session timeout
– Dynamically registers database services with listeners
ARCn:
– Copies the redo log files to archival storage when the log files are
full, or a log switch occurs
– Process is present only when the database is in ARCHIVELOG mode
and automatic archiving is enabled Slide 16
What is SQL
Logical Structures
Physical Structures
Slide 17
Logical Database Storage Structures
• Logical Structure:
– it only stays in memory and only appears when
the database service is started
– only can be viewed by using certain database
tools
– Types of logical structure:
• Tablespace: where the tables or data are stored.
• Segment: Smaller unit in tablespace,
• Extent: Smaller unit in segment.
• Block: Smaller unit in extent.
Slide 18
Physical Database Storage Structures
Slide 19
Relationship between Tablespaceand Data
Files
• A tablespace consist of one or more data files.
• A data file can belong to only one tablespace.
Slide 20
Multiplexing and Mirroring
• In order to maximise database availability Oracle
recommends to have multiple copies of the important files
• Multiplexing:
– The automated maintenance of more than one identical copy of the file
– When multiplexing files, Oracle Database writes the same data to multiple files
• Mirroring:
– Maintaining identical copies of data on one or more disks
– Typically, mirroring is performed on duplicate hard disks at the operating system
level, so that if one of the disks is unavailable, the other disk can continue to
service requests without interruptions
– When mirroring files, Oracle Database writes once while the operating system
writes to multiple disks
Slide 21
Using DBCA to Create a Database
Slide 22
Tools for DBA
• SQL*Plus
– command line tool, provided with every Oracle
database installation
• SQL Developer
– the Oracle Database IDE
– a free graphical user interface, provides powerful
editors for working with SQL, PL/SQL, Stored Java
Procedures, and XML.
• Enterprise Manager Express (EM)
– an integrated and comprehensive web-based system
management platform Slide 23
Questions
Slide 24