You can add and remove another database files to the current database connection. Every attached database is identified by its unique name (prefix). The names 'main' and 'temp' refer to the main database and the database used for temporary tables. These cannot be detached. You should access database objects with full prefixed naming convention:
SELECT * FROM newdb.foo_table;
Consult Sqlite documentation.