Python Classroom notes 24/May/2026

Database Layer

  • We need to figure out a way to interact with database
  • From the design perspecive we have two options
    • Executing SQL Statements
    • ORM Frameworks

Python to Database using raw sql statements

  • Databases: On a larger note we have two types of databases

    • Relational Databases:

      • Here data is stored in tabular formats and tables can have relationships between them
        Preview

      • There are two types of keys

        • primary key
        • foreign key
      • To interact with these databases there is a standard SQL (Structured Query Language)
      • This standard is implemented by database management softwares
      • SQL Standard
        • CREATE
        • UPDATE
        • DELETE
        • Retrieve/SELECT
        • NO-SQL
  • Prompt for SQL

you are an expert in database,
Help me in learning and writing sql statements of postgres database for a simple school management system

Explain Each topic, give some examples wait, then go to next

SQLite

  • This is a database which stores all of its data in a file
  • Python standard library supports this

  • Refer Here for code done and watch classroom recording for sqlite and postgres related db connection and executing queries

ORM (Object Relational Mapping)

  • ORM gives

    • Cleaner code
    • Reusable models
    • relationships
    • migrations
    • type safety
    • abstracts db engine
  • Popular ORM Frameworks

    • SQLAlchemy
    • Django ORM

SQL ALchemy

Authentication and Authorization

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading