Wednesday, July 1, 2009

Oracle Database

by Farid Abdul Jabbar
114071141

The Oracle Database (commonly referred to as Oracle RDBMS or simply Oracle) consists of a relational database management system (RDBMS) produced and marketed by Oracle Corporation. As of 2009[update], Oracle remains a major presence in database computing.[1]

Larry Ellison and his friends and former co-workers Bob Miner and Ed Oates started the consultancy Software Development Laboratories (SDL) in 1977. SDL developed the original version of the Oracle software. The name Oracle comes from the code-name of a CIA-funded project Ellison had worked on while previously employed by Ampex



Physical and logical structuring in Oracle
An Oracle database system — identified by an alphanumeric system identifier or SID[3] — comprises at least one instance of the application, along with data storage. An instance — identified persistently by an instantiation number (or activation id: SYS.V_$DATABASE.ACTIVATION#) — comprises a set of operating-system processes and memory-structures that interact with the storage. Typical processes include PMON (the process monitor) and SMON (the system monitor).

Users of Oracle databases refer to the server-side memory-structure as the SGA (System Global Area). The SGA typically holds cache information such as data-buffers, SQL commands, and user information. In addition to storage, the database consists of online redo logs (or logs), which hold transactional history. Processes can in turn archive the online redo logs into archive logs (offline redo logs), which provide the basis (if necessary) for data recovery and for some forms of data replication.

The Oracle RDBMS stores data logically in the form of tablespaces and physically in the form of data files. Tablespaces can contain various types of memory segments, such as Data Segments, Index Segments, etc. Segments in turn comprise one or more extents. Extents comprise groups of contiguous data blocks. Data blocks form the basic units of data storage. At the physical level, datafiles comprise one or more data blocks, where the block size can vary between data-files.

Oracle database management tracks its computer data storage with the help of information stored in the SYSTEM tablespace. The SYSTEM tablespace contains the data dictionary — and often (by default) indexes and clusters. A data dictionary consists of a special collection of tables that contains information about all user-objects in the database. Since version 8i, the Oracle RDBMS also supports "locally managed" tablespaces which can store space management information in bitmaps in their own headers rather than in the SYSTEM tablespace (as happens with the default "dictionary-managed" tablespaces).

If the Oracle database administrator has implemented Oracle RAC (Real Application Clusters), then multiple instances, usually on different servers, attach to a central storage array. This scenario offers advantages such as better performance, scalability and redundancy. However, support becomes more complex, and many sites do not use RAC. In version 10g, grid computing introduced shared resources where an instance can use (for example) CPU resources from another node (computer) in the grid.

The Oracle DBMS can store and execute stored procedures and functions within itself. PL/SQL (Oracle Corporation's proprietary procedural extension to SQL), or the object-oriented language Java can invoke such code objects and/or provide the programming structures for writing them.

Database schema
Oracle database conventions refer to defined groups of ownershipping (generally associated with a "username") as schemas.

Most Oracle database installations traditionally came with a default schema called SCOTT. After the installation process has set up the sample tables, the user can log into the database with the username scott and the password tiger. The name of the SCOTT schema originated with Bruce Scott, one of the first employees at Oracle (then Software Development Laboratories), who had a cat named Tiger.[4]

The SCOTT schema has seen less use as it uses few of the features of the more recent releases of Oracle. Most recent[update] examples supplied by Oracle Corporation reference the default HR or OE schemas.

Other default schemas include:

SYS (essential core database structures and utilities)
SYSTEM (additional core database structures and utilities, and privileged account)
OUTLN (utilized to store metadata for stored outlines for stable query-optimizer execution plans.
BI, IX, HR, OE, PM, and SH (expanded sample schemas[7] containing more data and structures than the older SCOTT schema).

Memory architecture

System Global Area
Main article: System Global Area
Each Oracle instance uses a System Global Area or SGA — a shared-memory area — to store its data and control-information.

Each Oracle instance allocates itself an SGA when it starts and de-allocates it at shut-down time. The information in the SGA consists of the following elements, each of which has a fixed size, established at instance startup:

the database buffer cache: this stores the most recently-used data blocks. These blocks can contain modified data not yet written to disk (sometimes known as "dirty blocks"), unmodified blocks, or blocks written to disk since modification (sometimes known as clean blocks). Because the buffer cache keeps blocks based on a most-recently-used algorithm, the most active buffers stay in memory to reduce I/O and to improve performance.
the redo log buffer: this stores redo entries — a log of changes made to the database. The instance writes redo log buffers to the redo log as quickly and efficiently as possible. The redo log aids in instance recovery in the event of a system failure.
the shared pool: this area of the SGA stores shared-memory structures such as shared SQL areas in the library cache and internal information in the data dictionary. An insufficient amount of memory allocated to the shared pool can cause performance degradation.

Library cache
The library cache stores shared SQL, caching the parse tree and the execution plan for every unique SQL statement.

If multiple applications issue the same SQL statement, each application can access the shared SQL area. This reduces the amount of memory needed and reduces the processing-time used for parsing and execution planning.


Data dictionary cache
The data dictionary comprises a set of tables and views that map the structure of the database.

Oracle databases store information here about the logical and physical structure of the database. The data dictionary contains information such as:

user information, such as user privileges
integrity constraints defined for tables in the database
names and datatypes of all columns in database tables
information on space allocated and used for schema objects
The Oracle instance frequently accesses the data dictionary in order to parse SQL statements. The operation of Oracle depends on ready access to the data dictionary: performance bottlenecks in the data dictionary affect all Oracle users. Because of this, database administrators should make sure that the data dictionary cache[10] has sufficient capacity to cache this data. Without enough memory for the data-dictionary cache, users see a severe performance degradation. Allocating sufficient memory to the shared pool where the data dictionary cache resides precludes these particular performance problems.


Program Global Area
The Program Global Area or PGA memory-area of an Oracle instance contains data and control-information for Oracle's server-processes.

The size and content of the PGA depends on the Oracle-server options installed. This area consists of the following components:

stack-space: the memory that holds the session's variables, arrays, and so on.
session-information: unless using the multithreaded server, the instance stores its session-information in the PGA. (In a multithreaded server, the session-information goes in the SGA.)
private SQL-area: an area in the PGA which holds information such as bind-variables and runtime-buffers.
sorting area: an area in the PGA which holds information on sorts, hash-joins, etc.

Process architectures

Oracle processes
The Oracle RDBMS typically relies on a group of processes running simultaneously in the background and interacting to monitor and expedite database operations. Typical operating groups might include some of the following individual processes — (shown along with their abbreviated nomenclature):

archiver processes (ARCn)
checkpoint process (CKPT) *REQUIRED*
coordinator-of-job-queues process (CJQn): dynamically spawns slave processes for job-queues
database writer processes (DBWn) *REQUIRED*
dispatcher processes (Dnnn): multiplex server-processes on behalf of users
memory-manager process (MMAN): used for internal database tasks such as Automatic Shared Memory Management
log-writer process (LGWR) *REQUIRED*
log-write network-server (LNSn): transmits redo logs in Data Guard environments
logical standby coordinator process (LSP0): controls Data Guard log-application
media-recovery process (MRP): detached recovery-server process
memory-monitor process (MMON)
memory-monitor light process (MMNL): gathers and stores Automatic Workload Repository (AWR) data
process-monitor process (PMON) *REQUIRED*
process-spawner (PSP0): spawns Oracle processes
queue-monitor processes (QMNn)
recoverer process (RECO)
remote file-server process (RFS)
shared server processes (Snnn): serve client-requests
system monitor process (SMON) *REQUIRED*

User processes, connections and sessions
Oracle Database terminology distinguishes different computer-science terms in describing how end-users interact with the database:

user processes involve the invocation of application software
a connection refers to the pathway linking a user process to an Oracle instance
sessions consist of specific connections to an Oracle instance.[16] Each session within an instance has a session identifier or "SID"[17] (distinct from the system-identifier SID).

Concurrency and locking
Oracle databases control simultaneous access to data resources with locks (alternatively documented as "enqueues" ). The databases also utilize "latches" -- low-level serialization mechanisms to protect shared data structures in the System Global Area.


Internationalization
Oracle Database software comes in 63 language-versions (including regional variations such as American English and British English). Variations between versions cover the names of days and months, abbreviations, time-symbols such as A.M. and A.D., and sorting.

Oracle Corporation has translated Oracle Database error-messages into Arabic, Catalan, Chinese, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Swedish, Thai and Turkish.

Oracle Corporation provides database developers with tools and mechanisms for producing internationalized database applications: referred to internally as "Globalization".

Database options
Oracle Corporation refers to some extensions to the core functionality of the Oracle database as "database options".[36] As of 2008[update] such options include:

Active Data Guard (extends Oracle Data Guard physical standby functionality in 11g)
Advanced Security (adds data encryption methods)
Content database (provides a centralized repository for unstructured information)
Database Vault (enforces extra security on data access)
Data Mining (ODM) (mines for patterns in existing data)
In-Memory Database Cache (utilizes TimesTen technology)
Label Security (enforces row-level security)
Management Packs (various)
Oracle Answers (for ad-hoc analysis and reporting)
Oracle OLAP (adds analytical processing)
Oracle Programmer (provides programmatic access to Oracle databases via precompilers, interfaces and bindings)[37]
Partitioning (granularizes tables and indexes for efficiency)
Real Application Clusters (RAC) (coordinates multiple processors)
Oracle Real Application Testing (new at version 11g) — including Database Replay (for testing workloads) and SQL Performance Analyzer (SPA) (for preserving SQL efficiency in changing environments)[38]
Records database (a records management application)
Oracle Spatial (integrates relational data with geographic information systems (GIS))
Transparent Gateway for connecting to non-Oracle systems. Offers optimized solution, with more functionality and better performance than Oracle Generic Connectivity.
Total Recall (optimizes long-term storage of historical data)
Oracle Warehouse Builder (in various forms and sub-options)
This list is incomplete; you can help by expanding it.
In most cases, using these options entails extra licensing costs.[39]


[edit] Suites
In addition to its RDBMS, Oracle Corporation has released several related suites of tools and applications relating to implementations of Oracle databases. For example:

Oracle Application Server, a J2EE-based application server, aids in developing and deploying applications which utilise Internet technologies and a browser.
Oracle Collaboration Suite contains messaging, groupware and collaboration applications.
Oracle Developer Suite contains software development tools, including JDeveloper.
Oracle E-Business Suite collects together applications for enterprise resource planning (including Oracle Financials), customer relationship management and human resources management (Oracle HR).
Oracle Enterprise Manager (OEM) used by database administrators (DBAs) to manage the DBMS, and recently[update] in version 10g, a web-based rewrite of OEM called "Oracle Enterprise Manager Database Control". Oracle Corporation has dubbed the super-Enterprise-Manager used to manage a grid of multiple DBMS and Application Servers "Oracle Enterprise Manager Grid Control".
Oracle Programmer/2000, a bundling of interfaces for 3GL programming languages, marketed with Oracle7 and Oracle8.[40][41]

[edit] Database "features"
Apart from the clearly-defined database options, Oracle databases may include many semi-autonomous software sub-systems, which Oracle Corporation sometimes refers to as "features" in a sense subtly different from the normal usage of the word.[42] Such "features" may include (for example):

Active Session History (ASH), the collection of data for immediate monitoring of very recent database activity.[43]
Automatic Workload Repository (AWR), providing monitoring services to Oracle database installations from Oracle version 10. Prior to the release of Oracle version 10, the Statspack facility provided similar functionality.
Clusterware
Data Aggregation and Consolidation
Data Guard for high availability
Generic Connectivity for connecting to non-Oracle systems.
Data Pump utilities, which aid in importing and exporting data and metadata between databases[44]
Database Resource Manager (DRM), which controls the use of computing resources.[45]
Fine-grained auditing (FGA) (in Oracle Enterprise Edition[46]) supplements standard security-auditing features[47]
Flashback for selective data recovery and reconstruction[48]
iSQL*Plus, a web-browser-based graphical user interface (GUI) for Oracle database data-manipulation (compare SQL*Plus)
Oracle Data Access Components (ODAC), tools which consist of:[49]
Oracle Data Provider for .NET (ODP.NET)[50]
Oracle Developer Tools (ODT) for Visual Studio
Oracle Providers for ASP.NET
Oracle Database Extensions for .NET
Oracle Provider for OLE DB
Oracle Objects for OLE
Oracle Services for Microsoft Transaction Server
Oracle-managed files (OMF) -- a feature allowing automated naming, creation and deletion of datafiles at the operating-system level.
Recovery Manager (rman) for database backup, restoration and recovery
SQL*Plus, a program that allows users to interact with Oracle database(s) via SQL and PL/SQL commands on a command-line. Compare iSQL*Plus.
This list is incomplete; you can help by expanding it.

[edit] Standalone tools
Various tools address specific environments or specific market requirements.

Development of applications commonly takes place in Java (using Oracle JDeveloper) or through PL/SQL (using, for example, Oracle Forms and Oracle Reports). Oracle Corporation has started[clarification needed] a drive toward 'wizard'-driven environments with a view to enabling non-programmers to produce simple data-driven applications.

Oracle SQL Developer, a free graphical tool for database development, allows developers to browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. It incorporates standard and customized reporting.


[edit] Other databases marketed by Oracle Corporation
By acquiring other technology in the database field, Oracle Corporation has taken over:

TimesTen, a memory-resident database that has the ability to cache transactions and synchronize data with a centralized Oracle database server. It functions as a real-time infrastructure software product intended for the management of low-latency, high-volume data, of events and of transactions.
BerkeleyDB, a simple, high-performance, embedded database
Oracle Rdb, a legacy relational database for the OpenVMS operating system
MySQL a relational database purchased as part of its immediate previous owner, Sun Microsystems

[edit] Using Oracle Database software
Users of Oracle databases may access the online documentation, the Oracle Technology Network site, and the comp.databases.oracle Usenet discussion group. The Oracle Technet site offers downloads of full-featured evaluation software. Users can also check the Oracle FAQ site before posting questions to forums, mailing lists, etc. They can also log on to http://asktom.oracle.com/ to post questions to and get answers from Tom Kyte, a Vice-President of Oracle Corporation and the author of several Oracle books including Expert One-On-One Oracle (ISBN 1-59059-525-4).

The Oracle RDBMS has had a reputation among novice users as difficult to install on Linux systems.[citation needed] Oracle Corporation has packaged recent[update] versions for several popular Linux distributions in an attempt to minimize installation challenges beyond the level of technical expertise required to install a database server.[citation needed]


[edit] Official support
Users who have Oracle support contracts should turn to Oracle's MetaLink web site (password required). MetaLink provides users of Oracle Corporation products with a repository of reported problems, diagnostic scripts and solutions. It also integrates with the provision of support tools, patches and upgrades.

The Remote Diagnostic Agent or RDA[51] can operate as a command-line diagnostic tool executing a script. The data captured provides an overview of the Oracle Database environment intended for diagnostic and trouble-shooting.


[edit] Database-related guidelines
Oracle Corporation also endorses certain practices and conventions as enhancing the use of its database products. These include:

Oracle Maximum Availability Architecture (MAA), guidelines on developing high-availability systems
Optimal Flexible Architecture (OFA), blueprints for mapping Oracle-database objects to file-systems

[edit] Oracle Certification Program
Main article: Oracle Certification Program
The Oracle Certification Program, a professional certification program, includes the administration of Oracle Databases as one of its main certification paths. It contains three levels:

Oracle Certified Associate (OCA)
Oracle Certified Professional (OCP)
Oracle Certified Master (OCM)

User groups
A variety of official (Oracle-sponsored)[52] and unofficial user groups has grown up of users and developers of Oracle databases. They include:

Oracle Technology Network
Geographical/regional user groups
Product-centric user groups
Industry-centric user groups
The Oak Table Network
Morgan's Library (formerly PSOUG)
Usenet comp.databases.oracle groups

[edit] Market position

[edit] Competition
In the market for relational databases, Oracle Database competes against commercial products such as IBM's DB2 UDB and Microsoft SQL Server. Oracle and IBM tend to battle for the mid-range database market on UNIX and Linux platforms, while Microsoft dominates the mid-range database market on Microsoft Windows platforms. However, since they share many of the same customers, Oracle and IBM tend to support each other's products in many middleware and application categories (for example: WebSphere, PeopleSoft, and Siebel Systems CRM), and IBM's hardware divisions work closely with Oracle on performance-optimizing server-technologies (for example, Linux on zSeries). The two companies have a relationship perhaps best described as "coopetition". Niche commercial competitors include Teradata (in data warehousing and business intelligence), Software AG's ADABAS, Sybase, and IBM's Informix, among many others.

Increasingly, the Oracle database products compete against open-source relational database systems, particularly PostgreSQL, Firebird, and MySQL. Oracle acquired Innobase, supplier of the InnoDB codebase to MySQL, in part to compete better in the open source market. Database products developed on the basis of the open-source model generally cost significantly less to acquire than Oracle systems.

In 2007, competition with SAP AG occasioned litigation from Oracle Corporation.[53]


[edit] Pricing
Oracle Corporation offers term licensing for all Oracle products. It bases the list price for a term-license on a specific percentage of the perpetual license price.[54]

Enterprise Edition
As of March 2006[update], the database that costs the most per machine-processor among Oracle database engines.
Standard Edition
Cheaper: it can run on up to four processors but has fewer features than Enterprise Edition—it lacks proper parallelization[55], etc; but remains quite suitable for running medium-sized applications.
Standard ONE
Sells even more cheaply, but remains limited to two CPUs. Standard Edition ONE sells on a per-seat basis with a five-user minimum. Oracle Corporation usually sells the licenses with an extra 22% cost for support and upgrades (access to MetaLink - Oracle Corporation's support site) which customers need to renew annually.
Oracle Express Edition (Oracle XE)
An addition to the Oracle database product family (beta version released in 2005, production version released in February 2006), offers a free version of the Oracle RDBMS, but one limited to 4 GB of user data and to 1 GB of RAM (SGA+PGA). XE will use no more than one CPU and lacks an internal JVM. XE runs only released on Windows and on Linux, not on AIX, Solaris, HP-UX and the other operating systems available for other editions.
As computers running Oracle often have eight or more processors, the software price can rise into the hundreds of thousands of dollars. The total cost of ownership often exceeds this, as large Oracle installations usually require experienced and trained database administrators to do the set-up properly. Because of the product's large installed base and available training courses, Oracle specialists in some areas have become a more abundant resource than those for more exotic databases. Oracle frequently provides special training offers for database-administrators.

On Linux, Oracle's certified configurations include mostly commercial Linux distributions (RedHat Enterprise Linux 3 and 4, SuSE SLES8 and 9, Asianux) which can cost in a range from a few hundred to a few thousand USD per year (depending on processor architecture and the support package purchased).

The Oracle database system can also install and run on freely-available Linux distributions such as the Red Hat-based Centos[56], or Debian-based systems



0 comments:

Post a Comment