Updating SQLite projects

You can easily visualize existing SQLite databases in Luna Modeler. And in case there are changes in the database, you can use the Project Update feature to update your project and the ER diagram.

How to update your SQLite ER diagrams created from scratch

If you modeled your database design from scratch and then created the SQLite database, do the following: Create a connection on the Connections page.… Read the rest

Updating PostgreSQL projects

How to update your PostgreSQL ER diagrams

If you have created a project using reverse engineering, you have already saved the database connection and the project remembers this connection. So just click on the Update button and choose Update with default connection. The comparison will happen immediately.

update button on toolbar

A form will appear with a summary of the changes and you can accept the changes or not.… Read the rest

Heroku Postgres and ER diagrams

How to create ER diagram of PostgreSQL database running in Heroku? With Luna Modeler, the process is simple. Just create a database connection, retrieve the information from Heroku Postgres and create a project containing the ER diagram. But let’s start one step at a time.

What is Heroku and Heroku Postgres?

Read the rest

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

When you are finished, click the Save Connection button.

database connection

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

How to generate SQL script for PostgreSQL

To generate SQL scripts from your PostgreSQL project click the SQL Script icon on the main toolbar. New modal opens. Click Save Script and select a location where the file should be stored.

generated SQL script

Generation settings

You can control how the script will be generated on the Generation settings tab

generation settings for PostgreSQL

Order of items

The order in which the objects will be in the resulting SQL script can be modified on the Order items tab.… Read the rest

PostgreSQL domains

Domains in PostgreSQL projects

Domains can be defined in a similar way as Enums (enumerated types). In the main menu, click Others and select Domain. Then click the diagram area and add a new graphical object to the canvas.

Other object - toolbar

Another way to add a Domain to the diagram is via the context menu.

domain - context menu

Specify name, description, and other properties for your newly created domain in the right-side panel.… Read the rest

Enumerated type – Enum – PostgreSQL

Enumerated types in PostgreSQL projects can be created as reusable objects. In the main toolbar click Other and select Enum from the drop-down.

Other object - toolbar

You can also add new object via context menu:

context menu

Then click the diagram area to place a new graphical representative to the desired position.

In the right-side panel, you can specify the Name for the Enum type and Enum values.… Read the rest

PostgreSQL ER diagram – graphics

Graphics for PostgreSQL entity relationship diagrams (ER Diagram) can be defined on three levels. Global graphics can be specified on a project level, you can modify colors on diagram level and properties can be modified also on selected object level.

Colors and graphics defined on the project level

If you wish to change background color, line color or footer color (e.g.… Read the rest

PostgreSQL database design

Quick start guide for PostgreSQL database design.

1. New project

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

2. Add tables

Basic database objects can be added to your project/diagram by clicking the appropriate icon on the main toolbar.

adding new object to ERD for PostgreSQL

Then click the diagram area.… Read the rest

MongoDB vs PostgreSQL

Making a comparison of document-based database systems like MongoDB and traditional relational databases like PostgreSQL is not a simple task. In fact, it is impossible to recommend one database platform, because everything depends on your requirements and the goals you wish to achieve. For some use cases, MongoDB can be the preferred solution, for many other use cases PostgreSQL can be the better option.… Read the rest