Remember to

  • Remind students to install Firefox.

Walk students through installing SQLite Manager Add-on.

Why use a database management system

Database management systems

Relational databases

Open SQLite Manager Walk through importing surveys table

  1. Download
  2. Database -> New Database -> name portal_mammals.sqlite
  3. Import
  4. Select File and navigate to raw data
  5. Select csv & check First row contains column names
  6. OK to modify the data
  7. Name table surveys
  8. Select data types

    • Fields in databases have types that define the kind of data they contain.
    • Each field/column can only have one type.
    • We have to define the types in advance.
    • Types include
      • Integer
      • Text
      • Decimal/Double/Real/Float
    • Types are highly configurable for when space is limiting
      • Maximum value of integers
      • Maximum length of text
      • How many values before and after the decimal place
  9. Select record_id as the Primary Key and click OK.

    • Every table “needs” a column (or set of columns) that is unique across records/row.
    • This is called the Primary Key.
    • The easiest way to do this is to use an INTEGER that increments every time a new record is added.
    • Many databases that you import will already have a field like this.

Show students the

  • objects panel with Tables and Views.
  • Browse & Search tab.
  • Show students the Structure tab.

We’ve just done most of Exercise 1 Do Exercise 1.11 - Importing Data.

Queries separate from data