Reverse engineering a data source to a new model

Applies to
ApexSQL Model

Summary
This article explains how to reverse engineering a database to a new model using ApexSQL Model, a SQL Server database modeling tool.

About reverse engineering

Reverse engineering represents a process of disassembling a physical model and recreating a logical model from it. This process extracts information from an existing data source to create a new logical model that can be analyzed.. Reverse engineering specifically, only live databases can be used as a data source (vs SQL scripts or ApexSQL schema snapshots).

Description

To start the reverse engineering process in ApexSQL Model, click the New button from the Home tab, to create a new model.

Quick tip icon

Quick Tip:

Prior to reverse engineering a new model, save and close existing model, if any. You will be prompted to save changes, any unsaved existing model will be overwritten.

In the next step select the Reverse button and the SQL Server connection window will appear. Enter the SQL Server connection details, select the desired database that needs to be reverse engineered and click the Connect button.

A progress bar will appear showing outgoing process of creating a new model.

Once the process is finished, the reversed engineered database will be shown in a form of data model diagram representing the logical model of a database, showing tables and its relationships.

The newly created model will inherit the currently saved settings for layout e.g. Hierarchical and connector edging e.g. Orthogonal

All selected data model options which are used and later saved to the created model will persist and the model in the next session will inherit those settings. These settings include diagram layout, edge routing, table view and print options.

Quick tip icon

Note:

Layout, edge routing and grouping options for created models can be configured in View ribbon bar allowing the user to choose how the model will be presented.

FAQ’s:

Q: Do I have to save and close my existing model, prior to reverse engineering?

A: Yes, all setup and changes performed on existing model will be lost unless saved prior to reverse engineering on other data source. If existing model isn’t saved it will lost and can’t be recover or action undone

Q: Does ApexSQL Model support reverse engineering to an existing model?

A: No, this option is not currently supported.

Q: Can objects be imported to an existing model?

A: No, objects and groups of objects cannot currently be imported into an existing model

Q: Does ApexSQL Model include a table editor?

A: Yes, tables can be created or edited and changes can be saved to the model

Q: What object types can be reverse engineered?

A: Currently only tables and relationships can be reverse engineered. All other object types are loaded in background but they aren’t shown in model and cannot be modeled. Support for modeling views, triggers, functions and stored procedures will be available in ApexSQL Model 2018 R2

Q: Can I reverse engineer a database from Azure SQL or Amazon RDS?

A: Yes, reverse engineering is supported for databases on Azure SQL and Amazon RDS.