Thread: PHP VS Oracle
View Single Post
Old June 8th, 2004, 08:04 PM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

I use Oracle8oci function, not DSN. So, what differences?
You started out talking about PEAR DB, right? The PEAR DB package is an object that allows connection to any one of 13 different databases, actually more than that, it really provides 13 different drivers and umbrellas them into a single package.

fbsql, ifx, mssql, mysqli, odbc, sqlite, dbase, ibase, msql, mysql, oci8, pgsql and sybase.

This is good because it provides DB abstraction, so your code isn't tied to a single database. You just have to use generic, widely implemented, standardized SQL in your applications as opposed to proprietary SQL to reap the full benefits.

The DSN Daniel is talking about is a URI abstraction that PEAR DB uses to connect to the particular database that you specify.

$dsn = "oci8://$user:$pass@$host/$db_name";

This uses the Oracle 8 driver of PEAR DB.


The Spicy Peanut Project