Skip to main content

๐Ÿ‘ Define the Initial Schema

Relational Migrator gives you three options on how your initial MongoDB schema will be created. Regardless of which option you choose, you can manually modify your schema later.

OptionWhat it does
Start with a MongoDB schema that matches your relational schemaMaps each table exactly to one collection, including link tables (for 1:n relationships). We're just replicating the existing schema, which won't take advantage of the Document Model.
Start with a recommended MongoDB schemaWill try to understand your schema and embed 1:n relationships.
Start with an empty MongoDB schemaYour MongoDB schema will be empty. You'll create all the mappings yourself.

Select Start with a recommended MongoDB schema

You can see which tables will be mapped to a collection in MongoDB: those marked as TOP-LEVEL.

Select the following six collections as TOP-LEVEL since they are the main entities in our schema:

  • authors
  • books
  • languages
  • operations
  • reviews
  • users

Any tables you did not check will be embedded in other collections.

Defining the initial schema

Select the casing you'd like for your collections - the default is camelCase.

Click Next, then give your project a name.