Thursday, September 11, 2014

Oracle Concepts - 1 Introduction to Oracle Database


- information system - a formal system for storing and processing information

- database - an organized collection of information treated as a unit

- database management system (DBMS) - is software that controls the storage, organization, and retrieval of data Typically, a DBMS has the following elements:
1. Kernel code - This code manages memory and storage for the DBMS.
2. Repository of metadata - This repository is usually called a data dictionary.
3. Query language - This language enables applications to access the data.

- database application - a software program that interacts with a database to access and manipulate data

-  relational database is a database that conforms to the relational model. The relational model has the following major aspects:


1. Structures - Well-defined objects store or access the data of a database.
2. Operations - Clearly defined actions enable applications to manipulate the data and structures of a database.
3. Integrity rules - Integrity rules govern operations on the data and structures of a database.


-  relation is a set of tuples. A tuple is an unordered set of attribute values

 Oracle Server Editions
  1. Enterprise Edition (EE) - All features available from 32 & 64 bits
  2. Standard Edition (SE) - Limited to 4 CPUs
  3. Standard Edition One (SE1) - Limited to 2 CPUs
  4. Express Edition - Limited to 1 CPU, 1GB of RAM, database size 11 GB
 Oracle Server Versioning
  • Version 2 - first commercial RDBMS
  • Version 3 - rewritten in the C programming language
  • Version 4 - improved query performance
  • Version 5 - added a networking stack for client-server computing
  • Version 6 - OLTP improvements, oracle parallel server
  • Version 7 - first “Modern” Oracle
    • New security Model - roles & privileges
    • PL/SQL and SQL improvements
    • Datatypes for videos and images
    • 64-bit architectures
  • Version 8
    • Object relational Database
    • Java Support
    • Linux Support
  • Version 8i - ‘Internet Database’
    • New suffixing standard (Optimal Flexible Architecture OFA)
    • More support for HTTP, HTML and Java
    • Function-based indexes
    • Materialized views
  • Version 9i
    • Over 750 new features
    • Oracle Real Application Cluster (RAC)
    • Began regular security patches
  • Version 10g
    • g’ for Grid Computing
    • Improvements in RAC
    • Automatic Storage Management - ASM
  • Version 11g
    • Even More features
    • Real Application Testing
    • Partitioning improvements
    • Online patching
  • Version 12c - Cloud Database
    • Six year development cycle
    • Multi-tenant architecture
    • Virtualization becomes a part of the database

- Oracle Version Numbering


### Schema Objects
- table -  a two-dimensional representation of a relation in the form of rows (tuples) and columns (attributes)

-  schema is a collection of logical data structures, or schema objects. Some database objects, such as profiles and roles, do not reside in schemas.

- table is a set of rows. A column identifies an attribute of the entity described by the table, whereas a row identifies an instance of the entity

- index is an optional data structure that you can create on one or more columns of a table. Indexes can increase the performance of data retrieval

- Structured Query Language (SQL)  is nonprocedural and describes what should be done

- PL/SQL is a procedural extension to Oracle SQL. PL/SQL is integrated with Oracle Database, enabling you to use all of the Oracle Database SQL statements, functions, and data types. You can use PL/SQL to control the flow of a SQL program

- Transaction is a logical, atomic unit of work that contains one or more SQL statements, The basic principle of a transaction is "all or nothing" an atomic operation succeeds or fails as a whole

- Data concurrency, which is the simultaneous access of the same data by multiple users

- lock is a mechanism that prevents destructive interaction between transactions accessing a shared resource

- dirty reads, occur when one transaction sees uncommitted changes made by another concurrent transaction.

- read consistency, guarantees that the data that a single query returns is committed and consistent for a single point in time

- database server is the key to information management. In general, a server reliably manages a large amount of data in a multiuser environment so that users can concurrently access the same data

- Database
A database is a set of files, located on disk, that store data. These files can exist independently of a database instance.

- Database instance
An instance is a set of memory structures that manage database files. The instance consists of a shared memory area, called the system global area (SGA), and a set of background processes. An instance can exist independently of database files.

Database Architecture





Physical Storage Structures

- Data files
Every Oracle database has one or more physical data files, which contain all the database data. The data of logical database structures, such as tables and indexes, is physically stored in the data files.

- Control files
Every Oracle database has a control file. A control file contains metadata specifying the physical structure of the database, including the database name and the names and locations of the database files.



- Online redo log files
Every Oracle Database has an online redo log, which is a set of two or more online redo log files. An online redo log is made up of redo entries (also called redo records), which record all changes made to data.

Many other files - parameter files and networking files. Backup files and archived redo log files are offline files important for backup and recovery.


Logical Storage Structures

- Data blocks
At the finest level of granularity, Oracle Database data is stored in data blocks. One data block corresponds to a specific number of bytes on disk.

- Extents
An extent is a specific number of logically contiguous data blocks, obtained in a single allocation, used to store a specific type of information.

