# Database

## Introduction

Yuga makes interacting with databases extremely simple across a variety of database backends using either raw SQL, the [fluent query builder](https://yuga-framework.gitbook.io/documentation/database/query), and the [Elegant ORM](https://yuga-framework.gitbook.io/documentation/database/elegant). Currently, Yuga supports three databases:

* MySQL
* PostgreSQL
* SQLite

### Configuration

The database configuration for your application is located at `config/config.php`. In this file you can define all of your database connections, as well as specify which connection should be used by default. Examples for most of the supported database systems are provided in this file.

By default, Yuga comes configured to use mysql but comes with the `DATABASE_NAME` key in the `environment/.env` blank so, it does not connect to any database but once the database name is provided, it will connect automatically.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yuga-framework.gitbook.io/documentation/database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
