Visualization of existing MySQL databases

All database connections are available in the Connections section. To create a new connection, click the Connections button on the main toolbar, and then click Create New Connection. A new modal form opens. Select MySQL and enter the connection details.

When you are finished, click the Save Connection button.

Database connections

Your new MySQL connection will appear in the list of all database connections.… Read the rest

MySQL database modeling

In Moon Modeler you can easily draw MySQL structures.

Database tables

Database tables are displayed as graphical boxes with all column fields.

JSON

One of the main advantages of Moon Modeler is the possibility to visually display nested structures.
The structures are displayed inside tables and also as separate graphical objects.… Read the rest

MySQL database design in Moon Modeler

Quick-start guide for MySQL DB database design

  1. New project
  2. Tables and columns
  3. JSON datatypes
  4. Relations and foreign keys
  5. Code generation

1. New project for MySQL

To create a new project, click the New icon on the main toolbar and select the MySQL project type.

2. Adding tables and columns to the project and diagram

New database tables can be added into projects by clicking Table on the toolbar and then by clicking the main diagram area.… Read the rest

Primary key vs unique key

What is the difference between primary and unique keys?

What primary keys are and what they are used for is explained in the article describing the difference between primary and foreign keys.

A short summary: Primary keys serve as the identifier of a unique record, it can be unique information, such as a driver’s license number, telephone number including area code, car VIN number, etc.Read the rest

Primary key vs foreign key

What is the difference between primary and foreign keys in relational databases?

Primary keys serve as the identifier of a unique record in a database table. It can be unique information, such as a driver’s license number, telephone number including area code, car VIN number, etc.

 

Primary key - driving license
CREATE TABLE `ecommerce`.`customer` ( 
   `driving_license` VARCHAR(100),
   `name` VARCHAR(150) NOT NULL,
   `surname` VARCHAR(150) NOT NULL,
   `email` VARCHAR(150),
   `phone` VARCHAR(200),
    PRIMARY KEY `Primary key`(
   `driving_license`
    )
)
 ENGINE = InnoDB;

Multi-column primary keys

A primary key can contain one or more columns.Read the rest