- Segments
A segment is a set of extents allocated for a user object (for example, a table or index), undo data, or temporary data.

- Tablespaces
A database is divided into logical storage units called tablespaces. A tablespace is the logical container for a segment. Each tablespace consists of at least one data file.



Oracle Database Processes

process is a mechanism in an operating system that can run a series of steps. Some operating systems use the terms job, task, or thread. For the purpose of this discussion, a thread is equivalent to a process. An Oracle database instance has the following types of processes:

- Client processes
These processes are created and maintained to run the software code of an application program or an Oracle tool. Most environments have separate computers for client processes.

- Background processes
These processes consolidate functions that would otherwise be handled by multiple Oracle Database programs running for each client process. Background processes asynchronously perform I/O and monitor other Oracle Database processes to provide increased parallelism for better performance and reliability.

- Server processes
These processes communicate with client processes and interact with Oracle Database to fulfill requests.

Instance Memory Structures

- System Global Area (SGA)
The SGA is a group of shared memory structures that contain data and control information for one database instance. Examples of SGA components include the database buffer cache and shared SQL areas. Starting in Oracle Database 12c Release 1 (12.1.0.2), the SGA can contain an optional In-Memory Column Store (IM column store), which enables data to be populated in memory in a columnar format.

- Program Global Areas (PGA)
A PGA is a memory region that contain data and control information for a server or background process. Access to the PGA is exclusive to the process. Each server process and background process has its own PGA.

Application Architecture

- client/server architecture, the client application initiates a request for an operation to be performed on the database server.

- Multitier Architecture, one or more application servers perform parts of the operation. An application server contains a large part of the application logic, provides access to the data for the client, and performs some query processing, thus lessening the load on the database. The application server can serve as an interface between clients and multiple databases and provide an additional level of security.

- service-oriented architecture (SOA) is a multitier architecture in which application functionality is encapsulated in services

Networking Architecture

- Oracle Net Services is the interface between the database and the network communication protocols that facilitate distributed processing and distributed databases.

- Oracle Net, a component of Oracle Net Services, establishes and maintains a network session from a client application to a database server

- Oracle Net Listener (called the listener), which is a process that runs on the database or elsewhere in the network.which is a process that runs on the database or elsewhere in the network. Client applications send connection requests to the listener, which manages the traffic of these requests to the database. When a connection is established, the client and database communicate directly.

- ways to configure an Oracle database to service client requests are:


- Dedicated server architecture

Each client process connects to a dedicated server process. The server process is not shared by any other client for the duration of the client's session. Each new session is assigned a dedicated server process.

- Shared server architecture

The database uses a pool of shared server processes for multiple sessions. A client process communicates with a dispatcher, which is a process that enables many clients to connect to the same database instance without the need for a dedicated server process for each client.

Multitenant Architecture

- multitenant container database (CDB). 
A CDB is a single physical database that contains zero, one, or many user-created pluggable databases.

Multitenant Container Database (CDB). 



non-CDB is a traditional Oracle database





- pluggable database (PDB)

 is a portable collection of schemas, schema objects, and nonschema objects that appears to an Oracle Net client as a non-CDB. A non-CDB is a traditional Oracle database that cannot contain PDBs.



Oracle Database Documentation Roadmap

1. Basic Group

1.1 Oracle Database Concepts
1.2 Oracle Database 2 Day DBA

2. Intermediate Group

2.1 Oracle Database 2 Day + Performance Tuning Guide
2.2 Oracle Database 2 Day + Real Application Clusters Guide
2.3 Oracle Database 2 Day + Security Guide
2.4 Oracle Utilities

3. Advanced Group

3.1 Oracle Database SQL Language Reference
3.2 Oracle Database Reference
3.3 Oracle Database Administrator's Guide
3.4 Oracle Database Performance Tuning Guide
3.5 Oracle Database SQL Tuning Guide
3.6 Oracle Database Backup and Recovery User's Guide
3.7 Oracle Real Application Clusters Administration and Deployment Guide
3.8 Oracle Security Guide
3.9 Oracle Advanced Security Guide
3.10 Oracle Automatic Storage Management Administrator's Guide
3.11 Oracle Net Services Administrator's Guide
3.12 Oracle Clusterware Administration and Deployment Guide
3.13 Oracle Data Guard Concepts and Administration
3.14 Oracle Streams Concepts and Administration
3.15 Oracle Streams Replication Administrator's Guide
3.16 Oracle Advanced Replication
3.17 Oracle Data Warehousing Guide
3.18 Oracle VLDB and Partitioning Guide
3.19 Oracle Net Services Reference
3.20 Oracle OLAP User's Guide
3.21 Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide
3.22 Oracle Database Upgrade Guide 11g Release 2
3.23 Oracle Data Guard Broker 11g Release 2

Question:

How Many Database Virtualization Levels? so can we create CDB inside CDB Database ?


No comments:

Post a Comment