Introduction to Structured Query Language (SQL)

Published

All levels 8 lessons Basic Computing Skills Course Video

Welcome to an introduction to Structured Query Language (SQL). This course will provide you with a solid foundation of knowledge on relational databases and how to write queries using SQL. The material provided consists mainly of webinar-style videos

Legacy learning resource image 4089

Overview

Welcome to an introduction to Structured Query Language (SQL). This course will provide you with a solid foundation of knowledge on relational databases and how to write queries using SQL. The material provided consists mainly of webinar-style videos as well as a link to additional reference material and working examples. We strongly encourage you to try and follow along with the on-screen examples as you go.   Webinars are presented by Dany Vohl and are based on material created by Amr H. Hassan.

Course lessons

Setting up your environment

Lesson 1

Getting your environment ready - SQL

ADACS-Training Docker Image

The container is based on�Ubuntu 16.04. It contains the following software modules:
  • MySQL Server + Employees Sample Database
  • git
  • OpenMPI
  • Anaconda2 (4.2.0)
  • Emacs
Docker�is a virtualization mechanism to package your application into a standardised unit. To install�Docker�on your machine follow these�instructions. More details about�Docker�can be found on�"Get started with Docker" To start an ADACS-Training container, write the following command in your terminal :
docker run -p 3306:3306 -p 8888:8888 -it caseresearch/adacs-training
This will download all the necessary software and start a new�Docker�for you. After this step, you have a fully functional�Docker�container with ports�3306�( for�MySQL) and port�8888�( for�ipython) exposed to your machine. A nice docker cheat sheet can be found�here.

Other Tools Required

Within the workshop, you will need to have the following tools in addition to the�Docker�container.
  • MySQL WorkBench

If you prefer to use your PC/laptop without Docker

If you decided not to use�Docker, you should install the following software modules on your local machine.
  • git
  • MySQL Server
  • MySQL WorkBench
  • Python 2.7 or�Anaconda�(Python 2.7) Please ensure that you have the latest pandas package by running
    conda update pandas
  • MySQL Sample Database
    
    git clone https://github.com/datacharmer/test_db.git .
    mysql < employees.sql
  • MySQL WorkBench
 

Intro to relational Databases

Lesson 2

Introduction to Relational Databases

Structured Query Language (SQL)

Lesson 3

SQL Introduction and Data Definition

Lesson 4

SQL Data Manupulation

Lesson 5

SQL further materials

Querying Astronomical Databases - SDSS Examples

Lesson 6

Query SDSS SkyServer with SQL

Lesson 7

Query SDSS SkyServer with CasJob

Querying Databases from your code - SDSS Examples

Lesson 8

Updating File in Querying Databases from your code - SDSS Examples