SQL and PostgreSQL: The Complete Developer's Guide

Become an expert with SQL and PostgreSQL! Store and fetch data, tune queries, and design efficient database structures!

  • 0.0 (0 Reviews)
  • 0 Students
  • 333 Lessons
  • Stephen Grider

Course Overview

Database structure design?  It's here.  Query tuning and optimization? You'll master it.  Complex queries? Yes indeed!

This is the only course online that will teach you how to design a database, store complex data, optimize your queries, everything that is needed for operating a production, scalable database!

Every app in the world, whether it is a mobile app built with Flutter, a web app constructed with React, or a plain HTML page, needs to store information in a database.  Although there are many different databases you can use, PostgreSQL has been a number-one pick for decades, offering scalable performance, rock-solid uptime, and flexible design systems.  This course will teach you everything you need to know about PostgreSQL to use it on your next big project!

Don't know anything about databases at all? No problem. We begin with an overview of SQL, the language used to interact with PostgreSQL. Through an incredible number of exercises, you'll get practical, hands on experience working with realistic datasets.  You will understand how to store, fetch, and update information with a series of powerful commands. 

After gaining experience with elementary operations, you will move on to understanding database design patterns, offering multiple ways to structure your database for efficient data modeling. You'll see many different scenarios with different types of data, and understand the pros and cons to several approaches.

This course is packed with practice exercises and quizzes. You'll get immediate practice on all of the different topics and features that you learn!  In addition, you'll understand exactly where to use each of these features in real and practical projects.

Besides getting practical hands-on experience, you'll also get a behind-the-scenes look at how PostgreSQL works internally. We'll dive into raw data files, investigating how PostgreSQL stores information on your hard drive bit by bit.  This knowledge is invaluable when it comes time to start tuning your queries for performance.  By having a natural instinct of how PostgreSQL works, you can plan on being able to get every last bit of performance out of your database.

Here is a partial list of some of the topics that are covered in this course:

  • Apply powerful SQL commands to store, update, and retrieve information

  • Build relationships between records using foreign keys between tables

  • Understand PostgreSQL's numerous data types, and when to use each

  • Assemble reports of business data by using aggregation pipelines

  • Work with millions of records to simulate real production queries

  • Exercise your query logic skills through the use of sets and sorting operators

  • Compose queries out of smaller reusable units using subqueries

  • Use different design patterns to efficiently model your data

  • See how to divide database objects into different schemas to maintain them more easily

  • Validate your data using simple 'check' rules

  • Construct perfect designs for common features such as 'like', 'follow', and 'tag' systems

  • Speed up your queries with indexes - you'll see exactly how they work behind the scenes!

  • Dive into some of the most complex queries around with recursive common table expressions

  • Deal with concurrency issues easily by applying transactions

I made this course to be the perfect resource for engineers just getting started with their first database.  Master the database itself, and see how to apply it with real designs.  Sign up today and master PostgreSQL!

See more

FAQ

FAQ area empty

Course curriculum

37 chương 333 bài học 21 giờ 54 phút 7 bài học thử miễn phí
Chương 1 Simple - But Powerful - SQL Statements
Chương 2 Filtering Records
  • Filtering Rows with "Where" 3:49
  • More on the "Where" Keyword 2:30
  • Compound "Where" Clauses 5:24
  • A "Where" Exercise Overview 0:37
  • Practicing Where Statements
  • A "Where" Solution 0:56
  • "Where" With Lists 0:37
  • A More Challenging 'Where'
  • A "Where" With Lists Solution 1:42
  • Calculations in "Where" Clauses 2:05
  • Trying Calculations in Where Clauses
  • Solving Calculations 1:51
  • Updating Rows 4:16
  • Deleting Rows 3:16
  • Try Updating Records In a Table!
  • A Solution for Updating Rows 1:29
  • Practice Deleting Records
  • Solution for Deleting Rows 1:17
Chương 3 Working with Tables
  • The Plan Moving Forward 1:43
  • Approaching Database Design 7:28
  • Let's Design Some Schema
  • One-to-Many and Many-to-One Relationships 6:33
  • A 'Has One' or 'Has Many'?
  • One-to-One and Many-to-Many Relationships 5:41
  • Identifying One-to-One and Many-to-Many Relationships
  • Primary Keys and Foreign Keys 5:29
  • Understanding Foreign Keys 8:19
  • Foreign Keys; How Do They Work?
  • Auto-Generated ID's 5:47
  • Creating Foreign Key Columns 4:38
  • Running Queries on Associated Data 6:48
  • Exercise Overview 2:07
  • Creating and Using Foreign Keys
  • Foreign Key Creation Solution 2:09
  • Foreign Key Constraints Around Insertion 5:35
  • Constraints Around Deletion 5:00
  • Commands You’ll Need for the Next Video
  • Testing Deletion Constraints 4:37
  • Setting Foreign Keys to Null on Delete 2:58
  • What Happens On Delete?
  • Adding Some Complexity 2:56
