Overview of Part I

Get introduced to the fundamentals of Ecto.

We begin by learning the core features of Ecto’s API. Each section covers a different Ecto module, starting with the basics and working towards more complex use cases. Once we have this foundation, we’ll be able to look at the specific use cases covered in Part II.

Structure of Part I: Ecto Fundamentals

This section has six chapters:

  1. Get Started with Repo talks about the basics of Ecto as a whole and introduces various modules of Ecto. We’ll also set up a sample Elixir application with Ecto and introduce the Repo module, which is the heart of Ecto.

  2. Query Your Database introduces the Query module and explains how to write queries using it. We’ll also learn about ordering and grouping query results and combining the results of multiple queries.

  3. Connect Your Tables to Elixir Structs with Schemas covers how to create schemas using the Schema module and how to perform CRUD operations using them. We’ll also learn about different types of associations between schemas.

  4. Make Changes with Changesets introduces the Changeset module used for making changes to the data. We’ll also learn how changesets help to work with associations and embeds.

  5. Make Multiple Changes with Transactions and Multi Module talks about grouping operations for making multiple changes to the data. We’ll learn to group operations by using functions or by using the Multi module.

  6. Make Changes to Your Database describes how to create and alter database tables using the Migration module. We’ll learn how to create, run, and rollback migrations in Ecto.