Skip to content

An Introduction to Relational Database Management Systems

Notifications You must be signed in to change notification settings

mike-matera/intro-to-rdbms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Mike Matera
Nov 1, 2024
58e552d · Nov 1, 2024

History

43 Commits
Nov 1, 2024
Nov 1, 2024
Dec 15, 2019
Apr 27, 2021
Jun 14, 2021
Dec 19, 2019
Jun 14, 2021
Nov 1, 2024
Jan 28, 2021
Dec 18, 2019
Apr 22, 2020
Dec 27, 2019
Dec 27, 2019
Nov 1, 2024
Apr 22, 2020

Repository files navigation

Introduction to Relational Database Management Systems

Learn the fundamentals of SQL and the Relational Model. These pages and Jupyter notebooks support my CIS-54 class at Cabrillo College. The notebooks are generated from source and are a way to give students practice writing queries.

Using the Notebooks

The notebooks require installed modules. This section will show you how to get the notebooks running on your desktop. Before you begin you will need to have the following software installed:

  • Python >= 3.6 (with pip and venv)
  • Bash, zsh or a compatible shell
  • Git

Installing Python and Git will vary based on your OS. Linux, Mac and Windows are all supported. Bash or zsh are installed by default on Mac and Linux. On Windows you can get get Ubuntu from the Microsoft Store.

Clone the repository:

git clone https://github.com/mike-matera/intro-to-rdbms.git 

Create a virtual environment inside of the project directory:

cd intro-to-rdbms
python3 -m venv venv 

Activate the virtual environment:

. ./venv/bin/activate

Packages used by the notebooks are listed in requirements.txt. Update pip to the latest version then use pip to install the requirements:

pip install --upgrade pip
pip install -r requirements.txt

Building the Notebooks

The notebooks are generated by the tool in tools/gen_questions.py. The notebooks are generated from Python source that contains markdown for a question and the correct answer. The answer is used to generate a preview inside the notebook that shows what the correct answer should look like. The preview is an important prompt to help students know they have the right answer.

The notebooks are not checked into Git. They are generated using the makefile in the root of this project:

make 

Viewing the Notebooks

Run Jupyter:

jupyter lab welcome.ipynb

Jupyter tries to open a new browser tab. If a browser doesn't appear after starting Jupyter open a tab manually and visit the URLs that are shown in Jupyter's output.

Hosting

I use AWS Cloud9 in my course. Cloud9 is web based and users access the Jupyter server from the same browser that's connected to the Cloud9 instance. Cloud9 gives the class a uniform and predictable way to access their code and they never have to worry about losing files, but it costs money. I use t2.micro instances with 8GB of storage (which is the default for Cloud9). The cost of an instance is:

  • Runtime: $0.0116 per Hour (prices)
  • Storage: $0.10 per GB-month of provisioned storage (prices)

A student that uses the desktop for 10 hours a week (or 40 hours a month) will cost about $1.26 per month. Cloud9 stops the VM when a user is not connected. It's possible to disable that behavior and if a student does, the cost (based on 720 hours) will be about $9.15 per month. I get credit through AWS Educate that covers the cost of my classes.

There are other Jupyter hosting solutions that I have not tried.

Contributing

This project is under active development. Please contact me if you want to collaborate.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

About

An Introduction to Relational Database Management Systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published