IntermediateLesson 3 of 1430 min · hands-on
Creating Databases and Tables
Part of the PostgreSQL course
So far you have only looked around a server someone else set up. That is fine for learning the tools, but it does not get you anywhere on a real project: you need a place of your own to put data, and before you can put a single row anywhere, Postgres needs to know the shape of that data in advance. Which columns exist. What type each one holds. Whether a column is allowed to be left empty.
Connect as postgres and create a database to experiment in ...
Want to learn PostgreSQL Creating Databases and Tables in a real environment?
Click below, get a fresh Linux box with PostgreSQL ready to go, and work through Creating Databases and Tables hands-on with an AI tutor that knows your code.
Start this lessonCreating Databases and TablesWhat you'll learn
- CREATE DATABASE
- CREATE TABLE
- PRIMARY KEY
- NOT NULL
- DEFAULT
- DROP TABLE
- \d to inspect
Read this lesson in your language
All lessons in this course
14 lessons- 1What is PostgreSQL20 min
- 2psql and First Commands25 min
- 3Creating Databases and Tables30 min
- 4Data Types25 min
- 5SELECT and WHERE30 min
- 6Joins35 min
- 7Aggregates and Grouping30 min
- 8Indexes35 min
- 9Transactions and Isolation35 min
- 10Functions and Triggers35 min
- 11JSONB and Arrays35 min
- 12EXPLAIN and Query Tuning35 min
- 13Backup and Restore25 min
- 14Capstone: Design a Schema60 min
Explore other courses
Claude from Zero to Mastery
47 lessons · 8.4h
Vibe Coding: Fundamentals
12 lessons · 4.5h
Prompt Engineering
11 lessons · 6.2h
Python
19 lessons · 9.3h
Git
13 lessons · 5.9h
Docker
13 lessons · 6.6h
Kubernetes
14 lessons · 8h
TypeScript
18 lessons · 7.7h
Go
20 lessons · 12.3h
React
17 lessons · 10.2h
Linux
17 lessons · 8.5h
Ansible
12 lessons · 6.1h
Bash
12 lessons · 5.7h
Helm
10 lessons · 5.4h
GitLab CI
11 lessons · 5.8h
Jenkins
11 lessons · 5.3h
MySQL
13 lessons · 6.8h
Web
14 lessons · 5.9h
Vibe Coding
12 lessons · 5.8h
Vibe Coding: Prototype to Production
12 lessons · 5.5h
Vibe Coding: Multi-Agent Engineering
12 lessons · 5.3h
Vibe Coding: Advanced Engineering
12 lessons · 7.3h
