Navicat Blog

December 13, 2017 by Robert Gravelle

A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized and manipulated. There are many kinds of data models, but the most popular type is the relational model, which uses a table-based format.

Usually, the data warehousing staff of a business will design one or more types of data models in order to most effectively normalize the tables and pan how to most efficiently store and retrieve business data. Another advantage of doing this exercise upfront is that many professional tools like Navicat can utilize the models as plans and build the database according to their specifications.

That being said, it is an unfortunate fact that all-too-often, data models get misplaced or deleted over time. In that event, DBAs have no recourse but to either redraft the models from scratch or, if they're in the know, let their Database Management Tool create models for them based on the existing database.

In today's tip, we'll learn how to create a model from a variety of database objects in Navicat Premium.

Launching the Wizard

The process of extracting design information from a software product is known as “reverse engineering”. In Navicat, you can reverse engineer a database/schema, tables or views to a physical model.

To reverse engineer a database schema, right-click it in the Navigation Pane and choose Reverse Schema to Model… from the popup menu:

Navicat will then generate a physical model from the selected schema and open it in a new Model window:

You can then work with the new model just as you would one that you created from scratch. For example, you can add relationships, move objects around, and save the model.

Reversing Tables to Model

Individual tables or views may be reverse engineered into physical models as well by right-clicking them in the Navigation Pane and selecting Reverse Tables to Model… from the popup list:

That will open the selected table in a new Model window:

Selecting Multiple Tables/Views

It is also possible to select more than one table or view by selecting them in the Objects pane:

Right-clicking anywhere within the selection and choosing Reverse Tables to Model… from the popup list will now open those tables/views in a new Model window:

Importing Databases, Schema, Tables or Views from the Model Window

Navicat also supports the importing of databases, schema, tables or views from the Model window. A step-by-step wizard is provided to guide you through the import process.

  • Begin by opening a new Model window, either by:
    • Clicking the Model button on the main toolbar followed by the New Model button on the Objects toolbar:
    • OR

    • Selecting File > New > Model… from the main menu:

  • Enter the Database Vendor and Version number in the New Model dialog and click OK to open a new Model window for that product:
  • Select File -> Import from Database from the Model window menu:
  • On the Import from Database dialog, select a Connection.
  • Choose the databases, schemas, tables or views you want to import:
  • Click Start to create the model from the selected objects.

Conclusion

Should the need ever arise to reverse engineer database objects into a model, Navicat has you covered. Available in Navicat Premium and Enterprise Editions, the Reverse Engineering feature takes the challenge out of physical model creation from databases, schema, tables or views.

Navicat Blogs
Feed Entries
Blog Archives
Share