Git Product home page Git Product logo

pagila-hw's Introduction

pagila-hw

tests

Background

Pagila is a standard example database for postgresql. The database implements a simple movie rental system like the company Blockbuster might have maintained (before Netflix killed them). The following picture illustrates the database's structure:

Tasks

  1. Fork this repo and clone it on the lambda server.

    Notice that this repo uses git submodules. These are a tool that allow us to work with very complicated projects by including git repos within other git repos, and here we use submodules to include the original pagila repo. In order to clone the repo with the submodules, you need to run the commands

    $ git clone https://github.com/mikeizbicki/pagila-hw
    $ cd pagila-hw
    $ git submodule init
    $ git submodule update
    
  2. Modify the README.md file so that the test case image points to your forked repo.

  3. Solve the each of the problems in the sql folder.

    1. The folder contains one file for each problem. At the top of each file is a description of what the file is supposed to compute. For each file, write a single SELECT statement that computes the correct answer.

    2. The folder expected contains the expected outputs for each problem. You can verify your answer by checking that the output of your SELECT statement matches the output in the answers folder.

    3. The script check_answers.sh will perform these checks for you automatically using the diff command. It must be run from within a postgres docker container.

      Bring up the docker container with the command

      $ docker-compose up -d --build
      

      Then run the the test case script with

      $ docker-compose exec pg ./check_answers.sh
      
    4. Grading: If all test cases pass, you will receive full credit. For the first failing test case, you will receive -4 points. For each additional failing test case, you will receive -1 point.

  4. Upload a link to your forked github repo on sakai.

pagila-hw's People

Contributors

mikeizbicki avatar livrenfro avatar

Watchers

 avatar

Forkers

mariagerges

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.