We may earn an affiliate commission when you visit our partners.
Course image
Miguel Alho

PostgreSQL is an awesome open source relational database, that's fast and easy to use. We've used it here at my company in a few large projects with great performance.

In this beginner level PostgreSQL tutorial course I'll be going over all the basic concepts of relational databases and dive into how to use PostgreSQL. No previous database experience is required for this PostgreSQL tutorial course - all the basic concepts like tables and relations are covered. It's thorough and meant to help anyone starting out with databases.

Read more

PostgreSQL is an awesome open source relational database, that's fast and easy to use. We've used it here at my company in a few large projects with great performance.

In this beginner level PostgreSQL tutorial course I'll be going over all the basic concepts of relational databases and dive into how to use PostgreSQL. No previous database experience is required for this PostgreSQL tutorial course - all the basic concepts like tables and relations are covered. It's thorough and meant to help anyone starting out with databases.

The PostgreSQL tutorial course covers database concepts, database installation and connection, client software used to connect to and manage the database (pgAdminIII) and also the main SQL statements and how they work with PostgreSQL.

This PostgreSQL tutorial course is currently under construction, with close to 5 hours of material already available. Considering that, I'll be offering it at a discounted price. Once finished, it will be priced at $99.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • Understand why databases are useful
  • Understand how relational databases work
  • Learn how to install and setup postgresql
  • Learn how to create databases and database structures
  • Learn how to insert and manipulate data in a postgresql database
  • Learn how to write sql statements for postgresql

Syllabus

Introduction

In this video i talk about this course and how it is structures. The course is divided in to 3 modules -

  • An introduction to databases and PostgreSQL
  • How to create and manipulate databases
  • SQL Primer in PostgreSQL
Read more

In this video, we'll talk about why we need databases and take a look at basic basic concepts:

  • Tables
  • Columns
  • Rows
  • Fields

In this video we'll look at Identity columns in our database tables, and how we'll use them to uniquely identify each record in a table.

Normalization is a process in database construction. We use it to extract repeated information in our databases' tables, which avoids maitenance errors. A well normalized database is usually better organized and more maintainable. This will also set the bases for relationships in our database.

In this video, we look at what relationships between tables are and why they are important in a database.

Just a quick check up quiz

In this video we'll have a look at the 3 main types of relationships we can create between tables in a relational database:

  • one to one
  • one to many
  • many to many

Quick quiz to see if you've this one down!

In this video, I present a quick overview of database management systems and a high level view of how they work.

In this video i give a quick review of PostgreSQL features and some of the limits associated with it.

Learn step-by-step how to install PostgreSQL on a Windows machine

Database Usage Basics

In sthis video, we'll start pgAdmin III - the client application we'll use to connect to, manage and manipulate our databases, and connect to our local database server, that we installed in the previous step.

When you open pgAdminIII for the first time, it should have you're local server in the servers list. In this video, I'll show you how to register a server in the list, in case your local server is not available or if you wish to connect to a remote server.

By default, the server installation won't allow you to connect to the databases from external computers - only the local machine is allowed.

To allow other computers to connect, you need to edit the pg_hba.conf, and open a firewall port. This video shows you how.

Note:

Around minute 4, I mention the CIDR notation. For more details and a cheat sheet for CIDR netmask notation, check out: http://www.oav.net/mirrors/cidr.html

In this vídeo, I'll show you how to create a database through pgAdmin III. The process only requires you give your new database a name, but there are other options that are available and usefull, and I analyse them in this video.

In this video we'll look at how tables are created in pgAdmin III and the options available for the table.

In this video, I show you how to add, edit and delete records in a table, and also how to use the table's ordering and filtering options, within pgAdmin III.

PostgreSQL suports multiple data types for its columns and choosing the right datatype for each column is importante, both for correct data representation and database optimization. This lesson is just a short video to set the stage for the next few clips.

