Glossary
- Connection to a database
To connect to a database, DataGrip requires connection details (for example, host, port, password, SSH configuration settings, and so on). For every database, the connection details are stored in a dedicated connection configuration — data source.
For a data source, connections to the database are established in special wrappers – sessions. Each session is a wrapper over a single connection, and it stores the connection's information (for example, whether it is active or not, transaction control mode, and other settings).
A connection within a session appears when you perform an action that requires interaction with the database.
For example, once you double-click a table under a data source in Database Explorer, a new session is created, connected, and it has the data editor as its client. DataGrip requires an active connection to request the table data from the database, receive it, and display it in the data editor.
For more information about connecting to databases, refer to Connection to a database topic.
- Data source
Data source is a connection configuration. It stores a list of connection details that are used to establish connection to a database. For example, host, port, database name, driver, SSH and SSL configuration settings, and so on. In data source settings, you can also select databases and schemas for introspection and display in Database Explorer, and change the driver for your connection.
You can see the list of created data sources in the Database Explorer (View | Tool Windows | Database Explorer) . Data sources with an active connection to a database are marked with a green dot in the corner of their icons.
For more information about creating a data source for the supported database vendors, refer to the Create a data source section.
For more information about managing data sources, refer to the Data sources topic.
For more information about the Data Sources and Drivers dialog, refer to the Data Sources and Drivers dialog topic.
- DDL data source
DDL data source is a virtual view of a database structure based on SQL files that contain data definition language statements (DDL statements). You can reference all tables, columns and other objects defined in such files in the editor. Diagrams are also supported.
DDL data source lets you maintain database versioning. Keep the SQL files under a VCS system and regenerate them every time your database structure is updated.
Once created, DDL data sources are available in Database Explorer (View | Tool Windows | Database Explorer) . You can create and manage the SQL files with statements in the Files tool window (View | Tool Windows | Files) .
For more information about DDL data sources, refer to the DDL data sources topic.
- Session
Each session is a wrapper over a single connection, and it stores the connection's information (for example, whether it is active or not, transaction control mode, and other settings).
Sessions can have clients – files, whose queries are sent by using the connection that the session holds. Data editor can also be a client for a session.
For example, once you double-click a table in Database Explorer, a new session connects to the database, and the table is attached to the session as its client.
You can view data sources, sessions, and session clients in the Services tool window. The green dot in the corner of a session's icon indicates a connected session.
For more information about sessions, refer to Sessions.
- Data editor and viewer
The data editor and viewer, or data editor, provides a user interface for working with data. In the data editor, you can sort, filter, add, edit, and remove the data as well as perform other associated tasks.
In DataGrip, the data editor and viewer lets you work with database object data, query result sets, and also User files data.
Database object dataQuery result set: Services tool windowQuery result set: In-Editor ResultsUser files dataFor more information about data editor, refer to Data editor and viewer.
- Database Explorer
In the Database Explorer (View | Tool Windows | Database Explorer) , you can work with databases and DDL data sources. You can view and modify data structures in your databases and perform other associated tasks.
The available data sources are shown as a tree of data sources, schemas, tables, and so on.
For more information about working with database objects in Database Explorer, refer to the Database objects section.
For more information about Database Explorer, refer to the Database Explorer topic.
- Introspection
Introspection is a process of loading metadata of a database. When you perform introspection, structural information in the data source is inspected to detect tables, columns, routines, and other database objects with their attributes.
DataGrip uses this information to show the objects in Database Explorer, display their DDL, suggest them during completion, and for other coding assistance features.
Once you initiate introspection, DataGrip displays the introspection progress bars on the right-hand side of the status bar.
By default, only the schemas and databases selected to be shown in the Database Explorer are introspected.
tip
For more information about showing schemas and databases, refer to Show all databases or schemas
For a few databases, three introspection levels are supported to reduce the number of introspected objects. For more information about the levels, refer to the introspection levels topic.
For more information about collecting troubleshooting materials to report an introspection issue, refer to the Report introspection issues section.
- Query console
Query or database consoles are SQL files that are attached to a data source. You can write and execute SQL statements in query consoles the same way as you do it in terminal. The consoles are not included in the project context.
When you create a data source, the data source's default query console is created automatically. If necessary, you can create additional query consoles.
For more information about query consoles, refer to the Query consoles topic.
For more information about other types of SQL files in DataGrip, refer to File management topic.
- User files in the attached directories
User files are the files that are stored on your machine or any other place you have access to. To work with them in DataGrip, attach the directory that contains them in the Files tool window .
For more information about user files, refer to the User files topic.
For more information about other types of SQL files in DataGrip, refer to the File management topic.
- Routines
In DataGrip, routines combine functions and procedures. You can set Database Explorer to display them separately or under a single routines node.
Procedures and functions combined under routines node
Procedures and functions displayed separately under dedicated nodes
For more information about the Database Explorer and its view options, refer to the Database Explorer topic and View Options chapter.