Lesson

Create a one to many relationship in Python using SQLAlchemy

In this lesson, you will learn how to create a one to many relationship between two database tables using SQLAlchemy. Tasks covered include: - creating a child table - defining a foreign key in the child table - creating the relationship between the parent...

Duration
7 min
Access
Free
Transcript
Available

In this lesson, you will learn how to create a one to many relationship between two database tables using SQLAlchemy. Tasks covered include:

  • creating a child table
  • defining a foreign key in the child table
  • creating the relationship between the parent and child table
  • demonstrate usage in Python
  • view the data created in a local sqlite database