title: Python Sqlite3: Create a schema without having to use a second database
body: <p>I would like to create a schema for a sqlite3 database in python, but sqlite does not appear to support <code>CREATE SCHEMA</code> (<a href="https://www.sqlite.org/lang.html" rel="noreferrer">sqlite docs</a>). I've looked into <code>ATTACH</code>, and it seems like it would do the job by using a second database but I only need one database that has a schema.</p>
  
  <p>I would like to do something along these lines:</p>
  
  <pre><code>import sqlite3
  db = sqlite3.connect('db_file.db')
  db.execute("CREATE TABLE my_schema.my_table(column TYPE);")
  db.commit()
  </code></pre>
  
  <p>However, it throws an exception:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Mod/Projects/sandbox/test_db.py", line 8, in &lt;module&gt;
      db.execute("CREATE TABLE my_schema.my_table(column TYPE);")
  OperationalError: unknown database my_schema
  </code></pre>
  
  <p>I know I can use <code>ATTACH</code> like so...</p>
  
  <pre><code>import sqlite3
  db = sqlite3.connect('db_file.db')
  db.execute("ATTACH DATABASE 'db_file_2.db' AS 'my_schema';")
  db.execute("CREATE TABLE my_schema.my_table(column TYPE);")
  db.commit()
  </code></pre>
  
  <p>...but is there any way to create a schema without a second database?</p>