How do I specify in which database my schema should be created?
I have achieved this with the information provided by Berdir. My code looks like:

&lt;?php
function mymodule_schema_otherdb() {
  $schema['mytable'] = array(
    'description' =&gt; 'My table description',
    'fields' =&gt; array(
      'myfield' =&gt; array(
        'description' =&gt; 'My field description',
        'type' =&gt; 'serial',
        'size' =&gt; 'medium',
        'not null' =&gt; TRUE,
        'unsigned' =&gt; TRUE,
      ),
    ),
    'primary key' =&gt; array('myfield'),
  );
  return $schema;
}

function mymodule_install() {
  db_set_active('otherdb');
  $schema = mymodule_schema_otherdb();
  foreach ($schema as $name =&gt; $table) {
    db_create_table($name, $table);
  }
  db_set_active();
}

function mymodule_uninstall() {
  db_set_active('otherdb');
  $schema = mymodule_schema_otherdb();
  foreach ($schema as $name =&gt; $table) {
    db_drop_table($name);
  }
  db_set_active();
}