April 2019
Beginner to intermediate
244 pages
6h 34m
English
Some database libraries automatically map database tables to the data structures you use in your application code.
Ecto is not one of them.
Instead, we create our schema structs manually by specifying each of the fields and their types.
At first blush, this can feel like unnecessary work that the framework could be doing for us. But it’s actually doing us a service. It allows us to consider the data structures we use in code separately from how that data is stored. This means that we can design our code to be as flexible and expressive as possible, without having to adhere to the rules imposed by relational databases.
In this chapter, we’ll start breaking away from developing schemas that exactly match ...
Read now
Unlock full access