> For the complete documentation index, see [llms.txt](https://docs.code.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.code.store/getting-started/fundamentals/data-management.md).

# Data management

## Overview

code.store platform allows you use two database types for your services:

* [**Postgres**](https://www.postgresql.org/)
* [**Redis**](https://redis.io/)

Based on standards for building a microservice architecture, we follow [database-per-service](https://microservices.io/patterns/data/database-per-service.html) design pattern and generate separate database for each service.&#x20;

{% hint style="info" %}
Connection details are provided in `env` variables.
{% endhint %}

{% hint style="info" %}
You can manage your data using visual data manager using [backoffice](https://app.code.store/) on the service page *(will be available soon)*
{% endhint %}

## Postgres

code.store platform by default creates a Postgres database for each your service. You can enable or disable database using `codestore.yaml` configuration file in the root service directory.&#x20;

You have no limits in your database and can store any data there, code.store platform takes care of the scaling of your relational database so your database can keep up with the increasing demands of your application or applications.

To disable or enable Postgres database for your service just set it in `skipDatabase` flag.&#x20;

* true - to disable Postgres database
* false *(default value)* - to enable it

```
serviceConfiguration:
  skipDatabase: true
```

You can find connection to your database in context variable which available inside each `handler` method. More information about `context` objects can be found in [GraphQL](/getting-started/fundamentals/services/graphql.md#context) and [REST](/getting-started/fundamentals/services/rest.md#context) sections.

{% hint style="info" %}
To apply changes just push your service code using `cs push` command
{% endhint %}

## Redis

To disable or enable Redis database for your service just set it in `enableRedis` flag.&#x20;

* true - to enable Redis database
* false *(default value)* - to disable it

```
serviceConfiguration:
  enableRedis: true
```

You have no limits in your Redis database and can store any data there, code.store platform takes care of the scaling of memory usage so your database can keep up with the increasing demands of your application or applications.

To get credentials for Redis database use next env variables:

> REDIS\_HOST
>
> REDIS\_PORT

More information about accessing environment variables can be found in [Environment variables](/getting-started/fundamentals/services/environment-variables.md#redis-variables) section.
