# Connect to a database

Use Datalore's New database connection dialog to create and manage database connections.

Connect to a database
: You have several options for adding a database connection to a notebook or a workspace.
:
:
:
: * [Configure a database connection](configure-a-database-connection.html) You use the New database connection dialog, where you select a database type and provide relevant details.
:
: * [Connect to a database using URL](connect-to-a-database-using-url.html) For a new database connection, you provide relevant details in a pre-built URL.
:
: * [Connect to a database by importing connection details](connect-to-a-database-using-details-in-xml-format.html) For a new database connection, you provide relevant details in XML format.

Attaching database connections from the workspace
: [Attach a database connection from the workspace](database-connections-on-notebook-level.html#attach-a-database-connection-from-the-workspace)
:
:
:
: The procedure explains how to attach a database connection from a workspace to one of its notebooks.

Managing database connections attached to a notebook
: [Manage database connections in a notebook](database-connections-on-notebook-level.html)
:
:
:
: The procedures explain how to manage database connections that you have attached to a notebook. This is done in the editor when working on this particular notebook.

Managing database connections as workspace resources
: [Manage database connections in a workspace](databases-as-workspace-resources.html)
:
:
:
: The procedures explain how to manage database connections on the level of workspace resources. You perform the steps in a selected workspace from the Home page.

Connecting SQLite databases
: Unlike the other supported database types, SQLite databases are connected as files. Refer to [this procedure](add-notebook-files.html) for more details about uploading files.

Querying databases
: To query any type of a connected database, use [SQL cells](sql-cells.html).

