The data has to come back to SQL

MongoToDB » Use cases » Migrate MongoDB to SQL

Download MongoToDB Free Trial »     Buy MongoToDB Now »

The situation

A MongoDB database is being retired, a report needs the data in a relational warehouse, or the company has standardised on MySQL and the application data still lives in documents. Either way the shape has to change: a collection is not a table, a document is not a row, and there is no schema to copy - the columns have to be decided.

What you do

  1. Connect to the MongoDB server and to the target database (MySQL, SQL Server, Oracle, PostgreSQL, SQLite, Access, DB2, DBF or Redshift).
  2. Open Collections to Tables: the collections are listed with a destination table name each, which you can accept or change.
  3. Review the field-to-column mapping for each table - the destination table is created from the documents, with a type chosen for each field.
  4. Run. Progress is shown per collection, so a problem in one of them does not mean starting again from the first.

Selecting the MongoDB collections to migrate into SQL tables in MongoToDB

Everything runs from your machine: the documents are read over the connection you configured and written straight into the target database. Nothing is staged in the cloud, and the whole migration is a saved session, so moving the next environment is one click or one command.

What it will not do

Related

Documents with sub-fields: flatten nested documents into columns. No direct access to the target: write the result as a SQL file. One collection only: collection to table, or from a query: query to table. Collections that should share a table: similar collections to one table.