Django Database Orm Mastery

Posted By: ELK1nG

Django Database Orm Mastery
Last updated 2/2023
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz
Language: English | Size: 10.97 GB | Duration: 22h 57m

Learn how to master building and interacting with databases within a Django project

What you'll learn

Setup and prepare an environment ready to develop Python Django applications

@ Level 1 - Connect Django applications to multiple database technologies and perform a variety of queries to create return update and delete data

@ Level 1 – Connect a Django application to multiple database technologies utilising Docker container technologies

@ Level 1 – Propagate changes to database tables structures

@ Level 1 – Build raw SQL queries to interact with database from within a Django project

@ Level 1 – Implement a variety of QuerySet API methods to limit, order and optimise performance

@ Level 1 – Implement a design methodology design and subsequently build and query a database

@ Level 2 - Advance knowledge of topics introduce at level 1

@ Level 2 - Implement Proxy Models & Abstract Classes

@ Level 2 - Incorporate Django Signals

@ Level 2 - Implement Django User Models and customizations

@ Level 2 - Implement Django Model Permissions

@ Level 2 - Implement Caching to enhance performance

@ Level 2 - Database testing

@ Level 2 - Q-Objects, Annotations, Fixtures, F() expressions, Prefetch

Requirements

Prior experience in using the Django framework would be advantageous

Knowledge of relational database principles would be advantageous

Having a computer would definitely be advantageous

Description

One of the most powerful features of Django is its Object-Relational Mapper (ORM). In a Django project, the Django ORM provides the tools to rapidly build database interactions without needing to learn Structured Query Language (SQL). This course helps you start your journey mastering database interactions using the Django ORM to build scalable and performant Django applications.This course is currently in its first iteration and includes level 1 of 3 planned levels. Each level will be a separate course. You will find subsequent levels in our course library for levels 2 and 3 of this course. At level 1 you will learn how to build, administrate tables and perform common Create, Return, Update and Delete (CRUD) operations through the Django ORM. The courseware at level 1 scaffolds the learning, building towards a final case study where we first design and subsequently develop and query the database. Learners may track their knowledge through optional section assessments leading towards a final level assessment (section and level assessments are a feature coming very soon).We believe that to master Django database interactions and performance, it can be beneficial to underpin knowledge, learning to interact with a database from a Django project through raw SQL queries. Subsequently, learners may follow optional tutorials learning the underlying SQL used to interact with a database and perform operations.I hope you enjoy the course and fulfil your learning objective. Don’t forget to visit us on our YouTube Channel, Very Academy, where you can further interact with the community and explore other free supplementary content.

Overview

Section 1: Django Database ORM Mastery

Lecture 1 Course Induction

Section 2: Setup Guides

Lecture 2 [Windows] Installing Python 3.9.5

Lecture 3 [Windows] Visual Studio Code Induction

Lecture 4 [Windows ] Creating Virtual Environments

Lecture 5 [macOS] Installing Python 3.9.5

Lecture 6 [macOS] Visual Studio Code Induction

Lecture 7 [macOS] Creating Virtual Environments

Lecture 8 Visual Studio Code Extensions

Section 3: [Optional] Django Framework Introduction Exercise

Lecture 9 Preparing a new Virtual Environment

Lecture 10 Introducing the Python Package Index

Lecture 11 Installing the Django Framework

Lecture 12 Creating a new Django project

Lecture 13 Creating a new Django application

Lecture 14 Registering a new Django application

Lecture 15 Starting the Django Development Server

Lecture 16 Understanding the Django Request-Response Cycle

Lecture 17 Creating a unique URL pattern

Lecture 18 Writing a new view

Lecture 19 Creating a new HTML template

Lecture 20 Relating an HTML template to a view

Lecture 21 Installing a Django application from a requirements.txt file

Section 4: L1: Working with an SQLite Database

Lecture 22 Section Introduction

Lecture 23 Introducing SQLite databases

Lecture 24 Connect an SQLite database to a Django project

Section 5: L1: Building Models