Postgres offers a series of datatypes to eficiently store numbers in diferent  formats and ranges. In this video I review the numeric types and show some examples of how rounding decimal numbers works, and some errors that may occur.

Here We talk about how the serial and bigserial types work in creating record IDs in our tables.

In Postgres, 3 datatypes are available to store character-based information: char(n), varchar(n) and text. In this video I go over their diferences.

There are a few datatypes we can use for date and time information. In this video we look at the date type

We can use the time type to store time information, without dates. This video shows how to write the times into a tables field and some variations of the notation

Uou can combine date and time in the same field using the timestamp datatype. It also allows the storage of timezone data, essential to any aplication that crosses timezones.

The boolean datatype allows us to store eaither a true or false value. It is very comun to use it to store data that answers true/false or yes/no questions.

The NULL value allows us to meaningfully indicate that a certain field's data is unkown, and a better option to inserting fake or misleading default values.

The requirments gathering process is important in database construction since it allows for a better understanding of the problem that our databse will solve. In this video, we present requirements for our car repair shop database, to be used in the next few videos.

This PDF contains the set of slides used to define the requirements for our database. 

In this video, we go through the client part of requirements and design our database tables. We transform requirements into tables, columns and relationships.

In this second part, we design the tables to store data for our repair shop's interventions on vehicles. 

In this video we choose the datatypes for our columns, based on what they will contain.

This PDF contains the table definitions from the last set of videos. Use it to follow along the database creation in pgAdmin III

When creating tables, we need to start off with those that don't have any dependencies - that is, that have no foreign keys to other tables. Creating these first avoids any problems defining the foreign key constraints on the tables.

Constraints are rules we apply to our tables' columns in order to garantee that certain rules are followed when we enter data. Will take a look at the constraints Postgres allows in this video.

The next set of tables we create will have foreign keys so we need to create the table and while doing so, establish the relationship with the table that we will be referencing.

In this video, we finish creating the car repair shop database by building the remaining three tables.

We can create new users (called roles, within PG) to control how users access the database. There are a few steps you need to take in Postgres to correctly create new users. Ins this lesson, I cover those steps so that a new user can connect to a specific database and access it with the necessary privileges.

Database backups are very important in avoiding data loss due to system failures, harddrive failures and even human error. Postgres comes with a couple of aplications that allow us to backup a database (pg_dump) and restore a backup (pg_restore). We can access and manage the options through pgAdmin III. In this video I show you how to backup and restore a database.

SQL in PostgreSQL

This video is an overview of what will be covered in this third module.

In this video we look at the CREATE TABLE command, and use it to build a very simple version of the carBrand table. No constraints are aplied to the table - it is ment to understande the basic sintaxe and structure of the statement.

In this video, we will recreate the carBrand table, but we'll add the PRIMARY KEY constraint to the id column, and NOT NULL and UNIQUE constraints to the name column in the SQL statement.

We'll also create the client table, and add a default value to a column in that table.

In this video , we build the remaining two tables with no foreign keys in the RepairShop database.

I'll show you how to execute multiple statements in the same run, add check constraints, and also look at an anlternative notation for the column and constraint organization of the CREATE TABLE command.

You can use the SQL statements in this file to quickly execute the steps I take in the previous video.

In this table we look at creating tables with foreign key constraints and the notation variations associated to it.

In this video we create the rest of the tables that have foreign key references. I also introduce comments and selective execution of the script.

Scripts: Create Tables with Foreign keys

A couple of quiz style questions about the CREATE TABLE command

In thsi video we look at the DROP TABLE and DROP TABLE... CASCADE command and also how to save and recall queries in the query editor.

The ALTER TABLE command allows us to edit our data structure: we can create or drop new columns, alter datatpyes and constraints or even modify existing constraints.

In this video we create a blank table (partAdded) that is missing in our database, and create the missing columns using the ALTER TABLE command.

ERRATA:

