database support

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
HansBKK's picture

Shared database technique in general

After investing a lot of time trying to figure out how to do multi-site via a shared database, I've come to the following (personal opinion) conclusion.

Just Say No

Reasons:

Read more
HansBKK's picture

D5 Shared database - sharing all but theming/layout/navigation

Warning - I'm a noob, please be gentle

Here's a pretty much self-documented settings.php file showing how I've got my multi-site working. If someone familiar with Drupal's (v5) database structures could scan this and comment I'd really appreciate it. Note ALL the core tables are listed here, as per grepping "CREATE TABLE" from the .install files.


$db_prefix = array(
'default' => 'watchout_drupal.shb1sh_', /* new tables get created here, /
/
need to analyze and then add (shared or separate?) below /
'cache' => 'shb1sh_', /
must be separate /
'cache_filter' => 'shb1sh_', /
must be separate /
'cache_menu' => 'shb1sh_', /
must be separate /
'cache_page' => 'shb1sh_', /
must be separate /
'variable' => 'shb1sh_', /
must be separate /
'accesslog' => 'shb1sh_', /
site tracking - separate /
'client' => 'shb1sh_', /
site tracking - separate /
'client_system' => 'shb1sh_', /
site tracking - separate /
'flood' => 'shb1sh_', /
site tracking - separate /
'watchdog' => 'shb1sh_', /
site tracking - separate

Read more
hswong3i's picture

My personal battle target for Druapl 7.x

My primary battle plan should be enhance Drupal cross database compatibility. I have involved in this topic for around a year, and I would like to keep it on going. To accomplish this target, I would like to complete the following tasks before D7 code freeze:

<

ul>

  • Improve Database API for better abstraction

    Something should be done before any other targets, e.g. resolve reserved words conflict, split drivers into individual files for better management, indeed but simple abstraction for different database syntax, add INSERT/UPDATE/DELETE abstraction and enhance drupal_write_record() abstraction, etc. With a better common base for multiple database development, we will need much less time to study the differences between databases than that of before.

  • Add PHP PDO supporting

    Shipping D7 with PHP PDO should be a spotlight topic, since it is now official package for PHP5.2.x, and legacy drivers will soon be removed in PHP6.x. We may need some cleanup in our core query syntax, in order to let PDO get works.

  • Introduce more database backend

    Up to this point, I would like to introduce some other database backend for D7, e.g. <a href="http://drupal.org/node/39260'>Oracle, SQLite, IBM DB2 and also MSSQL. If we are able to support SQLite in D7, which also means we are going to standardize our core queries into SQL92 standard, the problem for maintain multiple database backend should no longer a critical problem; if we are able to support Oracle, the most complicated database I guess, this should no longer a problem for us to implement drivers for other databases.

  • I have summarize most of my personal battle targets in here. Most logic are proved as functioning, and they are all get set for the open of D7 public development. On the other hand, I would like to explore if this may integrate with other interest musings with Data API, so we will able get all stuff better in D7 ;-)

    Read more
    Souvent22's picture

    PHP 5.2.5 breaks SQL Server support; Yet MSFT SQL Driver Works

    So, I've had some free time latley, and I've started back on the database API layers (DB2 and SQL Server currently).
    However, I have found 2 disturbing issues.

    Overview
    First, I'm currently exploring the following 3 ways to connect to sql server:
    1. FreeTDS
    2. php_mssql driver
    3. MSFT SQL Driver ( See pcorbetts posting for a link to the driver )

    1. PHP 5.2.5 breaks support for SQL Server
    Read more
    hswong3i's picture

    Ready for Testing: New DB2 Driver for Drupal

    After 4 days (!?) development, a new DB2 driver for Drupal 6.x is now ready for testing. It takes IBM's D5 DB2 implementation as base reference, and reuse almost all Oracle driver for Drupal 6.x progress for overcoming DB2-specific limitations.

    Read more
    hswong3i's picture

    Ready for Testing: New Oracle Driver for Drupal

    After over 1.5 years of development (since 29/11, 2005), plus number of developers contribution, and help of Drupal 6.x schema API, a new Oracle driver for Drupal 6.x is now ready for testing.

    The latest version of Oracle driver overcome a lot of Oracle-specific limitation, and able to work well as like as existing Drupal database driver, e.g. MySQL and PgSQL.

    Read more
    bjaspan's picture

    Welcome and background

    Welcome to the Database Schema API group. A number of different Drupal developers have independently suggested and/or coded various approaches to abstracting table creation/alteration. The idea finally seems to have reached critical mass and I suggest that we will be best served by combining everyone's efforts on the topic. Hence, this group.

    By way of background, here is some recommended reading on the topic:

    Read more
    Souvent22's picture

    SQL Changes List

    Ok, I'm just going to start listing the SQL statements that I find that need changing here. Trying to release patches for them all and keep up is getting out of hand:

    Watchdog
    - Line 123, remove the u.uid, it is not needed since the w.* already gives you that column.

    (more to come soon)

    Read more
    Souvent22's picture

    ODBTP Anyone one?

    So, I was checking out ODBTP < http://odbtp.sourceforge.net/ > and considering making a drupal driver for it. This would allow many database to now be supported through ODBC. I also hear that ODBTP is just as fast as a native driver and the speed of ODBC really depends on the implementation of the vendor of ODBC. Just seeing if anyone had any experience with it and/or thoughts?

    Read more
    Souvent22's picture

    The Time Draws near for Stored Procs...across the board

    Ok, i'll be the one to call the pink elephant in the room.....stored procedures do exisit. There I said it. :). With MySQL 5 starting to support them, Postgres has had them, and the push latley to start using a wider array and more robust DB's (oracle, mssql, DB2), it is time I think to start thinking about a database abstraction layer to handel stored procedures. I'm thinking perhaps something like this:

    /**
    * @param $proc_name Name of the stored proc.
    * @param $args Argements to send to the proc indexed by the variables name. e.g. array('name' => 'Jim Smith');

    Read more
    Subscribe with RSS Syndicate content