DataGrip Overview, Part 1: Connecting to Your Database
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.
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.
The Options tab allows specification of how introspection is carried out. DataGrip can automatically run introspection, with common triggers including statements that modify the schema. This option can be turned off for manual control, which is useful for large databases. Up-to-date database information enhances the user experience and improves code completion accuracy and navigation.
Levels of introspection are currently supported for PostgreSQL, Redshift, MySQL, MariaDB, SQL Server, and Oracle, with more databases to be added. The database inspection process duration depends mainly on database size. For most daily work, loading object sources is unnecessary. Obtaining database object names alone is often sufficient for DataGrip to provide code completion and navigation.
DataGrip provides three levels of scanning:
- Level 1: Names and signatures of all supported objects
- Level 2: Everything except source code for database objects such as stored procedures
- Level 3: Absolutely everything
The icons represent the inspection level, with more filtered icons indicating higher levels. Color coding is significant: blue icons indicate the screening level is directly set, while gray icons indicate inheritance. Lower levels result in faster inspection processes. The level can be adjusted for the entire database or specific schemas. Schemas inherit their level from the database, but this can be overridden for individual schemas.
Keep JetBrains in your library
Save the videos and channels worth coming back to, and find them again in one place.


