Skip to main content
HomeSQLCreating PostgreSQL Databases

Creating PostgreSQL Databases

Learn how to create a PostgreSQL database and explore the structure, data types, and how to normalize databases.

Start Course for Free
4 Hours16 Videos51 Exercises
11,858 LearnersTrophyStatement of Accomplishment

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
GroupTraining 2 or more people?Try DataCamp For Business

Loved by learners at thousands of companies

Course Description

Learn How the PostgreSQL Create Database Function Works

Have you ever wanted to create and manage your own databases but thought such knowledge is reserved for database administrators? This course teaches you the skills and knowledge necessary create your databases and effectively manage them yourself. You'll cover the structure of PostgreSQL databases, PostgreSQL datatypes, and the normalization of databases to remove data duplication, increase data consistency and improve data organization.

Discover the Structure of PostgreSQL Databases and Learn PostgreSQL Data Types

You’ll start this course by exploring the fundamentals of creating a Postgres database by covering databases, tables, and schemas, understanding how each fits into the PostgreSQL object hierarchy. Next, you’ll look at PostgreSQL data types, including text, numeric, temporal, and boolean data. You’ll also learn the appropriate times to use each data type. As you progress, you’ll learn about database normalization, understanding how it maintains the integrity of your data and reduces duplication. Finally, you’ll cover PostgreSQL access control and how you can protect your databases from unauthorized access.

Create Your Own Database Using PSQL

As you master the skills to create a PostgreSQL database, you’ll work with real data from the U.S. Small Business Administration (SBA) to guide you through the lessons and provide context for the concepts covered in the course. By the time you've completed this PostgreSQL training, you’ll be able to confidently create your own databases using PostgreSQL. "
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    Structure of PostgreSQL Databases


    In this chapter, you will be introduced to the fundamental objects in a PostgreSQL database: the database, tables, and schemas. After completing this chapter, you will know how to issue commands to create all three types of objects, and understand how each fits into the hierarchy of PostgreSQL objects.

    Play Chapter Now
    Creating a database
    50 xp
    New database creation
    50 xp
    Motivation for a new database
    50 xp
    Creating tables
    50 xp
    Name that table
    100 xp
    Two tables and a foreign key connection
    100 xp
    Creating schemas
    50 xp
    User-level schemas
    100 xp
    The public schema
    100 xp
    Creating tables in existing schemas
    100 xp
  2. 3

    Database Normalization

    In this chapter, database normalization is introduced. Database normalization maintains data integrity and reduces data duplication. 1st, 2nd, and 3rd Normal Form are defined as steps in the process of normalizing a database. Examples to clarify concepts are provided throughout the chapter.

    Play Chapter Now
  3. 4

    Access Control in PostgreSQL

    In this chapter, the topic of access control in PostgreSQL is introduced. Access control is presented as granting and revoking privileges to users and groups on database objects. Using these tools, a database and its objects can be protected from unauthorized access, helping to ensure the integrity of the stored data.

    Play Chapter Now

In the following tracks

SQL for Database Administrators


Collaborator's avatar
Maggie Matsui
Collaborator's avatar
David Venturi


Intermediate SQL
Darryl Reeves Ph.D HeadshotDarryl Reeves Ph.D

Industry Assistant Professor, NYU Tandon School of Engineering

Darryl is a computational scientist with expertise in utilizing data-driven approaches to solve complex problems in both academic and business settings. He worked for a number of years in a variety of technical roles including software development and technology-based client services mostly within start-up organizations in the finance and online advertising industries. He has a love for technology and education and enjoys solving interesting problems across diverse domains.
See More

What do other learners have to say?


Join over 13 million learners and start Creating PostgreSQL Databases today!

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.