Chương 4 Relating Records with Joins
  • Adding Some Data
  • Queries with Joins and Aggregations 3:23
  • Joining Data from Different Tables 7:38
  • Another Quick Join 2:22
  • Exercise Overview 1:13
  • Practice Joining Data
  • A Joinful Solution 1:42
  • Alternate Forms of Syntax 5:51
  • Missing Data in Joins 6:16
  • Why Wasn't It Included 2:22
  • Four Kinds of Joins 9:25
  • Each Join in Practice 4:14
  • Does Order Matter? 4:11
  • Test Your Joining Knowledge
  • Exercise Overview 0:55
  • Joins, Joins, Join!
  • Two Possible Solutions 2:59
  • Where with Join 6:44
  • Three Way Joins 8:29
  • A Bit of Practice 4:58
  • Three Way Exercise
  • Exercise Solution 2:52
Chương 5 Aggregation of Records
  • Aggregating and Grouping 2:10
  • Picturing Group By 5:29
  • Selecting Columns After Grouping
  • Aggregate Functions 2:59
  • Combining Group By and Aggregates 4:47
  • A Gotcha with Count 2:35
  • Visualizing More Grouping 3:10
  • Exercise Overview 0:39
  • Practice For Grouping and Aggregating
  • Grouping Solution 1:20
  • Adding a Layer of Difficulty 0:42
  • Grouping With a Join!
  • Solution 1:27
  • Filtering Groups with Having 4:43
  • Having In Action 2:35
  • More on Having! 6:47
  • A Having Exercise Overview 3:36
  • Practice Yourself Some Having
  • A Quick Solution 2:32
Chương 6 Working with Large Datasets
  • A New Dataset
  • Investigating This Dataset 2:34
  • Some Group By Practice 1:20
  • Group By Review
  • Group By Review Solution 2:25
  • Remember Joins? 2:13
  • Inner Join Review
  • Of Course You Remember! 1:25
Chương 7 Sorting Records
  • The Basics of Sorting 2:14
  • Two Variations on Sorting 2:40
  • Offset and Limit 6:38
  • Exercise Overview 0:25
  • Sorting, Offsetting, and Limiting
  • Exercise Solution 1:20
Chương 8 Unions and Intersections with Sets
  • Handling Sets with Union 5:43
  • A Few Notes on Union 3:45
  • Commonalities with Intersect 3:23
  • Removing Commonalities with Except 5:49
  • Union Exercise Overview 1:26
  • Merging Results with Union
  • Exercise Solution 1:27
Chương 9 Assembling Queries with SubQueries
  • What's a Subquery? 5:48
  • Thinking About the Structure of Data 4:46
  • What's the Data Look Like?
  • Subqueries in a Select 5:41
  • Exercise Overview 1:05
  • Embedding in Select
  • Select Solution 1:18
  • Subqueries in a From 7:58
  • From Subqueries that Return a Value 2:45
  • Example of a Subquery in a From 8:56
  • Exercise Overview 1:15
  • Subquery From's
  • Exercise Solution 1:59
  • Subqueries in a Join Clause 4:52
  • More Useful - Subqueries with Where 8:11
  • Data Structure with Where Subqueries 5:35
  • Exercise Overview 0:57
  • Subquery Where's
  • Exercise Solution 2:05
  • The Not In Operator with a List 4:09
  • A New Where Operator 6:20
  • Finally Some! 5:21
  • Is It A Valid Subquery?
  • Exercise Overview 0:27
  • Practice Your Subqueries!
  • A Quick Solution 1:33
  • Probably Too Much About Correlated Subqueries 16:39
  • More on Correlated Subqueries 8:53
  • A Select Without a From? 3:28
  • Exercise Overview 0:45
  • From-less Selects
  • Exercise Solution 1:19
Chương 10 Selecting Distinct Records
  • Selecting Distinct Values 4:14
  • Exercise Overview 0:29
  • Some Practice with Distinct
  • A Distinct Solution 0:40
Chương 11 Utility Operators, Keywords, and Functions
  • The Greatest Value in a List 3:20
  • And the Least Value in a List! 2:01
  • The Case Keyword 4:13
Chương 12 Local PostgreSQL Installation
  • PostgreSQL Installation on macOS 5:47
  • PgAdmin Setup on macOS 4:56
  • Postgres installation on Windows 3:55
