A schema has been provided with the following structure:
-
authors
- id
- name TEXT
- nationality TEXT
- birth_year INTEGER
-
books
- id
- title TEXT
- publication_date INTEGER
- author_id INTEGER (Foreign key)
Load the schema into your DB:
$ psql -d library < schema.sqlLoad the given seed file into your db. Take a look at it, and note how authors and books are related.
$ psql -d library < seed.sqlThere are two exercise sets:
- Basic Queries - SELECT
- Advanced Queries - JOINS