Databases (DBs) and SQL with PostgreSQL
-
DB Theory
-
Why use DBs?
-
DB Organization: Data Abstraction
-
Relational DB Concepts and Vocabulary
-
Normalization and Normal Forms
Exercise I
-
Entity Relationship (ER) Model
-
ER Model Reference
-
Mapping Cardinality
-
DB Construction and Design
Exercise II
-
SQL as Relational Language
-
Relational Algebra vs. Relational Calculus
-
Getting Started with PostgreSQL
-
Documentation
-
DB Server Client Architecture
-
PostgreSQL Installation
-
The PostgreSQL Client: psql
Exercise I
-
Creating DBs
-
Destroying DBs: DROP
Exercise II
-
Accessing DBs: Users and Groups
-
Privileges (Permissions):
GRANT and REVOKE
Exercise III
-
The SQL Language
-
SQL Basics
-
Creating a New Table: CREATE
-
Modifying a Table: ALTER TABLE
-
Data Types
Exercise I
-
INSERT Data
-
Querying a Table: Basic SELECT
Exercise II + III
-
Data Deletions: DELETE
-
Modifying Data: UPDATE
Exercise IV
-
SELECT with WHERE and Operators:
Boolean, BETWEEN, IN, LIKE, IS NULL
Exercise V
-
PostgreSQL Parameters:
SET, SHOW, and RESET
-
Aliases: AS
-
Select Distinct Rows
-
Select ORDER BY
-
LIMIT and OFFSET
Exercise VI
-
Build-In Functions and Operators
-
Aggregate Functions
-
GROUP BY and HAVING
Exercise VII
----------- End of SQL Part 1 ----------
-
Constraints: NOT NULL, UNIQUE, CHECK
-
Keys
Exercise VIII
-
Joins Between Tables
Exercise IX
-
Combining Queries:
Union, INTERSECT, EXCEPT
-
Sub-Queries, Nested Queries
-
Inserting and Creating Tables
Using INSERT/SELECT INTO
Exercise X
-
Import and Export Data: COPY
-
Backup and Restore
Exercise XI
-
Large Objects (BLOBs)
-
Regular Expressions
-
Views
-
Inheritance
-
Indexes
-
Rules
-
LISTEN and NOTIFY
Exercise XII
-
Sequences
-
Cursors
Exercise XIII
-
CASE Clause
-
Stored Procedures (Server-Side Functions)
-
Custom Aggregate Functions
-
Trigger
Exercise XIV
Solution
-
Script Files
Exercise XV
-
Transactions, Isolation and Locks
Exercise XVI
-
Advanced Topics
-
Tools: pgaccess
-
Performance
-
Use Explain to Debug Query Performance
-
Programming Interfaces to SQL:
C++ (LIBPQ++), Perl, PHP