# Databases

Query SQL and NoSQL databases and search engines from Python services.

## Get started

Define an SQL connection pool in the Dashboard, obtain a session in your service and query the database - PostgreSQL, MySQL, Oracle, SQL Server and more, all through one API.

[SQL overview](https://zato.io/docs/dev/examples/sql/index.html)

service.py

```
# Query any SQL database
conn = self.out.sql['My Database']
params = {'status': 'active'}
result = conn.execute(query, params)

result[0]['destination']
'JFK'

len(result)
2
```

## SQL

[SQL overview Connection pools, sessions and queries - the parts every SQL database shares.](https://zato.io/docs/dev/examples/sql/index.html) [PostgreSQL Query PostgreSQL from Python services.](https://zato.io/docs/dev/examples/sql/postgresql.html) [MySQL Query MySQL and MariaDB from Python services.](https://zato.io/docs/dev/examples/sql/mysql.html) [Oracle Query Oracle Database, including stored procedures.](https://zato.io/docs/dev/examples/sql/oracle.html) [SQL Server Query SQL Server, including stored procedures.](https://zato.io/docs/dev/examples/sql/mssql.html) [Snowflake Query Snowflake data warehouses from your integrations.](https://zato.io/docs/dev/examples/sql/snowflake.html) [Redshift Query Amazon Redshift from your integrations.](https://zato.io/docs/dev/examples/sql/redshift.html)

## NoSQL and caches

[MongoDB Read and write MongoDB collections from Python services.](https://zato.io/docs/dev/examples/mongodb.html) [Redis Use Redis as a cache and data store from your services.](https://zato.io/docs/dev/examples/redis.html)

## Search

[ElasticSearch Index and query documents in ElasticSearch.](https://zato.io/docs/dev/examples/search/elastic-search.html)

## Related

[SQL stored procedures over REST Expose SQL queries and stored procedures as REST endpoints.](https://zato.io/docs/dev/rest/sql-stored-procedures.html)
