Back to JetBrains

DataGrip Overview, Part 1: Connecting to Your Database

JetBrainsOctober 14, 20264m
In a Nutshell

DataGrip connects to databases by specifying host, port, and credentials, then uses introspection to extract metadata for code completion and navigation. Introspection can be automatic or manual and offers three levels: names/signatures only, everything except source code, or complete metadata. Lower inspection levels speed up the process, and schemas inherit their level from the database unless overridden.

AI-Generated Notes

These notes were generated by AI and may contain inaccuracies.

This is the first part of an overview of DataGrip, the SQL development environment from JetBrains. The DataGrip user interface includes the database explorer on the left side of the screen, which displays all data sources being worked with. Adding a new data source is straightforward.

DataGrip supports many different SQL and NoSQL databases. This overview works with PostgreSQL, though almost everything shown applies to other databases as well. When creating a new data source, the name and port must be specified. For a local machine database, the host field remains empty as it defaults to localhost. Credentials must be entered. The connection test button verifies the setup is working correctly.

The Options tab allows selection of the Read-Only checkbox, which prevents any changes to the data source. This is useful when working with production data sources. Additional options include maintaining connection queries and disconnecting after a specified period. The SSH/SSL tab enables specification of an SSH tunnel or SSL certificate for the connection. The Schemas tab allows selection of which schemas or databases to display in the database tree.

After clicking OK, the database appears in the database tree on the left. Introspection is the process of obtaining metadata for a database, including object names, column types, and source code. Every database and schema added undergoes introspection. DataGrip uses this information to provide programming assistance, navigation, and research capabilities. Since this information comes from metadata, code completion and other smart features remain available even without an internet connection.

Sign in to read the full notes

Get access to AI-generated notes, topic timestamps, and more.