For backward compatibility purpose I would like to know a layout of my database, i.e. which tables are incorporated in my database, for each table which columns are included, etc.
The sqlite_master table contains only table information. Theoretically I have access to this metadata information through SQLite API such as sqlite3_column_database_name, sqlite3_column_table_name, sqlite3_column_origin_name.
Could I have a direct SQL query to receive this data or it is stored internally?
Well it’s not stricly speaking SQL, but it is accessible as SQL in all sqlite implementations I know of:
http://www.sqlite.org/pragma.html#pragma_table_info
An example: