Introduction to ORACLE : –  Oracle DB is well known for scalability , reliability and features.It is a leading DB and is available on many platforms.

Oracle Terminology:  

  1. 1.       Databases and Instances :-  Oracle databases store and retrieve data. Each database consists of one or more data files. An Oracle database server  consists of an Oracle database and an Oracle Instance. Whenever an Oracle database server is started , a shared memory region SGA(System Global Area) is allocated and Oracle background processes are started. Combination of background processes and SGA is called an Oracle Instance.   
  2. 2.       Tablespaces :-  Tablespaces are logical unit of data storage made up of one or more datafiles. 
  3. 3.       Schemas:- A Schema is a collection of database objects such as tables and indexes. Typically, a single DB contains multiple schemas. Multiple Application can use same DB without any conflicts by using   different schemas. Instead of using a CREATE DATABASE command for new application , use CREATE USER to create a new schema in the database. 


PHP has several extensions that let application use Oracle DB. Database access  and abstract library in each extension of PHP   is fundamentally similar. The differences are in  support for advanced features and programming methodology.

If you want to make full use of Oracle features and need high performance, PHP OCI8 extension  has to be used. PHP OCI8 is a main ORACLE Extension.

If you want database independence , use PHP PDO(data object) or ADOdb extension for database abstraction.


PHP Oracle Extensions

1.Oracle (Not recommended)




PHP Oracle extensions are written in C  and linked into PHP Binary.



OCI8 Extension :- OCI8 Extension is recommended extension to use. It is used in PHP 3,4 and 5.




$s=oci_parse($con,’select * from User’);



echo $res[‘name’];




Bundle Containing OCI8 Location and Current Release
  1. PHP Source Code
  1.  PECL Source Code
  1.  Zend Core for Oracle 2.5



Oracle has cross-version compatibility, that means if PHP OCI8 is linked with Oracle10g  Client Libraries, then it can able to connect with Oracle database  8i,9i,10g,11g. If OCI8 is linked with oracle 11g client libraries then it can able to connect with Oracle9iR2 onwards  .

Full OCI8 functionality may not be available unless Oracle client libraries and database servers are latest version.

OCI8 and Oracle Compatibility Matrix

Software Bundle PHP Version OCI8 VersionIncluded Oracle Client Libraries Usablewith OCI8
PHP Release Source Code Current release is 5.2.7 OCI8 1.2.5 8i, 9i, 10g, 11g
PECL OCI8 Source Code Builds with PHP 4.3.9onwards Latest release isOCI8 1.3.4 9iR2, 10g, 11g
Zend Core for Oracle 2.5 Includes PHP 5.2.5 OCI8 1.2.3 Inbuilt Oracle Database 10g client


Oracle database XE (Oracle 10g ) is available on 32-bit Windows and Linux platform.Oracle DatabseXE is available on Oracle network

Oracle Database XE has a browser based management interface, Oracle Application Express.

Installing Oracle Database XE on Windows




One Response

  1. Hi,

    Very interesting. Thanks for such great article.

    Thanks and regards,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: