DBeaver is a desktop database client for managing relational database management systems (RDBMS) including MySQL and PostgreSQL. One of its database development features include the ability to create entity relationship (ER) diagrams. In this tutorial we’ll cover how to create an ER diagram in DBeaver.
- Getting Started with the DBeaver Desktop Application
- Create an ER Diagram in DBeaver
Getting Started with the DBeaver Desktop Application
- Download the free DBeaver community edition from your Linux/BSD package manager or https://DBeaver.io/download/ with the appropriate DBeaver download link.
- Install DBeaver and launch the program.
- Decline the sample database. On the next page, choose the type of database system you want to import.
Connect a Database in DBeaver
For remote databases, you’ll need the following:
- Server hostname or IP
- Database name
- Database (or cPanel) username and username password
You may be prompted to download driver files to complete remote connections.
For locally stored databases, the easiest option to create an ER diagram in DBeaver seems to be to use SQLite. If the database is written in another SQL format (Hive, IBM Db2, etc.), you’ll need to convert the SQL file to SQLite. There are many third party tools available online.
For this DBeaver tutorial we used the free API from RebaseData.com to convert a WordPress MySQL database to SQLite. The zip file included the SQLite file.
curl -F files[email protected] 'https://www.rebasedata.com/api/v1/convert?outputFormat=mysql&errorResponse=zip' -o output.zip
Create an ER Diagram in DBeaver
After you connect your database(s), you’re ready to create an ER diagram.
- In the lower-left corner right-click “ER Diagrams” and select “Create New ER Diagram.”
- Type a title for your new database ER diagram. This will also be the filename with an “.erd” extension. Select the checkbox for your database to add all tables. Or, select the arrows to expand the database and tables list to add specific tables.
- Once you’ve decided which tables to add, select “Finish.”
- To add any tables to a database relationship diagram, drag and drop them from the Database Navigator sidebar on the left.
There are no one to one or one to many relationships within the default WordPress database.
Edit ER Diagrams
In the ERD window you can do the following:
- Zoom in and out
- Rearrange the database diagram
- Add a grid to more easily align tables
- Toggle the properties sidebar for a selected table or entity (column)
- Toggle the outline sidebar
- Print or export the ERD in GraphML and standard image formats
- Configure ERD settings
Get software support for the database diagram tool from the DBeaver GitHub page.
With our Cloud Server Hosting, you can deploy a lightning-fast, reliable cloud platform with built-in redundancy – ensuring the availability of your environment!