I made a couple of mistakes in this clip. First, the third colum created in the video is "vehicle_id" but should have been "intervention_id" and reference the intervention table. Second, the check constraint on the cost column should have been ">=". The error are highlçighted in the video.

Script: Drop And Alter Table commands

The INSERT INTO SQL Command allows us to insert rows of data into our database tables. This video shows you how to build basic insert statements that insert one or more rows into the table.

Note: When I refer to quotation marks, I sometimes don't indicate if they are single or double. So, for table names or column names that have capital letters, you need to use double quotes, while for string values, you use single quotes.

You can use the SQL statements in this file to quickly execute the steps I take in the previous video.

The Update Statement

Includes The Insert statement to add clients to the table and the update statements used in the video

In this lesson, I talk about the DELETE FROM statement and show how to use it to delete specific rows or all the rows from a table.

Typicly, deleting data from a table only afects the data in that tabel. When dealing with tables that are references for foreign keys, you can't delete data without deleting all the dependant elements.

In this video, we see how to build delete statements to handle multiple tables with dependant data and how to use the ON DELETE CASCADE clause in foreign key constraints.

The file contains the script used in the delete from command videos.

The TRUNCATE command allows us to quickly delete all the rows in a table and CASCADE the deletes to related tables. We can also use a "Restart Identity" clause to reset the sequence that sets the primary key's value.

The script used in the previous TRUNCATE command video.

Before we procede to hte next set of videos, where we will be executing SELECT commands, It is important that we add data to the database. I've provided a script file that adds data, which you can download from the next lesson. In this video, I show you how to use the file to insert data into the database.

Before we procede to the next set of lessons, it is important to insert data into the database to be able to create meaningfull SELECT statements. Use the provided script file to add data to the database.

This video is the first in a series of clips whare we work on selecting data. We start by analysing the basic components of a query.

We have a look at the grafical query builder in pgAdmin that lets you create queries in a drag n' drop style of editing.

The WHERE clause in the select statement allows us to filter the data that the query returns, generating precise result sets. In this video we look at how we can create expressions in the where clause.

In this video we look at the BETWEEN and IN operatores and their use in WHERE clauses to filter data through ranges or sets of values.

We can't use the equal sign or not equal sign in our statements to compare with NULL since NULL represents no data. To use NULLs in a statement correctly We need to use the IS or IS NOT keywords. 

Pattern matching is an important form of filtiring, especially when working with strings. Being able to match a part of a string can become a simple yet powerful mechanism for search. In this video we look at the various forms of the LIKE operator in the WHERE clause.

We can build queries that have a WHERE clause, using the graphical query builder. In this video I show you how to compose those queires using diferent types of criterias.

This file contains the various SELECT statements used in the previous vídeos.

LIMIT and OFFSET allow us to create a paging mecanism in our queries - LIMIT limits the number of rows returned, while OFFSET allows us to skip rows from the beginning of the full set. In this video I'll show you some examples of how this is implemented in a SELECT statement.

A simple quiz related to Limits and Offsets

The ORDER BY clause allows us to order the results by a set of columns. Orderingcan be ascending (ASC) or descending (DESC), and some care must be taken when handling NULL values. In this video, I show some examples of how to use the ORDER BY clause in select statements.

This file has the SQL statements used in the Order by video, to help you follow allong and test the commands.

Aggregate functions are a powerful SQL mechanism that allows you to compute values on result sets from your select queries.

...

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Builds foundational skills that are highly relevant in an academic and industry setting
Develops beginner-level skills
Intermediate-level course that strengthens an existing foundation
Provides hands-on experience with exercises and interactive content
Appropriate for those new to relational database management systèmes
Course is not offered in a multi-modal format (text only)

Save this course

Save Beginner's Guide to PostgreSQL to your list so you can find it easily later:
Save

Reviews summary

Postgresql for beginners

