RubyMine 5.4.0 Web Help

3.1+

RubyMine does not enable you to create databases, but provides facilities to manage and query them. Once you are granted access to a certain database, you can configure one or more data sources within RubyMine that reflect the structure of the database and store the database access credentials. Based on this information, RubyMine establishes connection to the database and provides the possibility to retrieve or change information contained therein.

In this section:

Global and Local Data Sources

RubyMine distinguishes between Global and Local data sources.

  • Global data sources are available in all projects in your workspace.
  • Local data sources are available in one specific project only.

Types of Data Sources

RubyMine supports data sources of the following types:

  • DB data sources, which correspond to the existing databases the application you are developing will interact with.
  • DDL data sources, which represent the necessary data structures and act as stub databases, the databases without any data. For this data source type you should have one or more DDL files (SQL file type) representing the required data structures available in your project directory (or one of its subdirectories). Also note that a particular SQL dialect should be set for all those files (or the directories containing those files).

DB data sources can be both global and local; DDL data sources can be configured only at the project level.

Connection

RubyMine establishes a database connection between a data source and the corresponding database automatically, the first time it needs to execute a query. A database connection is displayed in the Database tool window as a node below the data source via which it is established, and is marked with the database_connection.png icon.

RubyMine closes a connection automatically upon the session termination; alternatively, you can close a database connection manually (stop Close Connection in the context menu of a connection (DeleteDelete)).

Access to Data Sources

Access to data sources is supported through a variety of RubyMine features and components:

See Also

Reference:

Web Resources: