very new to drupal. I need to create section of my website that contains a directory of 300 companies. I think it be best to create separate databasetables and not included this data in drupal's nodal architecture. Is there a typical/best practise way to manage custom data in drupal

Comments

Anonymous’s picture

In Drupal 7 I think best practice would be to use the entity/field APIs (http://drupal.org/node/878784, http://api.drupal.org/api/drupal/modules--field--field.module/group/field/7). You'd use these to define your own entity (a company) and then attach fields and behaviours to it using core hooks.

I'd strongly recommend reconsidering using the node system though, it's very powerful and can save you an awful let of development time. If you define a content type called company and add some fields to it using the UI you've already saved yourself a lot of development and decision making time, plus you get the advantage of so many hundreds of contributed modules that help extend a node's functionality (some absolute must haves are pathauto.

If you'd rather do it yourself though (it's exactly what I did when I first started with Drupal!) look into the schema API for defining your table structures (http://api.drupal.org/api/drupal/includes--database--schema.inc/group/sc...), hook_menu for providing page callbacks and the theming system for controlling your output.

Be prepared to be frustrated! Learning Drupal is a fairly steep curve but once you know how it works it's an absolute joy to develop with.