Search⌘ K
AI Features

Wrapping Up: Use Schemas Without Tables

Explore how to design Ecto schemas independent of database tables, enabling flexible data handling tailored to application needs. Learn to apply changeset validations and manage data outside traditional relational storage while maintaining Ecto’s tools for data manipulation.

We'll cover the following...

Schemas in Ecto require a manual setup to map them to database tables. In exchange for that effort, we get data structures that are flexible and able to work with our application’s specific needs.

With Ecto, it’s possible to break out of the constraints of having our data structures locked to our database tables. We can design our structs around the needs of our application code ...