New Classes Enrolling Now! See Schedules
Student Login | Student Center
High School Coding Program, Guy with Laptop

Course Description

In Object Relational Mapping, the second course in Wizard Level 3 of our high school program, students are introduced to an ORM (Object Relational Mapping) library called SQLAlchemy. ORMs make managing a database much more straightforward for developers and allow them to use Object-Oriented Programming (OOP) paradigms to perform standard database operations instead of raw SQL queries. While understanding how to author basic SQL queries is an essential skill, most developers use an ORM in the real world. The exposure to an ORM library and the OOP paradigm gives students a robust set of abstractions to work with when building more extensive and complicated applications. After completing Object Relational Mapping, students are ready to move on to the next course in our structured curriculum: DevOps and Software Engineering.  

High School Coding Program, Girl With Backpack

Learning Objectives

When students complete Object Relational Mapping, they will be able to:

  • Use SQLAlchemy, an Object Relational Mapping (ORM) library, to manage interactions with a database in their applications 
  • Define relationships between relational database tables using database design best-practices
  • Model application resources (such as user accounts, shopping cart items, etc.) using the principles of Object-Oriented Programming (OOP)
Wizard Level III

Prerequisites

These courses must be completed before Object Relational Mapping:

Object Relational Mapping Class LessonsExpand All Lessons
  • Object Relational Mapping class lesson 1
    1. Introduction to Object-Oriented Programming

    In the first lesson of this course, students learn about the conceptual difference between Object-Oriented Programming and Procedural Programming. They discuss some drawbacks to the “Cooking Recipe” programming method. Students create a superhero console to gain an understanding of how to add instance attributes and methods in Python.

  • Object Relational Mapping class lesson 2
    2. Constructors in Object-Oriented Programming

    In this lesson, students learn about constructors, a compulsory part of OOP programming. They see the benefits of using a constructor and, by the end of this class, they implement a celebrities page using constructors. They also learn about parameterized constructors and validate the attribute values inside of them. Students use exceptions to throw an error when a wrong attribute value is entered.

  • Object Relational Mapping class lesson 3
    3. Encapsulation in Object-Oriented Programming

    In this lesson, students discuss the idea behind encapsulation and why they need it in object-oriented programming. Students fix a bug from their previous lesson code while implementing encapsulation. They learn about private attributes and use Get & Set methods. As a bonus, they also use the DateTime module to find out the year by which their celebrity would be 100 years of age.

  • Object Relational Mapping class lesson 4
    4. Inheritance in Object-Oriented Programming

    In this lesson, students revisit the DRY principle while learning a fundamental OOP concept, inheritance. They learn how to share the attributes and methods among multiple classes. Using these concepts, they create a love calculator by inheriting it from a Calculator class. 

  • Object Relational Mapping class lesson 5
    5. Introduction to Object Relational Mapping

    In this lesson, students revisit how to store data in a database. They implement OOP concepts used to interact with a database using ORM. ORM allows a programmer to use Python language to get data instead of using SQL queries. By the end of this class, they are able to query the Chinook database using ORM methods.

  • Object Relational Mapping class lesson 6
    6. Creating Data Using ORM

    In this lesson, students revise the ORM concepts they learned in the previous lesson to create their bucket list and save it in the database. They learn how to create new tables in the database using an OOP class. In addition to that, they also filter the data retrieved by the database using the filter() function. 

  • Object Relational Mapping class lesson 7
    7. CRUD operations using ORM

    In this lesson, students revisit the concept of CRUD operations in the database. They identify the create and retrieve operations implemented in the previous lesson. Students learn how to do an update and delete operation using SQLAlchemy methods. By the end of this class, students will create an inventory management system that includes functions for discontinued products and price hikes. As a bonus, they learn how to update multiple rows in the database.

  • Object Relational Mapping class lesson 8
    8. Creating and Managing Relationships in Data

    In this lesson, students revisit the foreign key and join queries to combine data from multiple tables. They’ll also learn a new database concept called relationships. They explore all three types of database relationships and implement the one-to-many relationship between a team and its players. While doing this, they also learn how to add multiple objects to the database at once.

  • Object Relational Mapping class lesson 9
    9. Implementing CRUD in Flask App

    In this lesson, students revisit their bucket list project and create a flask app out of it. They use the same database model, but revise some flask concepts like variable routes. By the end of this class, they will have a complete working bucket list app in which they can add and update activities.

  • Object Relational Mapping class lesson 10
    10. Continuing with Relationships in Data

    In this lesson, students take all the ORM concepts learned so far and plug them into a Flask app. They are introduced to a new module, Flask-sqlalchemy. It’s very similar to SQLAlchemy module, with a few newer classes and functions that make it easier to link it with the Flask app. In addition to that, they also implement a one-to-one relationship between a coach and a team. 

  • Object Relational Mapping class lesson 11
    11. Final Project – I

    In this lesson, students use the concepts they learned throughout their course. They covered the fundamentals of OOP and used them to implement the database operations using ORM. In this class, they start their final project, a Superhero console. By the end of this class, they can add and delete superheroes in the console.

  • Object Relational Mapping class lesson 12
    12. Final Project – II

    In this lesson, students complete the OOP course. They implement all of the concepts from OOP to those in ORM. They execute CRUD operations and relationships between multiple tables. They also complete their final project, a Superhero console, and add a one-to-many relationship. 

Class Schedule

All students start in Intro to Python at Wizard Level I. If you have previous coding experience, take the Advanced Placement test. Returning students can continue with the class where they left off.

#1 Most Comprehensive Program for Your Student’s Success!

The CodeWizardsHQ program comes with everything your child needs to be successful in learning to code.

All of the below are included at no extra cost.

Interactive Live Classes
Structured and Comprehensive Curriculum
Video Recordings of Every Class
Downloadable Slides for Every Class
Complimentary 1×1 Office Hours
Weekly Progress Report & Alerts
Daily Homework Help
Individual Course Certification
Highly Qualified and Experienced Teachers
24/7 Access to Proprietary Coding Platform
Supportive Online Student Community
Path to Real-World Internship
Hands-on, Project Based Learning

Course Duration & Time Commitment
All courses are 12 weeks long. A Wizard will receive a certification for their achievement at the end of the course.

Expect a weekly time commitment of 2-3 hours. 55 minutes of class time, plus 1-2 hours of practice time, with instructor support throughout, including weekends.

100% Guarantee

Our goal is to make all our students successful. If your child is not happy with our program, please notify us within the first four class sessions and you will receive a full refund. See refund details.

Get Your Wizard Started

Start coding with our experienced teachers today.
Enroll risk-free with our 4 session money-back guarantee. Full guarantee details.