Dba w1
Dba w1
Management
Chapter 1 – Introduction
Chapter 2 – Oracle Architecture
1
The Evolution of the Relational Database
1964 – Network Model proposed by Charles Bachman of General
Electric and formed the basis of the Data Base Task Group.
1965 – Hierarchical Model developed by NAA and IBM and released a
database product (IMS) in 1969.
1970 - the concept or relational database was given in a publication
entitled “System R4 Relational” by Dr. Edgar F. Codd.
Till 1980, almost all database implementations used either the network
or hierarchical approach.
In 1980s, this concept achieved commercial success with the release of a
product named as Oracle V.2.
Why relational database technology grow to become the de facto
database technology? 2
Relational Basics
Linked two-dimensional tables consisting of rows and columns.
• The contents of the rows are referred to as records.
• A column within a row is referred to as a field.
• Tables are stored in a database schema, which is a logical organizational
unit within the database.
To retrieve the data, understanding the representation of data in storage
is not required.
Relational programming is nonprocedural and operates on a set of
rows at a time.
3
Figure 1-2. Relational model with two tables
4
Relational Basics
Logical structures in the schema include:
• Views
– Provide a single view of data derived from one or more tables or views.
• Sequences
– Provide unique numbers, typically used for column values.
• Stored procedures
– Contain logical modules that can be called from programs.
• Synonyms
– Provide alternative names for database objects.
• Indexes
– Provide faster access to table rows.
• Database links
– Provide links between distributed databases. 5
How Oracle Grew
Software Development Laboratories founded in 1977 by Larry Ellison,
Bob Miner, Ed Oates.
Changed name to Relational Software Incorporated in 1978.
Released first commercial RDBMS in 1979.
Renamed to Oracle Corporation in 1983 and released a portable version
of Oracle written in C.
Oracle acquires BEA Systems and introduced Oracle Exadata in 2008.
Oracle completes Sun acquisition and introduced Exalogic Elastic Cloud
in 2010.
Over the past 40-plus years, with each database release Oracle has
improved scalability, functionality, and manageability to achieve the
recognition as the database market leader. 6
The Oracle Database Family
Oracle Database 19c is the most recent version.
The family of database products includes:
• Oracle Enterprise Edition
– flagship database product aimed at large-scale implementations
• Oracle Standard Edition
– designed for small and medium-sized implementations
• Oracle Express Edition
– entry-level and unsupported as a product database available at no charge
7
Summary of Oracle Database Features
Database application development features
• Database Programming
– Structured Query Language (SQL) provides basic functions for data
manipulation, transaction control, and record retrieval from the database.
– PL/SQL is a procedural language extension to SQL, is commonly used to
implement program logic modules for applications. PL/SQL can be used to build
stored procedures and triggers, looping controls, conditional statements, and
error handling.
– Java and a Java Virtual Machine (JVM)
• Database Extensibility
– Oracle Multimedia provides text manipulation and additional image, audio,
video, and locator functions in the database.
– XML DB provides the native support for XML data type.
8
Summary of Oracle Database Features
Database connection features
• Oracle Net Services
– provides a scalable, secure, and easy-to-use high-availability network
infrastructure for Oracle environment
• Oracle Internet Directory (OID)
– LDAP (Lightweight Directory Access Protocol) based directory service
• Oracle Connection Manager (CMAN)
– an intermediate server that forwards connection requests to database servers or to
other proxy servers.
– reduces the number of Oracle Net client network connections to the database
through the use of concentrators, which provide connection multiplexing to
implement multiple connections over a single network connection.
9
Figure 1-3. Concentrators with Connection Managers for a large
number of users
10
Summary of Oracle Database Features
The role of Oracle Fusion Middleware
• The growing popularity of Internet has led to a change in deployment
from client/server to a three-tier architecture.
• Oracle’s WebLogic Server enables deployment of the middle tier in a
three-tier solution for web-based applications, component-based
applications, and enterprise application integration.
• Oracle WebLogic Server is a key part of Oracle’s Fusion Middleware.
• Other Fusion Middleware components address transaction management,
data integration, business process management, business intelligence,
identity management, service-oriented architectures (SOA).
11
Summary of Oracle Database Features
Distributed database features
• Distributed Queries and Transactions – retrieve data from multiple
databases
• Heterogeneous Services - allows non-Oracle data and services to be
accessed from an Oracle Database through generic connectivity
Data movement features
• Transportable Tablespaces – move or copy tablespace from one database
to another
• Advanced Queuing and Oracle Streams – uses to asynchronously send
messages from one Oracle database to another
12
Summary of Oracle Database Features
Database performance features
• Database Parallelization
– database tasks are implemented in parallel to speed the querying, tuning, and
maintenance of the database.
• Data Warehousing
– performance enhancements for business intelligence applications.
Managing the Oracle Database
• Self-tuning and self-managing features that make the database easier to
manage.
– Automatic Workload Repository (AWR)
– Automatic Database Diagnostic Monitor (ADDM)
– Automatic Memory Management (AMM)
– Automatic Storage Management (ASM)
– Oracle Enterprise Manager (EM) 13
Summary of Oracle Database Features
Database security features
• Oracle includes basic security for managing user access through roles and
privileges.
• Virtual Private Database (VPD)
• Advanced Security Option (ASO)
Database development tools
• Oracle SQL Developer
– IDE to create connections to Oracle Databases, browse database objects, create and
modify database objects, query and update data, export data and DDL, import data,
process commands, and run and create reports.
• Oracle Application Express (APEX)
– A web-based rapid application development tool.
14
Chapter 2 - Oracle Architecture
15
Databases and Instances
Database
• Physical - files stored on disk attached to the server
• Can last forever (as long as maintained)
Instance
• Runs on server
– Software executing on the server that provides access to the information in the
database and the resources that software uses.
• Logical – consists of in-memory structures and processes on the server
• Time-related
• A bridge to the database
– An instance can access only one database and multiple instances can be part of
the same database
16
Figure 2-1. An Instance and a Database
17
Oracle Database Structure
Schemas
• Core part of the logical organization of an Oracle Database that are
matched to an Oracle Database user.
• Is the basic logical isolation unit of the Oracle Database.
• At the time of creation of a schema password for the user, the
tablespace(s) for the schema, and the amount of each tablespace
available to that schema/user is specified.
• The owner of a schema gets access to all data structures within the
schema, and access to those objects must be GRANTed specifically to
other users.
18
Oracle Database Structure
Tablespaces
• A logical structure which contains all the data stored within an Oracle
database
• Oracle’s Default tablespace – locally managed tablespaces
Datafiles
• Physical structures
• Tablespace must consist of one or more datafiles
• Each datafile can only belong to one tablespace
• User can specify tablespace when creating a table
19
Figure 2-2. Tablespaces and datafiles
20
Files of a database
Three fundamental types of physical files that make up an Oracle
database:
1. Control files
2. Datafiles
3. Redo log files
21
Figure 2-3. The files that make up a database
22
Files of a database
Control files
• Provides fundamental information at startup
• Are deleted when database is removed
• Contains key information about the contents and state of the database,
including:
– The name of the database
– When the database was created
– Names and locations of datafiles and redo log files
– Tablespace information
– The log history and current log sequence information
– Archived log information
– Checkpoint information
23
Pluggable Databases
A new structural concept introduced with Oracle Database 12c.
A pluggable database (PDB) is a layer of isolation between a database
instance and a schema.
• Allows a single multitenant container database (CDB) to host multiple
separate pluggable databases (PDBs).
• In effect, a PDB is a logically distinct database within an Oracle instance
which is backwards-compatible with a standard, non-PDB Oracle
Database.
• This separation makes it quicker and easier to create a new pluggable
database and to upgrade pluggable databases by simply plugging them
into an upgraded CDB.
24
Database Initialization
Initialization parameters are read at Oracle database instance startup to
read configuration information.
Initialization parameters are stored in an instance initialization
parameter file INIT.ORA or in a repository called the server parameter
file (or SPFILE).
The number of initialization parameters that must be specified has
been greatly reduced with each Oracle Database release.
25
Database Initialization
The recommended minimum set of initialization parameters that must
be specified in Oracle Database 12c include:
• CONTROL_FILES
– The control file locations
• DB_NAME
– The local database name
• MEMORY_TARGET
– The target memory size that is automatically allocated to SGA and instance PGA
components
All other initialization parameters are pre-set to default values.
26