Relationships in ER diagrams for MariaDB

To create a new relation between two tables, click Relation on the toolbar and then click parent and child tables in your diagram.

New relation

In this example, click table customer and then table order.

New relation

The new relation line appears in the diagram and column customer_id is added to the child table order automatically.… Read the rest

Other database objects in MariaDB projects

Diagrams can also contain graphical representatives of various database objects. The following objects can be added to MariaDB diagrams:

  • Views
  • Stored procedures
  • Functions
  • Triggers
  • Other objects (Events, Table check constraints, User/Role definitions)

Each object has its default color that can be changed. Objects can be repositioned, aligned, enlarged, etc.

mariadb procedure and function

Usage:

To add a new object, click Other on the toolbar or right-click the diagram area and choose the desired object type, for example, Function.… Read the rest

Visualization of existing MariaDB 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 MariaDB and enter the connection details.

When you are finished, click the Save Connection button.

Database connection

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

MariaDB database modeling

In Moon Modeler you can easily draw MariaDB 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

MariaDB database design

Quick start guide for MariaDB database design in Moon Modeler.

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

1. New project

To create a new project, click New on the toolbar and select the MariaDB project type.

2. Database tables and columns

New database tables can be inserted 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