How can I use a custom table as a node type? I am reasonably new to Drupal, I have written a couple of basic modules by following the excellent videos from buildamodule.com

Now I need to somehow integrate an existing table into a drupal site.  I would like this table to be accessable as a content / node type to the rest of the drupal system.  I do not want to add this as a content type to drupal and use the table per field system drupal has as I already have the table structure and need to be able to update the data in this table from an external source.

I tried creating a new content type in a module and was able to create a schema using the schema module.  However when i use  field_create_field and field_create_instance I end up with a seperate set of fields.

How do I create a new content type in a module that can use an existing table for its data ( even if I need to provide access functions in my module)?

Is there a good tutorial somewhere that someone knows of?
While you're making work for yourself using a custom table and not the Field API, you can use your own table with


hook_node_load ( load data from custom table into node )
hook_node_insert ( insert record in custom table )
hook_node_update ( update record in custom table )
hook_node_delete ( delete record from custom table )


You'll probably also need


hook_form_alter


if you want to add form elements to the node form.

Keep in mind the Field API will do that all for you though if using standard fields.