Databases 7 min read

Master Navicat: Database Design, Structure Sync, and Backup for E‑commerce Projects

Learn how to leverage Navicat’s powerful database design, structure synchronization, and backup features using the Mall e‑commerce project as a case study, with step‑by‑step instructions, screenshots, and tips for managing MySQL models, tables, foreign keys, and environment migrations.

macrozheng
macrozheng
macrozheng
Master Navicat: Database Design, Structure Sync, and Backup for E‑commerce Projects

Mall Project Introduction

The Mall project is a SpringBoot3 + Vue e‑commerce system (GitHub ★60K) that supports multiple modules, Docker and K8S deployment, and includes front‑end shop and back‑end admin with full order workflow covering products, orders, carts, permissions, coupons, members, payments, etc.

Boot project: https://github.com/macrozheng/mall

Cloud project: https://github.com/macrozheng/mall-swarm

Video tutorials: https://www.macrozheng.com/video/

Database Design

Before discovering Navicat’s built‑in design tool, I used PowerDesigner to design databases and then imported them into Navicat. Navicat already includes a modern visual designer, which I demonstrate using the Mall project.

Click the

Model

button on Navicat’s toolbar, then

New Model

to create a MySQL model.

Use the

New Table

button to create a table, e.g.,

ums_admin

, and add fields.

To establish a foreign key, click

Add Foreign Key

and drag between the related fields (e.g., many‑to‑many between admin and role).

Right‑click

Open External Model

to open an existing model, such as the product module.

The complete Mall database design models are stored in the

mall-learning

repository: https://github.com/macrozheng/mall-learning

Structure Synchronization

During development, database schemas evolve. For example, the production environment only has permission and product modules, while the development environment adds an order module. Navicat’s structure sync can copy the new tables from dev to prod.

Production DB:

mall-prod

(contains permission and product tables only).

Development DB:

mall-dev

(contains permission, product, and order tables).

Use

Tools → Structure Sync

, select source and target databases, and let Navicat compare differences.

Proceed through the wizard to apply the synchronization.

Data Backup

Before performing risky operations, backing up the database prevents data loss. Navicat provides backup and restore functions.

Choose

Backup → New Backup

to create a backup file.

To restore, right‑click the backup entry and select

Restore Backup

.

Summary

Navicat is not only a database management tool; its design, structure synchronization, and backup features are highly practical for managing complex e‑commerce databases.

Project Repository

https://github.com/macrozheng/mall

e‑commerceMySQLDatabase DesignBackupNavicatStructure Sync
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.