Ecto ( is a functional data mapper for Elixir. Ecto does two things right, restraint and hide the data underneath. Ecto is explicit.

Ecto.Schema ( define the relationship and the fields between the tables. This module will generate the model to interact with the database. This code is written with Elixir meta-programming.

Ecto.Query ( permits to write explicit queries, the query look likes SQL queries. Inspired by many other projects. You should think about the select part of the request. There exists a preload function, used to preload information on a query based on relationship. We can build queries incrementally by joining different queries directly in our code.

Ecto.Repo ( is a pattern used to represent the database. Repository pattern is not new, you can read "Patterns of Enterprise Application Architecture".

Ecto.Changesets ( is a new abstraction to valid data and relation between inserted values in the database. This module permits to define a specific validation for one or more model instead of all libraries on the market. It makes things easier to refactor and extend.

Ecto.Multi ( is used to insert multiple values at the same time based on SQL transaction. Each data must be valid to be inserted at the same time during the commit. Rollback action is automated with this module.

Ecto gives you the opportunity to read and update data by using different kind of models instead of using only one defined model.

Testing with Ecto, gives you also a better way to test values, isolated side effect, does not use mocking and stubbing and make concurrent testing easy.