This is taken from the cck module. first you would define the schema you want to call in the hook_install funtion
/**
* Implementation of hook_install().
*/
function content_install() {
drupal_install_schema('content');
}
The you would define the schema as follows this is just the first schema defined in the cck module the entire function is a bit large
/**
* Implementation of hook_schema.
*/
function content_schema() {
// Static (meta) tables.
$schema['content_node_field'] = array(
'fields' => array(
'field_name' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'type' => array('type' => 'varchar', 'length' => 127, 'not null' => TRUE, 'default' => ''),
'global_settings' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE, 'serialize' => TRUE),
'required' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0),
'multiple' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0),
'db_storage' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 1),
'module' => array('type' => 'varchar', 'length' => 127, 'not null' => TRUE, 'default' => ''),
'db_columns' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE, 'serialize' => TRUE),
'active' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0),
'locked' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0),
),
'primary key' => array('field_name'),
);
return $schema;
}
You can take a look at the contributed modules and you should be able to get a better idea.
Reference