|
3 | 3 | =================================================
|
4 | 4 | Create a Project By Connecting to a Live Database
|
5 | 5 | =================================================
|
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 1 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +You can create a project using a live database connection. |
| 16 | +Creating a project is the first step in the migration process. |
| 17 | +When creating a project with a live connection you: |
| 18 | + |
| 19 | +- Provide the connection details for your source relational system. |
| 20 | + |
| 21 | +- Provide the connection details for your destination MongoDB deployment. |
| 22 | + |
| 23 | +- Select the database, schema, and tables that are part of the migration. |
| 24 | + |
| 25 | +About this Task |
| 26 | +--------------- |
| 27 | + |
| 28 | +Creating a project with live a live connection is the recommended process for starting a new Relational Migrator project. |
| 29 | + |
| 30 | +Steps |
| 31 | +----- |
| 32 | + |
| 33 | +1. Click :guilabel:`New Project` at the top-right of the Relational Migrator home screen. |
| 34 | + |
| 35 | +#. Click the :guilabel:`Connect database` button. |
| 36 | + |
| 37 | +#. Select a database type. Relational Migrator supports migrating from the following |
| 38 | + database types: |
| 39 | + |
| 40 | + - MySQL |
| 41 | + - Oracle |
| 42 | + - PostgreSQL |
| 43 | + - SQL Server |
| 44 | + |
| 45 | +#. Enter the connection details to create the JDBC URI for your relational database. |
| 46 | + |
| 47 | + a. Enter a host IP or DNS name in the :guilabel:`Host` text box. |
| 48 | + |
| 49 | + b. Enter a port number in the :guilabel:`Port` text box. |
| 50 | + |
| 51 | + c. Enter a database name in the :guilabel:`Database` text field. Depending on your |
| 52 | + relational database, this behavior varies: |
| 53 | + |
| 54 | + .. list-table:: |
| 55 | + :header-rows: 1 |
| 56 | + :widths: 25 75 |
| 57 | + |
| 58 | + * - Database Type |
| 59 | + - Behavior |
| 60 | + |
| 61 | + * - Oracle |
| 62 | + - The database name is required. You also need to specify a :guilabel:`Service ID` |
| 63 | + or :guilabel:`SID`. |
| 64 | + |
| 65 | + * - SQL Server |
| 66 | + - Leaving database name blank loads all databases. |
| 67 | + |
| 68 | + * - MySQL |
| 69 | + - Leaving database name blank loads all databases. |
| 70 | + |
| 71 | + * - Postgres |
| 72 | + - Leaving database name blank loads schemas from the default database. |
| 73 | + |
| 74 | + d. Enter a user name in the :guilabel:`Username` text box. |
| 75 | + |
| 76 | + e. Enter a password in the :guilabel:`Password` text box. |
| 77 | + |
| 78 | + f. (Optional) Click the :guilabel:`Save a password for this session` check box to |
| 79 | + avoid reentering your password in the project. |
| 80 | + |
| 81 | + g. Click the :guilabel:`SSL` toggle switch to enable or disable SSL and select an SSL mode. |
| 82 | + |
| 83 | + h. Click :guilabel:`Connect`. |
| 84 | + |
| 85 | + Connection and SSL details depend on the database type you are connecting to. |
| 86 | + In addition to the generic connection properties listed above, you may also |
| 87 | + need to select an ``Identifier`` for Oracle and ``Authentication`` for SQL Server. |
| 88 | + |
| 89 | + .. note:: |
| 90 | + |
| 91 | + If you want to specify the JDBC URI manually, click the :guilabel:`Enter URI manually` |
| 92 | + toggle switch on the :guilabel:`Connect to the database screen`. For |
| 93 | + details see, :ref:`Relational Database Connection Strings <rm-relational-database-connection-strings>`. |
| 94 | + |
| 95 | +#. From the :guilabel:`Select tables` screen, indicate the tables you want to migrate |
| 96 | + and click :guilabel:`Next`. |
| 97 | + |
| 98 | + The following table explains the different ways you can select tables to migrate: |
| 99 | + |
| 100 | + .. list-table:: |
| 101 | + :header-rows: 1 |
| 102 | + :widths: 25 75 |
| 103 | + |
| 104 | + * - Target |
| 105 | + - Action |
| 106 | + |
| 107 | + * - All tables within a database |
| 108 | + - Click the check mark for the target database. |
| 109 | + |
| 110 | + * - All tables within a schema |
| 111 | + - Expand the target database and click the check mark for the target schema. |
| 112 | + |
| 113 | + * - Specific tables within a schema |
| 114 | + - Expand the target database and schema. Select the target tables individually. |
| 115 | + |
| 116 | + * - Specific table names |
| 117 | + - Use the :guilabel:`Filter` bar above the :guilabel:`Relational Schema` list. |
| 118 | + |
| 119 | +#. Choose a :guilabel:`Global casing` option for collection names. |
| 120 | + |
| 121 | + This option affects the names of your collections created from the tables in |
| 122 | + your relational database: |
| 123 | + |
| 124 | + - :guilabel:`Keep Original`: Keep the original casing used in your relational |
| 125 | + database table name. |
| 126 | + |
| 127 | + - :guilabel:`Override with Global Casing`: Override the original table name |
| 128 | + with a global casing convention. |
| 129 | + |
| 130 | + - ``camelCase`` |
| 131 | + - ``TitleCase`` |
| 132 | + - ``kebab-case`` |
| 133 | + - ``snake_case`` |
| 134 | + - ``UPPER_SNAKE_CASE`` |
| 135 | + |
| 136 | +#. Choose an :guilabel:`Initial mappings` option for your MongoDB schema. |
| 137 | + |
| 138 | + - :guilabel:`Start with a MongoDB schema that matches your relational schema`: Creates your |
| 139 | + initial project with a new document mapping rule for each table. |
| 140 | + |
| 141 | + - :guilabel:`Start with a recommended MongoDB schema`: Relational Migrator chooses |
| 142 | + mapping rules for you. |
| 143 | + |
| 144 | + - :guilabel:`Start with an empty MongoDB schema`: Creates your initial project |
| 145 | + with no mapping rules. |
| 146 | + |
| 147 | +#. Enter a name for your project. |
| 148 | + |
| 149 | +#. Click :guilabel:`Done`. |
| 150 | + |
| 151 | +Next Steps |
| 152 | +---------- |
| 153 | + |
| 154 | +- :ref:`Create Mapping Rules From Relational <create-rule-relational>` |
| 155 | + |
| 156 | +- :ref:`Create Mapping Rules To MongoDB <create-rule-mongodb>` |
0 commit comments