MariaDB database design


Note: this page is outdated. Please visit the latest page MariaDB database design


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.

A new graphical object is shown in the diagram.

Mariadb table columns in ERD

You can edit MariaDB table properties via Right Side panel:

Alternatively, you can double click the graphics or right-click the item and choose Edit.

Table properties

Database table settings can be specified in the section Details.

MySQL table properties in ER diagram


In section Columns, you can add new table columns. Specify new column name, datatype, and parameter and click Add.

MySQL entity relationship diagram and table column details

  • PK indicates the Primary key.
  • NN represents the Not Null field.

Column specifics

To access area where MariaDB column specifics can be set, click the arrow left to the column name.

Database table column specifics

3. Relationships and foreign keys

Relationships can be drawn between two database tables. To create a new relation, click Relationship on the toolbar and then click parent and then child table.
When a new relationship is created, a foreign key appears in the child table automatically.

MySQL relationship

In the details section of relationship you can specify referential integrity, used key (primary key or alternate key) and cardinality.

Cardinality settings

4. Code generation

To preview SQL script for your MariaDB database design, click the Script tab on table detail.

To save scripts to files, click the Script icon on the toolbar and then click Save script.

SQL script for MariaDB


Copyright: 2024 Ideamerit s.r.o. All rights reserved. Legal