Convert a SQL database design to a drupal schema installation file I have a, rather big, application that I would like to integrate into Drupal reusing the current database design / logic.

Is there a tool out there that can help me to build the PHP part of the hook_schema definition taking the current database model or an SQL file with the DB declaration as a starting point ?

From what I know it should be pretty trivial to convert a SQL file to a PHPish definition compatible with drupal.

The utility should convert SQL types to Drupal types and declare primary keys, unique keys and index ala drupal.
I knew of a few possabilities, only 2 may work. I haven't tried:

dbtng_migrator - migrates a drupal db to different DBMS engines at will. no schema export support.

Data - module to move data into and out of drupal databases.


  The Data module provides
  
  an API for dynamically allocating tables for single-row records. an
  API for insert/update/delete operations and describing how tables join
  to each other. automatic views integration. a way to export table
  definitions to code.


Schema - drush dl schema Includes the following functionality not found in Core:


  Schema structure generation: the module examines the live database and
  creates Schema API data structures for all tables that match the live
  database.


I have a drupal DB with other database connections defined in settings.php. You can go into Schema settings and tell to look at any named database connection (by default drupal is default). Here I select dew_remote_sources -- a "remote" (non drupal) database of data. The inspect tab then lists the SchemaAPI hook_schema defintion for each table with dummy comments to fillin.



Lastly views_schema is pretty cool. It creates the hook_views_data for drupal tables based on their schema api definition.

Honestly I dont think you looked at @4Life answer close enough because given a db connection string, Schema does what you want.