Other database objects in MariaDB projects
A MariaDB schema often carries logic outside its tables: a view for reporting, a trigger that writes an audit row, a nightly event that purges old sessions. Put them in the diagram, and readers see the whole schema, not only the tables.
In Luna Modeler you can add these objects to MariaDB diagrams:
- Views
- Stored procedures
- Functions
- Triggers
- Other objects, for events, table check constraints, user and role definitions and anything else
Each object type has a default color that you can change. Objects can be moved and aligned like tables.

How to add an object
Click Other on the toolbar, or right click the diagram, and choose the object type, for example Function.
In the object properties, set the colors and enter the code. The code is saved with the project and generated together with the SQL for tables and relationships.

Tips for MariaDB users
- Events only run when the event scheduler is enabled on the server (
event_scheduler = ON). - MariaDB enforces
CHECKconstraints since version 10.2.1. On older servers they are parsed and ignored. - Place views and triggers after their tables in the script order, so the script runs without errors.
Other MariaDB objects: FAQ
Which MariaDB objects can I add besides tables?
Views, stored procedures, functions and triggers, plus Other objects for anything else, such as events, table check constraints or user and role definitions.
Is the code of these objects part of the generated script?
Yes. The code you enter is saved with the project and generated together with tables and relationships.
Do I need DELIMITER statements for procedures and triggers?
The mariadb command line client needs a custom delimiter for bodies with several statements. Check the generated script and the generation settings for how delimiters are written before you run it in your client.
Do events run automatically after I create them?
Only if the MariaDB event scheduler is on. Check the event_scheduler system variable on your server.