Create a Project by Loading a Schema From a File
On this page
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.
About this Task
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.
Before you Begin
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.
Open Oracle SQL Developer.
In the main menu, select Tools then Database Export.
Select the database connection.
Uncheck Export Data.
On the Specify Data page, click Lookup and choose the tables you want to include.
Open SQL Server Management Studio (SSMS).
Under Server Explorer, right-click the database.
Select Tasks then Generate Scripts.
Select Save script as file and specify a file path.
Open MySQL Workbench.
In the main menu, select Server then Data Export.
Select the schema objects to export.
Choose Dump Structure Only, Export to Self-Contained File and Include Create Schema options.
Open pgAdmin.
Right-click the Database then Backup.
Enter a path, a filename, and select Plain format.
Select Dump options and enable Only schema.
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.
Steps
Click New Project at the top-right of the Relational Migrator home screen.
Click the Import .SQL file button.
Select a database type. The Relational Migrator currently supports migrating from these database types:
MySQL
Oracle
PostgreSQL
SQL Server
Choose or drag and drop a DDL statement file and click Import.
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:
TargetActionAll tables within a databaseClick the check mark for the target database.All tables within a schemaExpand the target database and click the check mark for the target schema.Specific tables within a schemaExpand the target database and schema. Select the target tables individually.Specific table namesUse the Filter bar above the Relational Schema list.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
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.
Enter a name for your project.
Click Done.