What is the difference between ODM and ORM?
When you first learn how to work with database, it all comes down to two types of database set ups which are ORM (object Relation Mapping) and ODM (Object Document Mapping)
ORM which is to map an object with a relational world, it basically converts data between incompatible types in object oriented programming languages. ORM wraps the implementation specific details of storage drivers in an API (application program interface), and maps the relational fields to an object members. For example if I have a table of employees, it is mapped to a single object for all employees, with various methods associated with it.
ODM on the other hand is an Object Document Mapper, which maps objects with a Document Database like MongoDB.
The main difference is that ORM is for MySQL databases, while ODM does the mapping for document representation of data.
best way to remember what ORM does would be to think of it as an excel spread sheet, with rows and columns. When using this set up, you want to be sure you have a great plan on how you want to tackle the current application, it does not allow as many modifications like ODM does. With ODM we can add new fields and properties easily but with ORM when adding a new field you need to keep in mind that nothing stays empty so it needs a value to be as default unless you want to go into each and modify.