According to students, PostgreSQL for Beginners is largely a positive experience, despite common complaints about the video content of the course.
Clear class structure.
Lectures could be more engaging.
"Not sure if it is just me or how the video is setup but it is like sitting in a classroom and trying to stay awake while the instructor is talking."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Beginner's Guide to PostgreSQL with these activities:
Review database fundamental concepts
Going over the fundamental concepts of databases will help you get a deeper understanding of PostgreSQL and how it works.
Browse courses on Database Concepts
Show steps
  • Review the basics of data modeling, data types, and database normalization
  • Understand the concept of relational databases and how tables and columns are used to store data
  • Learn about primary keys, foreign keys, and how they are used to establish relationships between tables
Create practice databases and tables
Creating your own databases and tables using PostgreSQL commands will help you solidify your understanding of the concepts and syntax.
Browse courses on Database Creation
Show steps
  • Create a database and a few tables with different data types and constraints
  • Insert, update, and delete data using SQL commands
  • Use queries to retrieve data from your tables
Discussion on PostgreSQL best practices
Discussing PostgreSQL best practices with peers will help you learn from others' experiences and improve your own database design and implementation.
Browse courses on Database Optimization
Show steps
  • Join a PostgreSQL discussion group or forum
  • Participate in discussions and ask questions about best practices
  • Share your own knowledge and experiences with others
One other activity
Expand to see all activities and additional details
Show all four activities
Create a small PostgreSQL project
Creating a small PostgreSQL project will allow you to apply your knowledge and skills to solve a real-world problem.
Browse courses on Database Applications
Show steps
  • Come up with an idea for a small project that you can build using PostgreSQL
  • Design the database schema and create the necessary tables and columns
  • Write the SQL queries and stored procedures to implement the functionality of your project
  • Test your project and make sure it works as expected
  • Deploy your project to a web server or other hosting platform

Career center

Learners who complete Beginner's Guide to PostgreSQL will develop knowledge and skills that may be useful to these careers:
Database Administrator
Database Administrators are responsible for the installation, configuration, maintenance, and security of an organization's databases. They ensure that databases are running smoothly, that data is backed up regularly, and that security measures are in place to protect the data from unauthorized access. This course provides a solid foundation in database concepts, installation, and management, which are essential skills for Database Administrators. Additionally, the course covers SQL, the language used to interact with databases, which is a valuable skill for anyone working with data.
Data Scientist
Data Scientists are responsible for developing and implementing data-driven solutions to business problems. They use their skills in data analysis, machine learning, and artificial intelligence to build models that can predict future outcomes. This course provides a strong foundation in data science techniques, including data mining, machine learning, and artificial intelligence. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Database Developer
Database Developers are responsible for designing and developing database applications. They use their skills in database design, SQL, and programming to create database applications that meet the needs of users. This course provides a strong foundation in database development principles, including database design, SQL, and programming. Additionally, the course covers PostgreSQL, which is a popular open-source database.
Data Architect
Data Architects are responsible for designing and managing an organization's data architecture. They use their skills in data modeling, data integration, and data governance to ensure that data is available to users in a timely and accurate manner. This course provides a strong foundation in data architecture principles, including data modeling, data integration, and data governance. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Data Analyst
Data Analysts are responsible for collecting, cleaning, and analyzing data to identify trends and patterns. They use this information to make recommendations to businesses on how to improve their operations. This course provides a strong foundation in data analysis techniques, including data cleaning, data visualization, and statistical analysis. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Data Engineer
Data Engineers are responsible for designing, building, and maintaining data pipelines. They use their skills in data engineering, data integration, and data warehousing to ensure that data is available to users in a timely and accurate manner. This course provides a strong foundation in data engineering principles, including data modeling, data integration, and data warehousing. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Information Security Analyst
Information Security Analysts are responsible for protecting an organization's information systems from unauthorized access, use, disclosure, disruption, modification, or destruction. They use their skills in information security, risk management, and compliance to implement and maintain security measures that protect the organization's information assets. This course provides a strong foundation in information security principles, including risk management, compliance, and security controls. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Software Engineer
Software Engineers are responsible for designing, developing, and maintaining software applications. They use their skills in programming, software design, and testing to create software that meets the needs of users. This course provides a strong foundation in software engineering principles, including object-oriented programming, software design patterns, and software testing. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Computer Systems Analyst
Computer Systems Analysts are responsible for analyzing and designing computer systems. They use their skills in systems analysis, systems design, and programming to create computer systems that meet the needs of users. This course provides a strong foundation in computer systems analysis principles, including systems analysis, systems design, and programming. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Web Developer
Web Developers are responsible for designing, developing, and maintaining websites. They use their skills in HTML, CSS, JavaScript, and other web technologies to create websites that are user-friendly and informative. This course provides a strong foundation in web development principles, including HTML, CSS, JavaScript, and web design. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Quality Assurance Analyst
Quality Assurance Analysts are responsible for testing and evaluating software applications to ensure that they meet quality standards. They use their skills in software testing, test management, and quality assurance to identify and fix defects in software applications. This course provides a strong foundation in quality assurance principles, including software testing, test management, and quality assurance. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Business Analyst
Business Analysts are responsible for gathering and analyzing business requirements to develop solutions to business problems. They use their skills in business analysis, process improvement, and project management to help businesses improve their operations. This course provides a strong foundation in business analysis techniques, including requirements gathering, process mapping, and project management. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Technical Writer
Technical Writers are responsible for writing and editing technical documentation, such as user manuals, technical reports, and white papers. They use their skills in writing, editing, and technical communication to create documentation that is clear, concise, and informative. This course provides a strong foundation in technical writing principles, including writing, editing, and technical communication. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.
Project Manager
Project Managers are responsible for planning, executing, and closing projects. They use their skills in project management, risk management, and stakeholder management to ensure that projects are completed on time, within budget, and to the satisfaction of stakeholders. This course provides a strong foundation in project management principles, including project planning, risk management, and stakeholder management. Additionally, the course covers SQL, which is a valuable skill for anyone working with data.

