I’ve just watched Darin Wilson’s great talk “Thinking in Ecto” and I immediately started playing with embedded schemas.
I’ve been teaching myself Elixir by writing a Coursera/Udemy/Pluralsight/you name it clone and I would like to each course to have a playlist that mixes videos and quizzes in different order.
Is that a good idea to use embedded schemas for it? That is, to have very different content in rows of the same table in the database and then giving them different schemas in Ecto?
I liked the idea at first but the more I look at it, the more it makes em think it’s a bad use of table fields, as it would have to account for properties of many different entities (two for now, but maybe more in the future) which wouldn’t be all shared amongst all elements in it.
If not a good idea, is there any recommend way to go about having elements from different tables being fetched together and possibly ordered amongst them by some property they’d have in common?