Django Database Orm Mastery

Posted By: ELK1nG

Django Database Orm Mastery
Last updated 7/2022
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz
Language: English | Size: 7.84 GB | Duration: 18h 12m

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
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 teaches you how to master database interactions using the Django ORM to build scalable and performant Django applications.This course is currently in its first iteration and presents 1 of 3 planned levels. 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 4.x ORM Mastery

Lecture 1 Course Introduction

Section 2: Python Installation

Lecture 2 Section Introduction

Lecture 3 Python Installation - Mac OS

Lecture 4 Python Installation - Windows 10 or 11 OS

Section 3: Create Isolated Python Environments

Lecture 5 Section Introduction

Lecture 6 Why virtual isolate environments?

Lecture 7 Create a new Virtual Environment on MacOS

Lecture 8 Create a new Virtual Environment on Windows 10/11

Section 4: Preparing the Development Environment

Lecture 9 Section Introduction

Lecture 10 Visual Studio Code and Venv Setup on MacOS

Lecture 11 Create a new Virtual Environment on Windows 10/11

Lecture 12 VSCode Extensions used in this course

Section 5: Django ORM [Level 1] - Object Relational Mapping

Lecture 13 Section Introduction

Lecture 14 Introducing Object Relational Mapping Concept

Lecture 15 Django ORM – Models, QuerySet API and Managers

Section 6: Working with SQLite Database [Level 1]

Lecture 16 Section Introduction

Lecture 17 Introducing SQLite databases

Lecture 18 Connect an SQLite database to a Django project

Section 7: Models [Level 1] - Building Models

Lecture 19 Section Introduction

Lecture 20 Section setup guide - step-by-step

Lecture 21 Section setup guide (CodeBase-0)

Lecture 22 Database Terminology

Lecture 23 Introducing Django models

Lecture 24 Adding a string representation of a model

Lecture 25 The model verbose field name

Lecture 26 Introducing django model field types

Lecture 27 Introducing Django model field options

Lecture 28 Defining model primary keys

Lecture 29 Defining model Foreign Keys

Lecture 30 Defining one-to-one model relationships

Lecture 31 Defining Many-to-Many model relationships

Lecture 32 Introducing model meta options

Section 8: Migrations [Level 1] - Committing to the Database

Lecture 33 Section Introduction

Lecture 34 Migrate model changes to the database schema

Section 9: QuerySet API [Level 1] - Inspecting Queries & Performance Analysis

Lecture 35 Section Introduction

Lecture 36 Section setup guide - Codebase-1

Lecture 37 Inspect queries with the query attribute

Lecture 38 Inspect queries - connection and reset queries

Lecture 39 Pretty print SQL

Section 10: QuerySet API [Level 1] - Utility

Lecture 40 Section Introduction

Lecture 41 Counting returned queryset objects

Lecture 42 Conveniently View data returned in queryset objects

Section 11: QuerySet API [Level 1] - Create and Save Objects

Lecture 43 Section Introduction

Lecture 44 Section setup guide - Codebase-1

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

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

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

Lecture 48 SQL Insert - Executing custom SQL Inserts

Lecture 49 Insert into single table with foreign key

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

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

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

Lecture 53 Insert data into multiples tables & using atomic operations

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

Lecture 55 Insert multiple objects into single table – bulk create

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

Lecture 57 Creating and automating a set of Django Fixtures

Section 12: QuerySet API [Level 1] - Retrieving objects

Lecture 58 Section Introduction

Lecture 59 Section setup guide (Codebase-2)

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

Lecture 61 SQL – Return all objects from a single table

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

Lecture 63 SQL – Return single objects from a single table

Lecture 64 Filter & Exclude - Retrieving specific objects

Lecture 65 SQL – Filter retrieving objects – filter()

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

Lecture 67 SQL - Retrieve objects foreign key relationship

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

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

Section 13: QuerySet API [Level 1] - Update Fields/Records

Lecture 70 Section Introduction

Lecture 71 Section setup guide (Codebase-2)

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

Lecture 73 Implementing update_or_create()

Lecture 74 bulk_update records in a single table

Section 14: QuerySet API [Level 1] - Delete Records

Lecture 75 Section Introduction

Lecture 76 Section setup guide (Codebase-2)

Lecture 77 Delete single and multiple objects

Section 15: Working with PostgreSQL Database [Level 1]

Lecture 78 Section introduction

Lecture 79 Docker introduction

Lecture 80 Installing Docker MacOS

Lecture 81 Installing Docker Desktop for Windows 10/11

Lecture 82 Create a Postgres Docker container

Lecture 83 Configuring Django to work with a PostgreSQL database

Section 16: QuerySet API [Level 1] - Field lookup keywords arguments

Lecture 84 Section Introduction

Lecture 85 Section setup guide (Codebase-3)

Lecture 86 Field lookups

Lecture 87 Field lookup contains

Lecture 88 Field lookup with greater or less than

Lecture 89 Field lookup with start or end with

Lecture 90 Field lookup range

Lecture 91 Field lookup Day Week Month

Section 17: QuerySet API [Level 1] - QuerySet Ordering and Limiting

Lecture 92 Section Introduction

Lecture 93 Section setup guide (Codebase-3)

Lecture 94 Ordering a new QuerySet

Lecture 95 Reverse the output of a new QuerySet

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

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

Lecture 98 Limit the objects returned from a QuerySet

Section 18: QuerySet API [Level 1] - Practical Exercises & Answers

Lecture 99 Section Introduction

Lecture 100 Section setup guide (Codebase-4)

Lecture 101 Reintroducing the database design and dataset

Lecture 102 Retrieve all sub-products for an individual product

Lecture 103 Retrieve a product featured image

Lecture 104 Retrieve all values associated to a sub-product

Lecture 105 Retrieve the product attributes for a given product type

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

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

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

Lecture 109 Retrieve all woman shoe products

Lecture 110 Retrieve all woman shoes by the xyz brand

Lecture 111 Retrieve all products associated to the xyz brand

Section 19: Case Study 1 [Level 1] Ecommerce Inventory | Design | Build | Query

Lecture 112 Case Study Introduction

Lecture 113 Case Study Resources

Lecture 114 Design - Design methodology

Lecture 115 Design – Define the purpose

Lecture 116 Design - Requirement analysis

Lecture 117 Design - Defining the preliminary list of fields

Lecture 118 Design - Defining the preliminary subjects/entities

Lecture 119 Design - Refining the fields and tables

Lecture 120 Design - Naming fields and tables

Lecture 121 Design - Establishing Keys

Lecture 122 Design - Field Specifications

Lecture 123 Design - Table Relationships

Lecture 124 Design - Table Relationships – update fields

Lecture 125 Design - Business Rules

Lecture 126 Design - Django / Application Rules

Lecture 127 Build - Create the tables and fields

Lecture 128 Data – Create data - Django Admin Site

Lecture 129 Data – Create data - Django fixtures

Lecture 130 Data – Create data - Management command

Section 20: Django User Model [Level 2]

Lecture 131 Section Intro - Django User Model

Lecture 132 Introducing the Django User Model

Lecture 133 Changing the User Model Behaviour (Proxy Model)

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

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

Section 21: Models [Level 2] - Building Models

Lecture 136 Field Choice Options

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