Reading list

We've selected nine books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Beginner's Guide to PostgreSQL.
Provides a collection of classic papers on database systems, covering everything from basic concepts to advanced features. It valuable resource for anyone who wants to learn more about database systems or use them for their own projects.
Provides a comprehensive overview of database systems, covering everything from basic concepts to advanced features. It valuable resource for anyone who wants to learn more about database systems or use them for their own projects.
Provides a collection of recipes for solving common PostgreSQL administration problems. It valuable resource for anyone who wants to learn more about PostgreSQL or use it for their own projects.
Provides a comprehensive overview of PostgreSQL, covering everything from basic concepts to advanced features. It valuable resource for anyone who wants to learn more about PostgreSQL or use it for their own projects.
Provides a comprehensive overview of data on the web, covering everything from basic concepts to advanced features. It valuable resource for anyone who wants to learn more about data on the web or use it for their own projects.
Practical guide to PostgreSQL, covering everything from installation to administration. It great resource for anyone who wants to get started with PostgreSQL or learn more about its features.
Provides a comprehensive overview of SQL, covering everything from basic concepts to advanced features. It valuable resource for anyone who wants to learn more about SQL or use it for their own projects.
Provides a concise overview of SQL, covering everything from basic concepts to advanced features. It valuable resource for anyone who wants to learn more about SQL or use it for their own projects.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Beginner's Guide to PostgreSQL.
Relational Database Basics
Most relevant
Introduction to Relational Databases (RDBMS)
Most relevant
Querying Data from PostgreSQL
Most relevant
PostgreSQL: Index Tuning and Performance Optimization
Most relevant
Migrating from PostgreSQL to Amazon RDS
Most relevant
Vector Search with Relational Databases using PostgreSQL
Most relevant
Importing Data from Relational Databases in R 3
Most relevant
Getting Started with .NET Document Databases Using Marten...
Most relevant
Guided Project: Create & Load tables in PostgreSQL...
Most relevant
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser