Working with SQL and databases in Rider

In this webinar, we'll show the basics of writing SQL queries and working with data in Rider. All described is also relevant to the dedicated database IDE called DataGrip and all other IntelliJ-based IDEs.

View at original site


Maksim Sobolevskiy is the team lead of DataGrip. The webinar focuses on the powerful database tools available in JetBrains Rider and DataGrip. This webinar provided a deep dive into the database functionalities of Rider and DataGrip, demonstrating their extensive toolset for improving productivity, performance, and overall database management within JetBrains IDEs.

Overview of DataGrip and JetBrains Rider

  • Explained the integration of database tools within Rider and DataGrip, highlighting that the same database features are available across all JetBrains IDEs.
  • DataGrip is the standalone SQL IDE from JetBrains, while Rider includes these database features for .NET development.

Adding and Managing Data Sources

  • Demonstrated how to add a new data source and the extensive list of supported databases (SQL Server, MySQL, PostgreSQL, MongoDB, etc.).
  • Explained the introspection process for indexing database objects, which enhances features like navigation and code completion.
  • Tips for selecting specific schemas for better performance and organization, and utilizing folders and color settings to manage data sources.

Query Console

  • The query console in Rider allows running SQL queries with features like live templates for common SQL statements.
  • Highlighted the importance of the "alt + enter" shortcut for improving code.
  • Demonstrated how to run multiple queries, including subqueries, and how to name query result tabs for better organization.

Code Completion and Inspections

  • Rider provides intelligent code completion and inspections, which help in writing error-free SQL code.
  • Tools like "qualify identifier" and "expand column list" improve query readability and performance.

Editing and Navigating Data

  • Data editor features for sorting, filtering, and manipulating data directly within the IDE.
  • Multi-cursor editing and real-time updates to reflect changes in the database.
  • Explained navigation by foreign keys and the filtering options for efficient data browsing.

Data Export and Import

  • DataGrip's data extractors allow exporting data in various formats (SQL, JSON, CSV, etc.).
  • Ability to copy result sets between different databases.
  • Features like clipboard history and exporting data to files or other databases were demonstrated.

Schema Comparison and Migration

  • Demonstrated the schema comparison tool for generating migration scripts.
  • Introspected schema differences and generated scripts to synchronize schemas between databases.

Viewing and Editing Execution Plans

  • Showed how to view and analyze execution plans for optimizing query performance.
  • Visual modes for execution plans help in identifying and resolving performance issues.

Stored Procedures and Function Support

  • Editing and updating stored procedures directly in the IDE with real-time updates.
  • Support for searching within stored procedure code and various other objects using the search and navigation features.

Additional Tools and Features

  • Discussed extensions like the Geo viewer for geographic data and language injections for embedding SQL within code.
  • Emphasized the benefits of the introspection process for enhancing productivity and performance.

Related Resources

View Database Definitions
View Database Definitions
View the definitions of database entities quickly in the Database tool window.
Working with Multiple Databases in a JetBrains IDE
Working with Multiple Databases in a JetBrains IDE
Working with multiple databases and database types in your JetBrains IDE.
Working with SQLite Databases in any JetBrains IDE
Working with SQLite Databases in any JetBrains IDE
Connect to your SQLite database easily inside your JetBrains IDE.