ORMs and SQL Joins- Overview
This video review lesson covers basic SQL queries in an object-oriented ecommerce domain. To get the most out of the video, we recommend that you complete the readings and labs that come before it.
Summary
Combine your knowledge of object relationships in object oriented ruby and your knowledge of join tables in SQL in order to write ORM-based methods that will allow you to create related objects from related SQLite3 databases.
Objectives
- Understand how database domain models relate with object oriented domain models.
- Understand how SQL foreign keys and join tables can be used to represent object relationships.
- Create objects with a belongs to relationship from database tables representing a belongs to relationship.
- Create objects with a has many relationship from tables representing a has many relationship.
- Use SQL join queries to create objects with a has many through relationship from join tables.