Lecture 25 Section Introduction

Lecture 26 Section setup guide - step-by-step

Lecture 27 Section setup guide (CodeBase-0)

Lecture 28 Database Terminology

Lecture 29 Introducing Django models

Lecture 30 Adding a string representation of a model

Lecture 31 The model verbose field name

Lecture 32 Introducing django model field types

Lecture 33 Introducing Django model field options

Lecture 34 Defining model primary keys

Lecture 35 Defining model Foreign Keys

Lecture 36 Defining one-to-one model relationships

Lecture 37 Defining Many-to-Many model relationships

Lecture 38 Introducing model meta options

Section 6: L1: Migrations

Lecture 39 Section Introduction

Lecture 40 Migrate model changes to the database schema

Section 7: L1: Inspecting Queries & Performance Analysis

Lecture 41 Section Introduction

Lecture 42 Section setup guide - Codebase-1

Lecture 43 Inspect queries with the query attribute

Lecture 44 Inspect queries - connection and reset queries

Lecture 45 Pretty print SQL

Section 8: L1: Utility

Lecture 46 Section Introduction

Lecture 47 Counting returned queryset objects

Lecture 48 Conveniently View data returned in queryset objects

Section 9: L1: Create and Save Objects

Lecture 49 Section Introduction

Lecture 50 Section setup guide - Codebase-1

Lecture 51 Insert data into a single table with create()

Lecture 52 Insert data into a single table with save()

Lecture 53 Explore the difference between save() and create()

Lecture 54 SQL Insert - Executing custom SQL Inserts

Lecture 55 Insert into single table with foreign key

Lecture 56 SQL Insert - Working with datetime fields and foreign keys

Lecture 57 Insert data into a single table with a many-to-many relationship

Lecture 58 SQL Insert – Working with many-to-many relationships

Lecture 59 Insert data into multiples tables & using atomic operations

Lecture 60 Insert data into a single table with a one-to-one relationship

Lecture 61 Insert multiple objects into single table – bulk create

Lecture 62 Query Profiling – bulk_create() vs create() performance analysis

Lecture 63 Creating and automating a set of Django Fixtures

Section 10: L1: Retrieving objects

Lecture 64 Section Introduction

Lecture 65 Section setup guide (Codebase-2)

Lecture 66 Return all objects from a single table – all()

Lecture 67 SQL – Return all objects from a single table

Lecture 68 Retrieving single objects from a single table – get()

Lecture 69 SQL – Return single objects from a single table

Lecture 70 Filter & Exclude - Retrieving specific objects

Lecture 71 SQL – Filter retrieving objects – filter()

Lecture 72 Retrieve objects from multiple tables through a foreign key relationship

Lecture 73 SQL - Retrieve objects foreign key relationship

Lecture 74 Retrieve objects from multiple tables through a one-to-one relationship

Lecture 75 Retrieve objects from multiple tables through a many-to-many relationship

Section 11: L1: Update Fields/Records

Lecture 76 Section Introduction

Lecture 77 Section setup guide (Codebase-2)

Lecture 78 Modify existing data for a specified record in a table

Lecture 79 Implementing update_or_create()

Lecture 80 bulk_update records in a single table

Section 12: L1: Delete Records

Lecture 81 Section Introduction

Lecture 82 Section setup guide (Codebase-2)

Lecture 83 Delete single and multiple objects

Section 13: L1: Implementing PostgreSQL Database & Docker

Lecture 84 Section introduction

Lecture 85 Docker introduction

Lecture 86 Installing Docker MacOS

Lecture 87 Installing Docker Desktop for Windows 10/11

Lecture 88 Create a Postgres Docker container

Lecture 89 Configuring Django to work with a PostgreSQL database

Section 14: L1: Field Lookup Keywords Arguments

Lecture 90 Section Introduction

Lecture 91 Section setup guide (Codebase-3)

Lecture 92 Field lookups

Lecture 93 Field lookup contains

Lecture 94 Field lookup with greater or less than

Lecture 95 Field lookup with start or end with

