title: Export database from SQLite to MongoDB
body: <p>What's probably the easiest way to migrate a small (&lt; 10MB) database from SQLite to MongoDB using command line interfaces?  </p>
  
  <p>From what I've figured out so far it seems I'll have to do table-by-table:</p>
  
  <pre><code>&gt; .output user.csv
  &gt; .mode csv
  &gt; .header on
  &gt; select*from user;
  &gt; .quit
  &gt; mongoimport --collection user --type csv --headerline --db rebuild user.csv
  </code></pre>
  
  <p>I've also done this before with a script that traversed an XML dump of an RDBMS and populated the NoSQL DB.</p>
  
  <p>Both of these methods work, but they feel inelegant - surely, there's a better way to do it?</p>