 |
 |
Oracle Architecture
and Storage |
|
|
The core theoretical purpose of a relational database is to separate logical interaction with data
within the database from the physical storage of that data. As a user or developer, you shouldn’t
really have to know how an Oracle database works internally, or stores its data, in order to use it
properly. At a high level, this is certainly true. You don’t need to know anything about the Oracle
database to write SQL, the access language used to interact with the database, or to create programs
that use SQL.
The Oracle database automatically takes care of translating your logical requests to access the data
within its control. But, like all applications, the way your Oracle database is actually implemented
can have an impact on what you do and do not do in the creation and maintenance of your application
systems. Having a basic understanding of how Oracle does its jobs provides a foundation for the rest
of this book. And understanding the ways that Oracle stores your data, which is also covered in this
chapter, can have a direct impact on the way you write your applications that use that data.
This first chapter introduces you to a lot of the behind-the-scenes underpinnings of the Oracle
database—the architecture of the database and how the data is stored within it. You very well
may not ever have to use this information in your day-to-day tasks, but the substance of this
chapter is necessary for the more detailed information about programming.
This chapter covers the architecture of the Oracle database as well as the storage options for your
data. Depending on how the responsibilities are divided in your particular environment, there may
be database administrators (DBAs) who do most of the work of translating your logical requirements
into physical storage, or you may be called upon to perform some of these tasks yourself. In either
case, this chapter gives you some familiarity with the way your Oracle database handles your data.Architecture
The Oracle database is a relational database. The theory of relational databases was first put forward by
Dr. E. F. Codd, a research scientist working for IBM, in the mid-1970s. Codd proposed a number of rules
for a database to follow to be considered a relational database. For the first decade or so after these rules
were proposed, early relational databases fought to show that they were the most compliant with Codd’s
rules. Those early days are far behind us now, and the basic features of a relational database, such as guaranteeing
transactional integrity and allowing ad hoc access to data, are well established in all major relational
databases.
The Oracle database consists of two main parts: the instance, which is the software service that acts as an
intermediary between application requests and its data, and the actual data files, which are where the data is
kept. The instance is a dynamic process and uses a variety of tasks and memory to support its operations. The
data files are stored on disk, so the data itself will survive most service interruptions, except for catastrophic
media failure.
The Instance
The Oracle instance is the collection of processes that handle requests from a client for a data. Some of
these processes are shown in Figure 1-1. Figure 1-1 also includes some of the main areas of memory that
an instance uses.An Oracle instance is either started as part of the process of booting a server or can be started explicitly
with commands. Although you start an instance with a single command, there are actually three distinct
steps in the startup process:
? Starting the instance process itself
Processes
Memory
Database buffers
SMON PMON
DBWR
LGWR
ARC
Shared pool
SGA
PGA
User User User User User
Redo Log buffers
2
Chapter 1
? Mounting the database, which consists of opening the control files for the instance
? Opening the database, which makes the database available for user requests
An instance can be stopped with another command or via the system console, which follows the same
sequence of events in reverse. You can stop an instance gracefully by stopping users from logging on to
the database and only shutting down when the last active user has logged off, or you can simply stop
the instance, which may result in incomplete transactions (described in detail in Chapter 3, “Handling
Multiple Users”).
Processes Supporting an Instance
A number of processes are associated with an instance and perform specific tasks for the instance.
Listener
The Listener is a process that listens on the network for requests coming in to an Oracle instance. AListener
process can support one or more Oracle instances. The Listener acts as the intermediary between user
requests from remote machines and the instance. The failure of the Listener will mean that the instance it
supports is not accessible by a remote client—such as any application that accesses the instance.SapereOnLine |
|
|
|
|
|