We are building a Drupal site to replace an old ASP.Net site.

This site will show a user's view of the information we have on/by/for them, their correspondence, the grades for the courses they have taken, the list of dues that they have paid, etc.

The information we want to show is all on an Oracle DB inside our firewall. We have a web service that exposes that information to us and currently use it in a ASP.Net application that we will be replacing.

We really won't be editing the content in the Admin interface at all, all the content will be generated from calls to the web service.

Would we write a module or a block or both to show this information to the user?

We're kind of new to Drupal and not really understanding the terminology.

  • Are you asking how to use an external database and your own tables for some content types? Or are you asking how to import the data into a Drupal site? I answered the first question below. Second question is much easier. :-)
    – paul-m
    Feb 27, 2012 at 23:03

2 Answers 2


A module is a "piece of functionality" which can extend Drupal's capabilities with a lot of different things - like a plugin/extension in another system. It might or might not add functionality which is visible on the frontend - there are pure API modules for example.

Blocks are pieces of specialized displays - like widgets. Many times what you can see in the sidebar of a page is nothing else but blocks. For example setting up a category list or a tagcloud in a blog could be (and perhaps should be) done via blocks.

Modules and blocks are related in some way: a module can provide different blocks to use, for example the core comments module provides the "Recent comments" block.

If you would like to understand the complete terminology, check out Pro Drupal 7 Development - it's a great start for developing for Drupal.

  • I actually have that book but their examples aren't clear enough to understand what we need in this case. They are too generic.
    – MB34
    Feb 27, 2012 at 21:47
  • 1
    I understand your feelings, but I would definitely like to advise you to make your way through that book. Please excuse me if I'm being rude, but your question indicates that you haven't mastered the basics of that book. Take your time with the examples, read the code and check the API documentation etc. It's not that hard, many Drupal developers used that book for learning module development. The examples in the book are constructed in a way to let the readers see the most important aspects of Drupal development, I'm sure you will find a way to implement the functionality you want with that.
    – Scorchio
    Feb 27, 2012 at 22:18
  • But the examples are ALL for some kind of functionality that our site will never have. We do not intend to ever have a site where comments are added, or users contribute to anything. It will never be a blog or anything similar. It is an informational site only and we just need to get and show information. None of the module examples I've seen do that.
    – MB34
    Feb 28, 2012 at 14:44

Drupal has an API called 'entities.' Entities define the relationship between Drupal content and a database and its storage. The major content types in Drupal 7 are implemented with the Entity API; node, user, taxonomy... All are entities. You can also implement your own entity types.

So, for instance, an external database could be defined in the site's settings.php file, named something like 'our_oracle_database.' Then you could define an entity by implementing hook_entity_info() in a module. This entity would show the table schema to Drupal, and Drupal would then be able to use that table as content. You'd then define a controller class for your entity, which would use your database for CRUD functions.

It's completely non-trivial, and not a thing to shoot off in one single answer on Drupal Answers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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