This document provides an overview of using Object Relational Mapping (ORM) with Python SQLAlchemy and MariaSQL. It discusses using ORM for database access, mapping database tables to Python classes, querying relationships between tables, and more advanced topics like adding virtual columns without changing the database schema. The document also includes examples of querying data from multiple related tables and creating database views using alembic migrations.
15. Relation
• NOTE - Two databases has relation if
1. Foreign Key ?
2. Same column name ?
16. Foreign Key
• ForeignKey
• Same type / table name and column name
• relationship
• Table name
• one-to-one / one-to-many / many-to-one
• Many-to-may