Introductie tot databanken (SQLite)

Brecht Willems · Universiteit Gent

Ruimtevaarder

Leerlingen/studenten maken dagelijks gebruik van databanken, maar weten meestal (nog) niet hoe die werken. Via deze lessenreeks kunnen ze kennismaken met SQL. De bedoeling van de cursus is om een basiskennis mee te geven in enkele lessen, waarop ze later eventueel kunnen verder bouwen.

Dit is een inleidende cursus over databanken. Op Dodona wordt SQLite gebruikt, maar de verschillen met andere SQL-varianten (zoals MySQL) zijn klein.

Deze lessenreeks werd ontwikkeld door B. Willems (lesgever aan de UGent) en wordt gratis ter beschikking gesteld voor niet-commerciële educatieve doeleinden.

As a student you can't register for this course. Ask your teacher to make a copy. Are you an educator yourself and do you want to get started with this course? Request teacher rights here to be able to make a copy for your students.

Exercise series

Inleiding en informatie opvragen

Na deze lessenreeks is het de bedoeling dat je…

  • het begrip databank kan toelichten.
  • de opbouw van een databank kan toelichten (tabel, rij, veld)
  • zoekopdrachten kan uitvoeren op één tabel.

Informatie opvragen met ORDER BY en WHERE

Na deze lessenreeks is het de bedoeling dat je…

  • gegevens in een tabel kan zoeken, sorteren en filteren.
Title Class progress Status
ORDER BY introduction
Sort by last name
Sort by nationality
WHERE introduction
Cosmonauts
Astronaut id
Non-Americans
WHERE with operators introduction
American or Belgian astronaut
Michael Barratt
Cosmonauts Sergei and Elena
Sort by last name (NLD&BEL)

Informatie opvragen met LIKE

Title Class progress Status
LIKE introduction
Beginning with 'M'
Ending with 's'
Contains 'us'
No e in first name
Nationality with an s
Summary

Informatie opvragen met statistische functies

Title Class progress Status
Math functions
Number of astronauts
Number of countries
Last astronaut

Informatie opvragen uit meerdere tabellen

Title Class progress Status
Database intro
Database scheme spaceflight 2
Multiple tables
Primary key introduction
ISO code
Nationality
Title Class progress Status
INSERT INTO introduction
New spaceman
Fill table
New nationalities
UPDATE introduction
Land code
Change last name
DELETE FROM introduction
Delete spaceman
Delete Russians
Summary edit information
Title Class progress Status
Create table
Add data
Add data 2
Retrieving data
Retrieving ordered data
Retrieve data with where
Retrieve data with where like
Remove data
Update data
Update data with current date