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.
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
Modelbutton on Navicat’s toolbar, then
New Modelto create a MySQL model.
Use the
New Tablebutton to create a table, e.g.,
ums_admin, and add fields.
To establish a foreign key, click
Add Foreign Keyand drag between the related fields (e.g., many‑to‑many between admin and role).
Right‑click
Open External Modelto open an existing model, such as the product module.
The complete Mall database design models are stored in the
mall-learningrepository: 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 Backupto 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
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.