The whole database is going to MongoDB

DBToMongo » Use cases » Migrate a database to MongoDB

Download DBToMongo Free Trial »     Buy DBToMongo Now »

The situation

The application is moving to MongoDB, or a copy of the relational database is needed there for a new service. Either way the shape changes: there are no tables, there are collections, and there are no rows, there are documents. A script per table is the usual answer, and it is forty scripts that each have to be kept in step with a schema that keeps moving.

What you do

  1. Connect to the relational database (MySQL, SQL Server, Oracle, PostgreSQL, SQLite, Access, DB2 or DBF) and to the MongoDB server.
  2. Open Tables to Collections: the tables are listed with their automatic destination collection names, and you can accept them or change them.
  3. Check the field mapping for the tables you care about - a row becomes a document, a column name becomes a field name.
  4. Run. Progress and row counts are shown per table, so a problem in table 31 does not need a restart of the first thirty.

Selecting the tables to migrate to MongoDB collections in DBToMongo

Everything runs from your machine to the two servers you name: no cloud service in the middle, no export file to store or clean up, and the credentials never leave the local configuration. Once it is set up, the whole migration is a saved session - one click, or one command for the next environment.

What it will not do

Related

Tables that were split and should be one collection: combine split tables. Field names and types to fix first: reshape the fields. One table only: table to collection. From a query: query to collection. Keeping it current: on a schedule, sessions, command line.