# Ecto (Elixir)

17 Hacker News commenters recommended Ecto (Elixir) and 5 criticized it, November 2025 to November 2026. It was recommended in 8 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Elixir database library that follows SQL closely, makes queries explicit and avoids hidden magic. Main caveat: defining large schemas is repetitive compared with Django.

## Why people recommend it

- Follows SQL closely for query building (3 comments): "Ecto is closely follows SQL logic and allows to translate weird sql queries into code directly." ([source](https://news.ycombinator.com/item?id=48157386)) "it has a pretty good query building type solution" ([source](https://news.ycombinator.com/item?id=47458344)) "it just makes sql so ergonomic" ([source](https://news.ycombinator.com/item?id=48794926))
- Standard database layer in Elixir (3 comments): "which many Elixir libraries (such as Phoenix and Ecto) uses to great effect" ([source](https://news.ycombinator.com/item?id=48389560)) "Erlang/Elixir abstracts most db use-cases with ecto" ([source](https://news.ycombinator.com/item?id=45843864)) "Phoenix and Ecto, really." ([source](https://news.ycombinator.com/item?id=48390282))
- Less magic than other ORMs (2 comments): "i would say it has less magic than django" ([source](https://news.ycombinator.com/item?id=46791447)) "as little magic as possible" ([source](https://news.ycombinator.com/item?id=48792272))
- Clean schema and migration workflow (2 comments): "i really prefer writing out schemas and migrations like in elixir/ecto" ([source](https://news.ycombinator.com/item?id=46791382)) "i use elixir/ecto. just write a migration!" ([source](https://news.ycombinator.com/item?id=49065117))

## What people warn about

- Repetitive to define large schemas (2 comments): "it was super repetitive to define make large database strucutres compared to Django" ([source](https://news.ycombinator.com/item?id=46791886)) "it was super repetitive to define make large database strucutres" ([source](https://news.ycombinator.com/item?id=46791298))
- Shared schema reuse criticized (2 comments): "using the same schemas everywhere is a sign of immaturity as a developer" ([source](https://news.ycombinator.com/item?id=48398324)) "it encourages composition in situations where duplication is the right choice" ([source](https://news.ycombinator.com/item?id=48795220))

## Alternatives hackers recommend

- [sqlc](https://hackerapproved.com/p/sqlc.md): 20 recommend
- [sqlx](https://hackerapproved.com/p/sqlx.md): 13 recommend
- [jOOQ](https://hackerapproved.com/p/jooq.md): 13 recommend
- [Kysely](https://hackerapproved.com/p/kysely.md): 12 recommend
- [Jdbi](https://hackerapproved.com/p/jdbi.md): 6 recommend

## Cite as

Hacker Approved, "Ecto (Elixir)", https://hackerapproved.com/p/ecto/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
