
Learn how Postgres uses tables to organize data into rows and columns, enforce data types, and distinguish records with a unique id, plus common createdat and updatedat timestamps for auditing.
Explore how to structure data in Postgres using key data types like varchar, integer, decimal, text, date, time, and time stamp, with a practical pet example and table design insights.
Create an appointments table alongside the pets table, with fields for id, pet name, visit date and time, doctor's note, charges, and createdat and updatedat.
The insert statements are too large to put here so I've added them to the following lecture as an article.
Explore how entity relationship diagrams help read and plan database structures, showing table columns, primary and foreign keys, and one-to-one, one-to-many, and many-to-many relationships, with practical pet system examples.
Implement a relational database design by creating the Leaf Land database, building category and product tables, and wiring a foreign key from product.category_id to category.id.
Here's the DB setup file: https://raw.githubusercontent.com/troyamelotte/practical-postgres/main/leaflanddb.sql
Here's the link to the data file for this exercise: https://raw.githubusercontent.com/troyamelotte/practical-postgres/main/leafland_entries.sql
Apply inner joins and table aliasing to pull user names with reviews and ratings, join categories, products, orders, and addresses, and filter by price to identify shipped items.
Data for the execercises: https://raw.githubusercontent.com/troyamelotte/practical-postgres/main/more_orders.sql
Walks through building a user insights query in Postgres: compute total spend per user via joins and sums, then identify each user's favorite category with a cte and nested select.
Update the shipping tracking table by using a select query to filter orders created after 2024-07-01, then set status to pending within a transaction.
Here's the SQL for this lecture: https://raw.githubusercontent.com/troyamelotte/practical-postgres/main/monthly_rev.sql
This exercise fixes two issues: automatically syncing the product table's total stock and correcting updated columns, starting with the updated app solution for the product table and then stock solution.
Unlock the power of PostgreSQL with a course designed by a seasoned CTO for real-world application. Skip the fluff and dive straight into the heart of what matters in day-to-day database operations.
Why This Course?
Curated content based on 15+ years of industry experience
Focus on practical skills used daily in professional settings
Efficient learning path, eliminating unnecessary complexities
What You'll Learn:
Robust Query Writing: Master the art of crafting efficient and powerful SQL queries
Essential PostgreSQL Features: Explore views, triggers, and functions
Data Manipulation: Become proficient in update, insert, and delete operations
Database Architecture: Understand schemas and effective database design
Whether you're a beginner starting from scratch or a professional looking to sharpen your skills, this course will elevate your PostgreSQL proficiency to new heights. Join us to gain practical knowledge that you can implement immediately.
Transform your database skills and boost your career prospects with this laser-focused, industry-driven PostgreSQL course!
Learn from real-world scenarios and hands-on exercises that simulate actual workplace challenges. Gain confidence in your ability to handle complex database tasks efficiently. By the end of this course, you'll possess the skills that top companies seek in their database professionals, setting you apart in the competitive tech landscape.