# Data

Source: https://docs.anetos.dev/main/concepts/data/

- [The data layer](https://docs.anetos.dev/main/concepts/data-layer/index.md): How the db package finds its connection, turns method calls into SQL, and why it works the way it does.
- [Migrations](https://docs.anetos.dev/main/concepts/migrations/index.md): Migrations are Go values compiled into your binary. The runner applies them in ID order, records each one in the `migrations` table with the batch it ran in, and wraps each in a transaction where the database allows it. A database lock keeps two instances from migrating at once.
