Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'm looking to build a website around an existing database (which I control) that has a large amount of data, but is fairly simple (some number of tables and relations, not complex).

My thought is to use Drupal for the overall site management, and simply display data from the separate data store (managed separately). My intent is to display certain subsets of the data, so I can envision using certain specific queries.

Given the relatively simple setup, would it be preferable to embed code using the PHP module, or to make use of Drupal's content management features to handle this scenario?

share|improve this question

3 Answers

I would be inclined to find some way to make the data available to Drupal for manipulation. "Specific queries" in particular seems like a good fit for Views, and PHP in a node always seems a bit fragile to me.

Without knowing the specifics of either the database or the final site, it's hard to say what the best solution would be, though. It may well be that your application is so simple that separate management is a good idea.

At a minimum it'd be worth looking at the Feeds module. Looks like there's even a way to create "simple database records" instead of nodes.

share|improve this answer
I confirm, Feeds is great to import content into Drupal. – Pierre Buyle Mar 9 '11 at 18:12

If your are decided to queries the existing data from their database, I see two options. Both involve creating a custom module. From there, you can either define your pages or blocks to display data fetched using Drupal's database API. Or you can expose your data to Views by describing your tables. The Views solution may looks harder but once its done you gain the full flexibility and awesomeness of Views.

If you are using Drupal 6, be aware that while it can access multiple databases with its API, they must use the same driver. Also, it only supports MySQL and Postgres.

share|improve this answer
docs for connecting to multiple db on all drupal versions – groovehunter Mar 9 '11 at 14:38

I also in that boat and work on showing data from our informix database and some more. The Feeds module (just used XPath parser for d7) is indeed nice. Many databases do xml exports.

On d6 there is the data module and also table wizard / migrate for these tasks.

I plan to write a views plugin for using yaml files as datasource. Not sure how much trouble this will be.

too tired to elaborate for now - but interested to hear more from your application

share|improve this answer
Just found drupal.org/project/datasources - seems to be almost ready, just needs submodules. I gonna try one for my xml files, maybe it's also appropriate to query another DB ? – groovehunter Mar 9 '11 at 12:49
here's a thread with many info&insight mattfarina.com/2008/01/08/drupal-without-nodes - – groovehunter Mar 9 '11 at 15:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.