Hi,

I'm evaluating content management systems for my website, and one my requirements is that the selected system with our Oracle 9i database server. Drupal's features look promising but the database support may be an issue.

I'm interested in hearing from people who use Oracle as a repository for Drupal, particularly comments on scope of any customization or implementation work. I'm the only resource for this project and most of my time is allocated for other things. If integrating Drupal and Oracle is uncharted, or charted and a monumental task, please warn me now.

Thanks,

Mac

Comments

allrite’s picture

We run an Oracle 8.x database and I looked at using Drupal on our system. IIRC, Drupal uses the Pear DB abstraction layer and this does not offer satisfactory support for Oracle LOBs - I don't think the situation is any different for Oracle 9.x. There are also quite a few differences between Oracle's way of doing things and those of MySQL and PostgreSQL to make life quite difficult.

Open Source CMS support for Oracle is quite poor - most are written for MySQL. If you want to use a PHP CMS, I would look for something that uses either the Pear MDB (my current favourite - offers abstracted schema too) or adodb abstraction layers to communicate with the db. Both can handle LOBs.

Perl's DBI abstraction code is more mature and may make Perl based CMS's more flexible, but I haven't looked into this (I prefer PHP).

rinehart’s picture

Thanks for this feedback. I'd love to offer feedback on an Oracle, Drupal implementation, but unfortunately I've got very little time to work on anything. I haven't completely ruled it out, but allrite's comment raises another question:

I assumed that Drupal has it's own schema. Does Drupal make use of LOBs? (i.e. does this Pear DB limitation have a real impact on the ability to implement Drupal)? Is the LOB limitation an issue that may impact me depending on what modules I need? Or is this an issue that may impact my ability to extend Drupal?

Thanks,

Mac

PS My interest in Drupal is primarily because of the extisive availability of modules. I'm impressed.

dries’s picture

I'm not familiar with Oracle's LOBs. However note that you don't have to use PEAR's database abstraction layer as Drupal has his own database abstraction layer. You can write a database.oracle.php just like we have a database.mysql.php. For PostgreSQL and MSSQL we mapped Drupal's database abstraction layer onto PEAR's using database.pear.php but some people are using a database.pgsql.php (a faster PostgreSQL specific backend). You could also consider implementing a database.adodb.php, if you wish to.

rinehart’s picture

Oracle LOBs (Large Objects) include BLOBs (binary) and CLOBs (Character). After reviewing Drupal’s schema and other documents it appears that CLOBs are roughly equal to Text data type. However CLOBs require special read and write functions for accessing and updating data, and I'm not sure if the same applies to the Text data type.

Some resources advise using Oracle's Long data type as a substitute for Text, but the Long data type is less than ideal - Longs make poor use of disk space. After reviewing the Durpal schema and seeing extensive use of the Text data type I'm concerned that using Oracle would require substantial retrofitting.

I’m updating a copy of the database build script and can send that back when I’m done. But owning largely to the fact that this is my first exposure to P HP and to Drupal, I’m having trouble understanding the database abstraction layer. I presume that I’d have to create a database.oracle.inc file in the includes directory that provides abstraction support for oracle. I also assume that I’ll have to add a section to the database.inc file for oracle connections.

Beyond that I’m not too clear. What documentation resources are available that describe the database abstraction layer? Did find the following reference for PHP Oracle functions library: http://www.php.net/manual/en/ref.oci8.php. Perhaps this is required in the PHP install in order to create an abstraction layer for Oracle.

dries’s picture

Thanks for your clarifications. Interesting to see the outcome of you work.

I’m having trouble understanding the database abstraction layer. I presume that I’d have to create a database.oracle.inc file in the includes directory that provides abstraction support for oracle. I also assume that I’ll have to add a section to the database.inc file for oracle connections.

That's correct.

Perhaps this is required in the PHP install in order to create an abstraction layer for Oracle.

Yes, you have to compile PHP with Oracle support.

dries’s picture

AFAIK no one ever used Drupal on an Oracle database server. As such, we don't have an Oracle SQL schema. However, we do try to use ANSI SQL and avoid MySQL-isms and PosgreSQL-isms at all cost.

It would be very interesting to have Drupal work on an Oracle database server - or to get concrete feedback as what needs to be done to make supporting Oracle possible.

kostos’s picture

Roughly Opracle will understand constructions like INNER/OUTER JOIN..

coderintherye’s picture

There has been some work on this: http://drupal.org/node/39260
And here: http://www.oracle.com/technology/pub/articles/pedros-drupal.html

I am being asked to try to connect Drupal to an Oracle database, and while I respect the open-source mantra and push it as much as possible, I have no options in this regard. I understand that Drupal 7 will be more friendly towards such an installation with the new database schema, yes? Should I try delay tactics till 7 is released or should I try these hacks to try to get Drupal to work with Oracle database?

rockert’s picture

To cut it short...oracle sucks :|
--------------------------------------------------------------
I'm sad. I'm Emo