News Tutorials

Top 8 DataGrip Database Explorer Features You Have to Know

Read this post in other languages:
Français, 한국어, Русский, 简体中文

JetBrains DataGrip is a powerful tool for working with databases. It supports PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, and many other databases and DDL data sources. You can view the structure of your databases and perform other tasks in the database explorer

Here are the advantages of the DataGrip database explorer that our users value most.

Easy copy-pasting of data sources

Copy-pasting data sources can be useful in the following situations:

  • Distributing data source settings among team members
  • Sharing data sources between projects
  • Duplicating or creating a similar data source
  • Working in different IDEs

Just use Ctrl+C, Ctrl+V, and Ctrl+X (⌘+C, ⌘+V, and ⌘+X for MacOS) to copy, paste, and cut your data sources, respectively.

Put the cursor on the data source and press Ctrl+C/⌘+C, and an XML snippet will be created on your clipboard.

You can then just paste this XML snippet as a new data source in a database tool window inside the same IDE or in another JetBrains IDE (Ctrl+V for Windows/Linux, ⌘+V for MacOS). 

The only thing you will need to specify again is the password, because that isn’t copied with the data source.

Speed search

Just start typing! As you type, a text field appears over the database explorer window, the entered characters are displayed, and the selection moves to the first item that matches your search query. The matching part of the string is highlighted. You can use the arrow keys to navigate through the matches. Note that speed search works only for expanded nodes.

It also supports abbreviations. For instance, ‘fa‘ is enough to find ‘film_actor‘.

Group data sources

When you’re working with a large number of data sources, it can be convenient to group them, just as you would do with folders on your computer. Press F6 or choose Move to group in the context menu.

Drag-and-drop also works for creating groups in the database explorer. To create a new group, just drag one data source onto the other. The same works when placing the data source into an existing group – just drag-and-drop it there. 

You can also use Ctrl+C, Ctrl+V, and Ctrl+X (⌘+C, ⌘+V, and ⌘+X for MacOS)  to copy, paste, and cut your data sources between folders.

Separate nodes for non-major objects

People are constantly working with tables, views, and routines, but users, roles, tablespaces, foreign data wrappers, and many other object types are not used as frequently. 

In DataGrip these secondary objects are hidden under two nodes: Server Objects and Database Objects.

You can manage this grouping in the datasource settings. 

Objects filter

If there are certain objects you don’t want to see in the database tree, you can hide them in the data source properties (Properties | Schemas).

For instance, you can hide all tables with a specific prefix. F1 will give you information about the syntax. In our example, all tables with names starting with “payment_” are filtered out.

Or you can filter objects by type via the filter icon on the toolbar.

Scroll from editor

Place the caret over the name of an object in your code and click the crosshair icon in the database explorer toolbar. The corresponding nodes will open and the object will be highlighted in the database tree.

This is useful when you want to quickly find out what the object is and where it is located in the database tree.

Quick table backup 

You can copy a table to the same data source using drag-and-drop. This is useful for making a quick backup of the table before any significant data manipulation.

Assign a color to a data source

To distinguish your production data source from a staging or test data source, you can mark your data sources with colors. The chosen color will be used for everything related to that specific data source, like the database tree, the query console, the result sets, associated files, etc. 

Right-click the data source in the database explorer and navigate to Color Settings. In the Database Color Settings dialog, configure the color and appearance settings.

That’s it! We hope that this set of database explorer features is useful for DataGrip users and we encourage those who have never used DataGrip to try it.

Questions?

The DataGrip team

Discover more