Coder Social home page Coder Social logo

python-p3-intro-to-sqlalchemy-relationships's Introduction

Intro to SQLAlchemy Relationships

Learning Goals

  • Use SQLAlchemy to join tables with one-to-one, one-to-many, and many-to-many relationships.

Introduction

Previously, we worked through object-relational mapping and building Python classes that can represent SQL tables. We also saw how SQLAlchemy is an interface that gives you the tools to link a database to your application. It lets you query and manipulate your data models in a logical and nearly plain-English way.

So far, we've worked with applications that only have a single model. However, as we saw in the SQL section, it's possible for data to be stored in multiple related (associated) tables. How can we use SQLAlchemy to access that data across multiple tables?

We'll cover topics that will include answers to these questions:

  • What are common relationship methods accessible through SQLAlchemy?
  • How do you configure one-to-one, one-to-many, and many-to-many relationships in SQLAlchemy?

Having a solid understanding of SQLAlchemy will make working with data much easier. This will replace the need for a lot of the custom code we wrote when creating ORMs. We’ll cover working with models, setting them up, and building relationships between them.


Resources

python-p3-intro-to-sqlalchemy-relationships's People

Contributors

lizbur10 avatar professor-ben avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-p3-intro-to-sqlalchemy-relationships's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.