Lecture 96 Field lookup range

Lecture 97 Field lookup Day Week Month

Section 15: L1: QuerySet Ordering and Limiting

Lecture 98 Section Introduction

Lecture 99 Section setup guide (Codebase-3)

Lecture 100 Ordering a new QuerySet

Lecture 101 Reverse the output of a new QuerySet

Lecture 102 Return the first or last object matched by the queryset

Lecture 103 Return the earliest or latest object matched by the QuerySet

Lecture 104 Limit the objects returned from a QuerySet

Section 16: L1: Practical Exercises & Answers

Lecture 105 Section Introduction

Lecture 106 Section setup guide (Codebase-4)

Lecture 107 Reintroducing the database design and dataset

Lecture 108 Retrieve all sub-products for an individual product

Lecture 109 Retrieve a product featured image

Lecture 110 Retrieve all values associated to a sub-product

Lecture 111 Retrieve the product attributes for a given product type

Lecture 112 Retrieve all products associated to product attribute id:1

Lecture 113 Retrieve all sub-products that has less than 50 units left in stock

Lecture 114 Retrieve all sub-products which have been stock checked in the last month

Lecture 115 Retrieve all woman shoe products

Lecture 116 Retrieve all woman shoes by the xyz brand

Lecture 117 Retrieve all products associated to the xyz brand

Section 17: Level 1: Case Study - Ecommerce Inventory | Design | Build | Query

Lecture 118 Case Study Introduction

Lecture 119 Case Study Resources

Lecture 120 Design - Design methodology

Lecture 121 Design – Define the purpose

Lecture 122 Design - Requirement analysis

Lecture 123 Design - Defining the preliminary list of fields

Lecture 124 Design - Defining the preliminary subjects/entities

Lecture 125 Design - Refining the fields and tables

Lecture 126 Design - Naming fields and tables

Lecture 127 Design - Establishing Keys

Lecture 128 Design - Field Specifications

Lecture 129 Design - Table Relationships

Lecture 130 Design - Table Relationships – update fields

Lecture 131 Design - Business Rules

Lecture 132 Design - Django / Application Rules

Lecture 133 Build - Create the tables and fields

Lecture 134 Data – Create data - Django Admin Site

Lecture 135 Data – Create data - Django fixtures

Lecture 136 Data – Create data - Management command

Section 18: Django Signals

Lecture 137 Introducing Signals and the Observer Pattern

Lecture 138 Recieving Signals

Lecture 139 Receiving Signals Specifying a Model

Section 19: Custom Model Fields

Lecture 140 Introducing Custom Model Fields

Lecture 141 Creating a Custom field Subclass

Lecture 142 Creating a Custom Order Field

Lecture 143 Custom field Subclass - Converting Values to and From a Database

Section 20: Creating Many-to-Many Relationship Customisations

Lecture 144 Learning Objectives: Advancing Many-to-Many

Lecture 145 Re-cap - Many-to-Many relationship

Lecture 146 Specifying a Many-to-Many Intermediate Model

Lecture 147 Django Admin Many-to-Many Intermediate Model Configuration

Lecture 148 Querying a Many-to-Many Custom Intermediate Model

Lecture 149 Related Object Reference Reverse Queries

Lecture 150 Extend a Many-to-Many intermediate model with custom fields

Section 21: L2: Django User Model

Lecture 151 Section Intro - Django User Model

Lecture 152 Introducing the Django User Model

Lecture 153 Changing the User Model Behaviour (Proxy Model)

Lecture 154 Store extra information about the existing User Model (User Profile)

Lecture 155 Inherit and add extra fields to the user table (AbstractUser)

Section 22: [Additional Content] Introducing Linters and Formatters

Lecture 156 Introducing Linters and Formatters

Lecture 157 Black

Lecture 158 Flake8

Lecture 159 Microsoft Python Extension

Beginners, Developers, Students, and Enthusiasts new to the Django Framework,Developers, Students, and Enthusiasts looking to refresh their knowledge of the Django ORM