Chương 13 PostgreSQL Complex Datatypes
  • What'd We Just Do? 4:02
  • Data Types 4:09
  • Fast Rules on Numeric Data Types 2:01
  • More on Number Data Types 9:19
  • Reminder on Character Types 4:42
  • Boolean Data Types 2:28
  • Times, Dates, and Timestamps 5:30
  • Really Awesome Intervals 5:44
Chương 14 Database-Side Validation and Constraints
  • Thinking About Validation 4:12
  • Creating and Viewing Tables in PGAdmin 7:19
  • Applying a Null Constraint 6:24
  • Solving a Gotcha with Null Constraints 4:09
  • Creating NULL Constraints
  • Default Column Values 3:13
  • Applying a Unique Constraint to One column 5:35
  • Multi-Column Uniqueness 3:40
  • Is It Unique?
  • Adding a Validation Check 3:58
  • Checks Over Multiple Columns 5:04
  • Does It Pass a Check?
  • So Where Are We Applying Validation? 5:46
Chương 15 Database Structure Design Patterns
  • Approaching More Complicated Designs 3:13
  • Using a SQL Design Tool 6:06
  • A Config-based Schema Designer 7:02
  • Here's the Plan 2:15
  • Rebuilding Some Schema 6:54
Chương 16 How to Build a 'Like' System
  • Requirements of a Like System 4:35
  • How Not to Design a Like System 2:58
  • Designing a Like System 5:04
  • Building a Similar System
  • Making a Reaction System Instead 1:34
  • Polymorphic Associations 5:58
  • Polymorphic Association Alternative Implementation 6:56
  • The Simplest Alternative 3:39
  • Polymorphic Associations
  • So Which Approach? 4:21
Chương 17 How to Build a 'Mention' System
  • Additional Features Around Posts 6:10
  • Adding Captions and Locations 1:39
  • Photo Mentions vs Caption Mentions 7:27
  • Considerations on Photo Tags vs Caption Tags 7:08
  • Update For Tags 5:01
Chương 18 How to Build a 'Hashtag' System
  • Designing a Hashtag System 7:33
  • Tables for Hashtags 3:36
  • Including the Hashtag Table 4:06
  • A Few More User Columns 6:01
  • Why No Number of Followers or Posts? 3:44
Chương 19 How to Design a 'Follower' System
  • Designing a Follower System 5:50
Chương 20 Implementing Database Design Patterns
  • Back to Postgres 1:45
  • Creating Tables with Checks 13:00
  • Posts Creation 8:31
  • Comments Creation 2:16
  • Likes Creation 6:52
  • Photo Tags and Caption Tags 5:28
  • Creating Hashtags, Hashtag Posts, and Followers 6:27
Chương 21 Approaching and Writing Complex Queries
  • Quick Note About Adding Some Data
  • Adding Some Data 4:06
  • Restoring from Scratch 4:24
  • Highest User ID's Exercise 1:41
  • Solution for User ID's 1:09
  • Posts by a Particular User 1:05
  • Solving for Posts by User 1:56
  • Likes Per User 0:50
  • Solution for Likes Per User 1:41
Chương 22 Understanding the Internals of PostgreSQL
  • Thinking About Performance 2:02
  • Where Does Postgres Store Data? 5:51
  • Heaps, Blocks, and Tuples 3:36
  • Terminology Check
  • Block Data Layout 4:20
  • Heap File Layout 31:52
Chương 23 A Look at Indexes for Performance
  • Full Table Scans 4:08
  • What's an Index 2:23
  • How an Index Works 7:58
  • Creating an Index 3:58
  • Benchmarking Queries 5:27
  • Downsides of Indexes 5:09
  • Index Types 1:35
  • Automatically Generated Indexes 3:37
  • Using Automatically Created Indexes
  • Behind the Scenes of Indexes 31:55
Chương 24 Basic Query Tuning
  • The Query Processing Pipeline 4:57
  • Explain and Explain Analyze 5:25
  • Explain Vs Explain Analyze
  • Solving an Explain Mystery 8:58
Chương 25 Advanced Query Tuning
  • Developing an Intuitive Understanding of Cost 11:57
  • Calculating Cost by Hand 6:20
  • A Touch More on Costs 7:17
  • Calculating Costs
  • Startup vs Total Costs 5:34
  • Costs Flow Up 1:48
  • Use My Index! 7:55
Chương 26 Simple Common Table Expressions
  • Common Table Expressions 1:52
  • A Quick Solution 3:52
  • So What's a CTE? 3:49
Chương 27 Recursive Common Table Expressions
  • Recursive CTE's 3:18
  • Recursive CTE's Step by Step 10:21
  • Why Use Recursive CTE's? 4:33
  • Writing the Query 8:02
  • Walking Through Recursion 9:47
