Docs Menu
Docs Home
/
Relational Migrator
/

Create a Project by Loading a Schema From a File

On this page

  • About this Task
  • Before you Begin
  • Steps
  • Next Steps

You can create a project by submitting schema files from your relational system. Creating a project is the first step in the migration process. When creating a project with schema files you:

  • Export a Data Definition Language (DDL) file from your relational system.

  • Import the DDL file into Relational Migrator.

  • Select the database, schema, and tables that are part of the migration.

Relational Migrator only parses statements related to table, keys, and indexes. Any other non-DDL statements are ignored.

The following workbench tools are documented for exporting table DDL files:

  • Oracle SQL Developer

  • SQL Server Management Studio

  • MySQL Workbench

  • pgAdmin

You can use DDL files for project creation when network connectivity or permissions to your relational database are a consideration.

Although you can create a project and map schemas from a DDL file, Relational Migrator still connects to the relational database to run sync jobs.

Before finalizing the creation of your project, you have the choice to select the initial mappings. These options include starting with a recommended MongoDB schema, which is automatically suggested by Relational Migrator based on your relational database.

To create a project from schema files, you must export your schema files from your source relational system. Follow the instructions below to generate DDL files from your relational system.

  1. Open Oracle SQL Developer.

  2. In the main menu, select Tools then Database Export.

  3. Select the database connection.

  4. Uncheck Export Data.

  5. On the Specify Data page, click Lookup and choose the tables you want to include.

  1. Open SQL Server Management Studio (SSMS).

  2. Under Server Explorer, right-click the database.

  3. Select Tasks then Generate Scripts.

  4. Select Save script as file and specify a file path.

  1. Open MySQL Workbench.

  2. In the main menu, select Server then Data Export.

  3. Select the schema objects to export.

  4. Choose Dump Structure Only, Export to Self-Contained File and Include Create Schema options.

  1. Open pgAdmin.

  2. Right-click the Database then Backup.

  3. Enter a path, a filename, and select Plain format.

  4. Select Dump options and enable Only schema.

  5. Select Options and enable Include CREATE DATABASE statement.

Importing DDL files with Sybase ASE is not supported.

Importing DDL files with DB2 is not supported.

  1. Click New Project at the top-right of the Relational Migrator home screen.

  2. Click the Import .SQL file button.

  3. Select a database type. The Relational Migrator currently supports migrating from these database types:

    • MySQL

    • Oracle

    • PostgreSQL

    • SQL Server

  4. Choose or drag and drop a DDL statement file and click Import.

  5. From the Select tables screen, indicate the tables you want to migrate, and click Next.

    The following table explains the different ways you can select tables to migrate:

    Target
    Action
    All tables within a database
    Click the check mark for the target database.
    All tables within a schema
    Expand the target database and click the check mark for the target schema.
    Specific tables within a schema
    Expand the target database and schema. Select the target tables individually.
    Specific table names
    Use the Filter bar above the Relational Schema list.
  6. Choose a Global casing option for collection names.

    This option affects the names of your collections created from the tables in your relational database:

    • Keep Original: Keep the original casing used in your relational database table name.

    • Override with Global Casing: Override the original table name with a global casing convention.

      • camelCase

      • TitleCase

      • kebab-case

      • snake_case

      • UPPER_SNAKE_CASE

  7. Choose an Initial mappings option for your MongoDB schema.

    • Start with a MongoDB schema that matches your relational schema
      Creates your initial project with a new document mapping rule for each table.
    • Start with a recommended MongoDB schema
      Relational Migrator creates mapping rules for a suggested MongoDB schema. When you choose this option, a table appears showing the imported relational tables. Relational Migrator suggests which tables should be represented as top-level or embedded collections. You can use the checkboxes to modify which tables are mapped into collections or embedded.
    • Start with an empty MongoDB schema
      Creates your initial project with no mapping rules.

    Note

    Regardless of the option you choose when starting your project, you have the flexibility to manually add, remove, or modify mapping rules at any time. This allows you to customize the MongoDB schema according to the specific requirements of your workload.

  8. Enter a name for your project.

  9. Click Done.

  • Create Mapping Rules From Relational

  • Create Mapping Rules To MongoDB

Back

Create with Live Database