As a developer, we have to work with databases, so we need a handy database management tool. Navicat has been my first choice for a long time, but I recently switched to a new COMPUTER and couldn’t find my previous green package.

So I figured I’d find a free database management tool that had the same functionality as Navicat. My good friend Macrozheng recommended DBeaver to me. After trying it out, I had a really good experience, so I decided to give you an Amway wave.

DBeaver

DBeaver is a cross-platform database management tool that supports Windows, Linux, and macOS. It comes in two versions, enterprise and Community, and the community version is already powerful enough for individual developers.

DBeaver is written in Java and compiled using JDK 11 by default. The community edition is open source on GitHub under the Apache-2.0 License and currently has a 24K + star.

Github.com/dbeaver/dbe…

DBeaver supports almost all major databases, both relational and non-relational.

Two, install DBeaver

You can download the installation package from DBeaver or the Release from GitHub.

Dbeaver. IO/Download /

After the installation is complete, the first step is to configure the Maven image. Otherwise, the subsequent download of the database driver will be very slow.

Because DBeaver is built on Maven, the database driver, the JDBC driver for linking the database, is downloaded through the Maven repository. Select “Preferences” → “Maven” to add aliyun mirror address:

Maven.aliyun.com/nexus/conte…

As with configuring Maven mirrors, see the following figure.

After the configuration is complete, remember to put ali Cloud mirror warehouse on the top.

Managing data sources

As with Navicat, we need to establish a connection first, using MySQL as an example. Click the Connect icon and select the database.

Click Next, this time you need to fill in the database connection information.

Click on the “test link”, and if you use the default Maven repository, the download driver will be very slow, as shown in the following image, and prone to failure.

If you have configured the Maven mirror of Ali Cloud as I said before, the program will be different. Click “Test link”, and the prompt box of “Connection has been successful” will pop up instantly.

Once the link is successful, you can see tables, views, indexes, and so on in the database.

Iv. Management table

After the database connection is successful, the most important thing is the operation table.

01. Look at the table

Select a table and double-click to see its properties, including columns, constraints (primary keys), foreign keys, indexes, and more.

Click on “Data Definition Language (DDL)” to see the detailed table construction sentences.

Click “Data” to view the data in the table, and there are “Add”, “Modify”, “Delete” and other operation buttons at the bottom.

You can fill in the filter box at the top and query the results directly.

If you don’t want to show a column, you can simply click on the “Custom Result Set” chart and make the state of a field invisible.

02. Add tables

Select “Table” on the left and right-click “New Table” to create a table ID.

Right-click in the area of the right column and choose New Column to add a field.

Let’s say we create a new primary key ID, as shown below.

In DBeaver, [v] means true and [] means no. Then select ID in constraints and set it to the primary key.

Finally, click save, and a preview box for table construction will pop up. Click “Execute” to complete the creation of the table.

5. Execute SQL

Right-click the database table and choose SQL Editor from the shortcut menu to open the SQL edit panel.

Then edit the SQL statement and click on the run icon to query the data. This process has syntax hints, which is nice.

One neat thing about DBeaver is the ability to directly select a result set and then right-click to generate SQL.

Take the INSERT statement, for example, which makes it very convenient to insert another piece of repetitive content.

Vi. Appearance configuration

You can set the appearance in the preferences, such as changing the theme to black.

Then the interface becomes dark.

You can also set the font size and so on.

DBeaver is somewhat similar to Eclipse in terms of overall style, and indeed it is, DBeaver is built on the Eclipse platform.

Seven,

Overall, DBeaver is a very good open source database management tool, so comprehensive that it’s almost adequate for daily development. Compare the charging Navicat and DataGrip, can say very conscience. For those of you who don’t have access to the premium version, check out the community version of DBeaver.


This post has been published on GitHub’s 1.5K + Star: The Path to Java Programmer Advancement. It is said that every good Java programmer loves her. The content includes Java foundation, Java concurrent programming, Java virtual machine, Java enterprise development, Java interview and other core knowledge points. Learn Java, look for Java programmers to advance the road 😄.

Github.com/itwanger/to…

Star the repository and you have the potential to become a good Java engineer. Click the link below to jump to the Java Programmer’s Path to Progress website and start your fun learning journey.

tobebetterjavaer.com/

Nothing keeps me here but purpose, and though there are roses by the shore, and trees by the shore, and still harbours, I am not tied.