Chương 28 Simplifying Queries with Views
  • Most Popular Users 6:16
  • A Possible Solution for Merging Tables 3:51
  • Creating a View 5:36
  • When to Use a View? 3:19
  • Deleting and Changing Views 2:26
Chương 29 Optimizing Queries with Materialized Views
  • Materialized Views 2:18
  • Grouping by Week 4:08
  • Reminder on Left Joins 4:29
  • Writing a Slow Query 9:18
  • Creating and Refreshing Materialized Views 6:37
  • Views vs Materialized Views
Chương 30 Handling Concurrency and Reversibility with Transactions
  • What are Transactions Used For? 4:03
  • Some Sample Data 1:59
  • Opening and Closing Transactions 9:44
  • Transaction Cleanup on Crash 4:03
  • Closing Aborted Transactions 1:45
Chương 31 Managing Database Design with Schema Migrations
  • A Story on Migrations 17:13
  • Migration Files 5:00
  • Issues Solved by Migrations 2:51
  • A Few Notes on Migrations Libraries 4:38
  • A Note About Node Installation
  • Project Creation 2:52
  • Generating and Writing Migrations 7:11
  • Applying and Reverting Migrations 7:15
  • Generating and Applying a Second Migration 3:37
Chương 32 Schema vs Data Migrations
  • Schema vs Data Migrations 4:08
  • Dangers Around Data Migrations 9:06
  • Properly Running Data and Schema Migrations 5:28
  • Creating a Posts Table 4:39
  • A Small Web Server 14:52
  • Web Server Setup Instructions
  • Adding the Loc Column 4:10
  • Writing Values to Both Columns 4:12
  • Transaction Locks 13:39
  • Updating Values 4:19
  • Migrations Setup Instructions
  • Updating the App Server 4:13
  • Dropping the Last Columns 3:01
Chương 33 Accessing PostgreSQL From API's
  • Section Goal 0:52
  • Starter Project Files
  • One Fast Migration 5:01
  • Building the Users Router 4:53
  • Understanding Connection Pools 6:31
  • Validating Connection Credentials 6:56
  • Query and Close 1:57
Chương 34 Data Access Pattern - Repositories
  • The Repository Pattern 3:38
  • Creating a Repository 8:20
  • Accessing the API 3:51
  • Casing Issues 4:21
  • Fixing Casing 6:33
  • Finding Particular Users 5:26
Chương 35 Security Around PostgreSQL
  • SQL Injection Exploits 6:40
  • Handling SQL Injection with Prepared Statements 7:48
  • Preventing SQL Injection 7:32
  • Reminder on Post Requests 2:51
  • Inserting Users 4:13
  • Handling Updates 4:36
  • And, Finally, Delete 4:05
Chương 36 Fast Parallel Testing
  • A Note on Testing 2:47
  • Assertions Around User Count 7:04
  • Connecting to a DB For Tests 5:01
  • Disconnecting After Tests 2:45
  • Multi-DB Setup 4:40
  • Assumptions Around Content 4:44
  • Issues with Parallel Tests 4:48
  • Isolation with Schemas 4:09
  • Creating and Accessing Schemas 5:21
  • Controlling Schema Access with Search Paths 5:47
  • Routing Schema Access 4:02
  • Strategy for Isolation 4:42
  • Programmatic Schema Creation 11:44
  • Escaping Identifiers 4:20
  • Test Helpers 5:18
  • Cleaning up Schemas and Roles 5:56
  • Finally... Parallel Tests! (Final Lecture) 3:32
Chương 37 Bonus!
  • Bonus!

Requirment

  • A Mac, PC, or Linux-based Computer

Outcomes

  • Master the fundamentals of relational databases

  • Acquire the skills necessary to obtain a database administrator (DBA) or database developer job

  • Design fast and efficient databases using the latest technologies

  • Practice your skills with many quizzes, projects, and built-in exercises

  • Learn and apply multiple database design patterns

  • Optimize queries for superb read and write efficiency

  • Understand how PostgreSQL stores information at the hardware level

  • Connect PostgreSQL to front-end apps using an API

  • Build common app features, such as a 'like' and 'mention' systems

  • Handle complex concurrency issues and race conditions

  • Advance your database designs using schema migrations

  • See how to use PostgreSQL to speed up automated tests

Instructor

...
Stephen Grider

0.0

  • ... 0 Student
  • ... 7 Courses
  • ... 0 review

View Details

Reviews

Rate this course :

Remove all
Một sản phẩm của Công ty Cổ phần Thương mại Vạn Tín Việt·vantinviet.com