Object relational mapping, also known as ORM, is how we as programmers manage and interact with the data we're using to create a website or a piece of software.
We used this concept in our final project, Black Thursday, wherein we created a database from scratch and used our structure to run analytics on business e-commerce data.
The Black Thursday object relational map looks like this:
Each of the sticky note lists in the image above correspond to "repositories" containing a huge list of each type of item. Each of the items in a repository has the attributes listed within the sticky note.
You may notice, however, that not every item "knows about" every other item. For example, an invoice knows which customer and which merchant it belongs to, but not about its own invoice items.
In this project, we had to create complex data relationships so that one could, for example, find the revenue for a single merchant.
To do this, we had to:
To accomplish each step, we had to create relationships between the items and repositories so that each item in the hierarchy "knew" about the repository above it, and could traverse the structure while also holding the relevant identifying data for the items sought.
In a perfect world, an ORM would not be hard to use, and would help immensely in visualizing your data structure.
But in the real world, databases are often set up incorrectly or by non-technical users, and so there are errors in the structure that can make your task harder, regardless of how the ORM says your database is supposed to work.
This was the case with our project. For many of the requirements, one could in theory traverse the structure in several ways to get to the same result, but in practice, there was only one way, and that way could only be found through trial and error.
¯\_(ツ)_/¯
Really, though, it was meant to help us get used to complex business requirements and navigating mission-critical structures, which will always have imperfections and quirks of their own.
You'll be fine. Mod 1 is really fun and cool, and will truly help you find out if you like projammin', which I definitely do.
Thanks to Mike, Sal, and Ali for being great instructors and making sure none of us went (too) crazy.