Introduction to Databases

From Juneday education
Jump to: navigation, search

This book is continuously updated

This book is edited every year according to feedback we get from e.g. course evaluations and student input. Feel free to dive in and start reading anyway. Of course all feedback is welcome by the Authors.

Update: We have started to refactor code examples to www.sqlstyle.guide.

Introduction

This book is an introductory book to the concept of databases. It can be used for self-studies, or as course literature for a basic database course (a course which serves as an introduction to databases and SQL). The book , exercises and video lectures use a command line interface with bash and SQLite3.

Regards from the authors: Rikard Fröberg and Henrik Sandklef

Before reading this book

Intended audience

Any one with basic knowledge of computing and IT, who wants to learn the basics of using databases.

Requirements

This book assumes you have knowledge of the working from the command line with a shell like bash. We also assume that you have a basic understanding of the standard streams and how they can be redirected or joined with pipes. If you feel that you need to freshen up your Bash skills before starting with this book, we recommend our Bash book, Bash-introduction.

Your environment

On the first topic page of this course material, you will find instructions for setting up your environment.

Chapters

(Rough outline - subject to changes in the future)

Book companion/Extra material

Information
This book uses SQLite as the engine. You will find pointers to other resourses when the syntax differs a lot.

There are "check your progress" questions added to most exercise chapters. The suggested solutions with explanations can be found here:

Example exam with questions and answers can be found here:

If you want to read all slides (as per 2019-01-03) from the course material in one file (four miniature slide pages on each slide), you can get it here.

Reading tips

Reading tips (Swedish)

We might add some more extra reading material here in the future.

What this book doesn't pretend to be

This book doesn't claim to be computer science or theoretical or even very technical. We strive to give the reader a practical introduction to what databases are, what database management systems are and how to use SQL to retrieve and manipulate data. We will not touch upon theoretical frameworks such as relational theory, relational algebra or set theory. Heck, we aren't even teaching logic. We believe that the reader is perfectly capable of getting a grasp of the basics behind databases and SQL without too much theoretic excursions. We are even inclined to think that understanding the basics of SQL and relational databases on this introductory level isn't simplified by introducing mathematics and computational models.

We focus on the practical and - as usual with our books - base a lot of the teaching through the use of exercises and assignments.

A warning and disclaimer; Some readers with a theoretical background might be offended by our avoiding such terminology as "relational model", "tuples", "Cartesian product", "Relational Calculus", "Cardinality", or, even "Projection"! This book is not for them. There are numerous theoretical books for those who have a strong need for more mathematical or philosophical descriptions of database usage.

Courses using this book

Chapter completeness (for teachers)

Chapter Meta section completed Text and examples Videos (number of) Slides Exercises or questions
Database:Introduction to Databases Yes Medium One (Swedish)
One (ENG)
One slides 5 (2 A4 pages)
Database:Retrieving rows of data - SQL SELECT Yes Medium One (Swedish)
4 (ENG)
Three extra (ENG)
One slides + one extra 12 (5 A4 pages)
Database:Getting started with SQLite Yes Yes One (Swe)
One live (Swe)
4 (Eng)
One slides 15 (10 A4 pages)
Database:Changing rows of data - SQL UPDATE Yes Yes One (Swe)
One live (Swe)
2 (Eng)
One slides 9 (6 A4 pages)
Database:Deleting rows of data -SQL DELETE Yes Short One (Swe)
One live (Swe)
1 (Eng)
One slides 10 (5 A4 pages)
Database:Adding rows with new data - SQL INSERT Yes Short One (Swe)
One live (Swe)
1 (Eng)
One slides 8 (9 A4 pages)
Database:Combining rows of data from related tables - SQL JOIN Yes YES One (Swe)
One live (Swe)
A few extra on decomposing
One slides + One extra 12 (9 A4 pages)
NULL - representing the lack of value Yes YES 3 videos(English) One slides 5
on the same page
as the lecture
Database:Adding constraints to prevent garbage data Yes YES Two videos(Swe)
One extra on enum (Eng)
One plus one slides 8 (10 A4 pages)
Database:Scraping data from the web Yes Yes Four videos(Swe) One slides 6 (13 A4 pages)

Completeness degree:

This course material 88% (44/50) completed (for English audiences). That measure is counting: Meta-section, intro text/examples, English videos, slides, exercises

The course material 94% (47/50) completed (for Swedish audiences). That measure is counting: Meta-section, intro text/examples, Swedish videos, slides, exercises

  • Meta-section completeness: 100% (10/10)
  • Text/examples completeness: 70% (7/10)
  • English videos completeness: 70% (7/10)
  • English or Swedish video completness: 100% (10/10)
  • Slides completeness: 100% (10/10)
  • Exercises completeness: 100% (10/10)