https://github.com/anthonydb/postgresql-intro-nicar-2019
Materials for the PostgreSQL hands-on class at NICAR 2019 in Newport Beach, Calif.
https://github.com/anthonydb/postgresql-intro-nicar-2019
Last synced: 12 months ago
JSON representation
Materials for the PostgreSQL hands-on class at NICAR 2019 in Newport Beach, Calif.
- Host: GitHub
- URL: https://github.com/anthonydb/postgresql-intro-nicar-2019
- Owner: anthonydb
- Created: 2019-03-03T20:07:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-03T21:58:21.000Z (over 7 years ago)
- Last Synced: 2025-02-21T12:47:10.880Z (over 1 year ago)
- Language: SQLPL
- Homepage:
- Size: 71.4 MB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostgreSQL Hands-On · NICAR 2019 Newport Beach, Calif.
## Description
This session will introduce you to PostgreSQL, a free, open source relational database system similar to MySQL and Microsoft SQL Server. We’ll cover the PostgreSQL ecosystem, from the database itself to management tools such as pgAdmin and psql. We’ll also dig into some of PostgreSQL’s unique and super-handy features, including the PostGIS spatial database extension, full-text search, and statistical functions.
This repo includes data, sample queries, and a [PDF of slides](https://github.com/anthonydb/postgresql-intro-nicar-2019/blob/master/NICAR-2019-PostgreSQL.pdf). The material is drawn from the more advanced chapters of this author's book [Practical SQL](https://www.nostarch.com/practicalsql). You can find all the code examples and data for the book [here](https://github.com/anthonydb/practical-sql).
## Topics
* A few basic queries
* Creating a function
* Spatial queries with PostGIS
* Full-text search
* Statistical functions
## Setup
If you're trying this at home, here's how to get rolling (you will need to have PostgreSQL installed, along with the PostGIS extension).
* Download this repo to your computer.
* To create tables and load data, execute the queries in the file [pg_create_import.sql](https://github.com/anthonydb/postgresql-intro-nicar-2019/blob/master/pg_create_import.sql) using pgAdmin, the psql command-line tool, or another GUI. Note that you will need to load a Census shapefile using a command-line utility noted at the end of the file.
* You can then run the queries in [pg_demo_queries.sql](https://github.com/anthonydb/postgresql-intro-nicar-2019/blob/master/pg_demo_queries.sql)