Drupal Database Best Practices?

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

I've been using Drupal now for a couple of years but I'm still learning how to program for Drupal and what the best practices are for this.

My question is about adding tables to the database. For the tables that I need to use on my site, is it better practice to add these to the Drupal database (prefixing them so that they are easily separated from the Drupal tables) or should I create a separate database for site specific tables?

Thanks,
Dan

Comments

Either practice is OK

wylbur's picture

Of course there is a module that can help with that too. The Data module can help you create and use database tables.
http://drupal.org/project/data

Keep the tables in the same database

akay's picture

Unless you have a separate database server or have a need to segment the data (ie: giving Drupal read-only access to the table), I would suggest keeping it in the same database.