How to Import an Existing Database into Redgate Data Modeler

Find out how to import existing databases into Redgate Data Modeler.

Guest post

This is a guest post from Redgate Data Modeler.

Find out how to easily import an existing database into the Redgate Data Modeler.

If you're reading this article, you probably know you need to import your database into Redgate Data Modeler. Or maybe you’re wondering if you should do it. Here are some reasons that can convince you if you’re hesitating. And we’ll also explain how to import a database into Redgate Data Modeler.

Why Import an Existing Database into Redgate Data Modeler?

1. You'd like to analyze the database structure.

You have an existing or legacy database and you’d like to analyze its structure. Redgate Data Modeler is a very helpful tool to get deep into the database structure; you can even make notes. You can also easily share the model and your comments to your colleagues, or you can just leave them for yourself. And you can easily generate documentation!

2. You'd like to copy a database structure.

Maybe you have an existing or legacy database that you’re already familiar with. You’d like to copy the database structure into another database. Then you can analyze the structure further or make some adjustments. You can add, remove, or modify tables, sequences, procedures, references, or views. You can also add or remove columns, change their types, names, descriptions, and more!

When you're finished, you can generate a SQL script and/or model documentation and share your work with others.

3.   You'd like to reuse a database structure or make it a starting point for a similar model.

If you have an existing or legacy database and you'd like to generate a new database, it may be a good idea to reuse the structure you already have – especially if the new structure will be similar to the existing one. If you don't need some elements, you can easily remove them. You can also modify the relations between the tables or create new relations. (Make sure to change the descriptions so that they match your new model.) And if you're happy with what you've done, you can share it with others, generate a SQL script, or have Redgate Data Modeler auto-create some documentation.

4.   You'd like to explore your model with a new tool.

Maybe you used another database modeling tool to design your database. It's a good idea to try Redgate Data Modeler and explore your existing model with a new tool.

As you can see, there are many reasons why to import your database into Redgate Data Modeler. And it's certainly worth it. But how do you do it?

How to Import an Existing Database into Redgate Data Modeler

1. Use the Reverse Engineering Tool

You can use Redgate Data Modeler’s reverse engineering tool to connect to a running database and extract its model as an XML file. Here is a step-by-step guide on how to do it. Then you can simply upload the XML file into Redgate Data Modeler. You may also want to take a look at this article for more details.

Importing an Existing Database into Redgate Data Modeler

2. Upload a SQL DDL Script into Redgate Data Modeler

First, get the SQL DDL script from your database (just the structure, without the data). Then, create a new physical data model from your SQL script in Redgate Data Modeler by clicking "Create a new document" and choosing the "Physical data model" option. You'll see a window that looks like this:

Importing an Existing Database into Redgate Data Modeler

Choose your database engine and the "From SQL" option. Import your SQL DDL script, choose a model name, and start modeling. :)

3. Upload a Redgate Data Modeler XML File with Structure Definitions

If you have a Redgate Data Modeler XML file with a structure definition, you can simply import it into Redgate Data Modeler. The steps are the same as option #2, but choose "From XML" instead of "From SQL" and enter your XML file.

4. Copy an Existing Redgate Data Modeler Model

Simply create a copy of a model that you’ve already created in Redgate Data Modeler.

See? It's easy! Try it out yourself. :)

Tools in this post

Redgate Data Modeler

Design, update, and manage database schemas

Find out more