Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently working on a project where I have 2 databases: the internal site database, and an external database that contains a table with establishment information I want to display as pages on my site.

The external database can still be modified from another application.

How do I go about doing this? Should I create a module to generate static pages, or nodes? What are the differences, or implications of choosing either option?

share|improve this question
you should import external db into internal. – monymirza Nov 13 '12 at 6:40

What approach you want to use depends on the remote database and how dynamic the information is as well as how much data you expect to display.

If the remote DB is easy to work with and you don't need to do anything interesting with the data you might integrate with it using a custom module working directly against the remote database.

If the data needs to integrate with typical Drupal stuff (Views, Panels, Pages, Fields) then you might want to pull the data into nodes. This would still probably mean a custom module. I believe the Migrate module (http://drupal.org/project/migrate) could be a good help here.

How current the data needs to be is also a consideration. Should it checked for new content every time a certain page is visited or is it fine to run it on a cronjob in the background. Like every 3 hours?

share|improve this answer
I vote for node generation and updates! – magtak Nov 9 '12 at 15:03
Understandable. It has more future-proofing but is more involved. Depends entirely on if this is a one-off or if it's something @wishiknew will need to live with :) – jbn Nov 9 '12 at 15:07

What you describe is similar to what the API module does; the difference is the source used to generate content, which in the case of the API module is the source code of Drupal and other modules.

The API module creates nodes for each documentation page just to allow commenting on those pages. Nodes are not used for showing the documentation pages; in fact, if you try visiting http://api.drupal.org/node/27228, you are redirected to http://api.drupal.org/api/drupal/modules!taxonomy!taxonomy-term.tpl.php/7.

share|improve this answer

Your Answer


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.