Skip to content

Notes from following the curious moon postgres textbook

Notifications You must be signed in to change notification settings

vykuang/curious-moon-exercise

Repository files navigation

My notes about: A Curious Moon by Rob Conery

A Curious Moon by Rob Conery.

cover


  1. build the Docker images docker compose build
    • or docker-compose build db to build the database image alone
  2. docker-compose up -d to download the Docker images and start the containers
  3. download the RAW cassini data from Redfour
  4. store the files under ./curious/data
  5. docker exec -it curious_db bash to open a Bash on the Postgres container
  6. cd /home/curious to browse the mounted directory with the make file and raw CSV data
  7. make import_master_plan to import the master plan data into the enceladus database
  8. localhost:5050 to open a pgAdmin window on the Docker host machine (your local machine)
  9. login with [email protected] and 123456 to login to the pgAdmin
  10. create a server connection to the Postgres server using curious_db:5432 and [email protected] with mysecretpassword to browse the enceladus database

Get the Cassini RAW data

Download the raw data from https://archive.redfour.io/. To begin with I am only interested in the master_plan.csv file. The other files cda.csv, inms.csv, jpl_flybys.csv, and chem_data.csv will also be necessary later.

Use PGAdmin to connect to the database

The docker-compose.yaml file contains a pgAdmin container additionally.

Open the browser on your host machine (your local machine) and visit http://localhost:5050. Use the email [email protected] with the password 123456 to login to pgAdmin

Make a new server connection curious_db with port 5432 and username postgres and password mysecretpassword.

Name the connection Curious-Moon-Enceladus.

Create a Database using PSQL

Open a Bash on the Docker container.

psql -U postgres to open the Postgres shell (PSQL) for the user postgres to type SQL commands directly.

E.g. create database enceladus; to create a database if it is not there yet (e.g. if it was dropped before)

Type \q to exit Postgres shell (PSQL).

Cosmic dust analyzer (CDA)

cda

Ion and Neutral Mass Spectrometer (INMS)

inms

About

Notes from following the curious moon postgres textbook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages