Database Fundamentals: Organizing and Querying Data

Grade 9 · Technology · Study Guide

An introduction to relational databases, SQL, data modeling, and the principles of organized data storage.

A database is an organized collection of structured data, typically stored and accessed electronically. Databases are managed by software called a Database Management System (DBMS), such as MySQL, PostgreSQL, or SQLite. Most modern databases follow the relational model, organizing data into tables made of rows and columns.

In a relational database, each table represents an entity (like Students or Courses). Each row is a record, and each column is an attribute. A primary key uniquely identifies each row in a table, while a foreign key creates a relationship between two tables by referencing the primary key of another table.

SQL (Structured Query Language) is the standard language for interacting with relational databases. The four core SQL operations are SELECT (retrieve data), INSERT (add new records), UPDATE (modify records), and DELETE (remove records). These are collectively called CRUD operations.

Data integrity ensures accuracy and consistency. Normalization is the process of organizing a database to reduce redundancy and improve data integrity by splitting data into related tables. Understanding indexes helps optimize query performance by allowing the database engine to find rows faster without scanning the entire table.

Key terms

Relational Database
A database that organizes data into tables with defined relationships between them, based on the relational model.
Primary Key
A column (or set of columns) that uniquely identifies each row in a table; cannot be null or duplicated.
Foreign Key
A column in one table that references the primary key of another table, establishing a relationship between the two.
SQL
Structured Query Language — the standard language used to create, query, and manipulate relational databases.
Normalization
The process of structuring a database to reduce redundancy and dependency by organizing data into separate related tables.
CRUD
An acronym for the four basic database operations: Create, Read, Update, and Delete.

Flashcards

DBMS
Database Management System — software that manages the storage, retrieval, and organization of data (e.g., MySQL, PostgreSQL).
Table
The basic unit of storage in a relational database; organized into rows (records) and columns (attributes).
Primary Key
A unique identifier for each record in a table; must be unique and non-null.
Foreign Key
A field in one table that links to the primary key of another table.
SQL SELECT
SQL command to retrieve data: SELECT column FROM table WHERE condition;
Normalization
Organizing database tables to minimize redundancy and ensure data integrity.
Index
A data structure that speeds up retrieval of rows from a table at the cost of additional storage.
CRUD
Create, Read, Update, Delete — the four fundamental operations of persistent data storage.

Questions

  1. Which SQL statement is used to retrieve data from a database?

    1. INSERT
    2. UPDATE
    3. SELECT
    4. DELETE
    Show answer

    Answer: SELECT

    SELECT is used to query and retrieve data from one or more tables. INSERT adds records, UPDATE modifies them, and DELETE removes them.

  2. A primary key can contain duplicate values within the same table.

    Show answer

    Answer: False

    A primary key must be unique for every row — duplicates would make it impossible to uniquely identify individual records.

  3. A column that references the primary key of another table to establish a relationship is called a ______ key.

    Show answer

    Answer: foreign

    A foreign key in one table references the primary key of another table, creating a relational link between the two.

  4. What is the main purpose of database normalization?

    1. To increase the number of tables in the database
    2. To reduce data redundancy and improve data integrity
    3. To make SQL queries run faster automatically
    4. To convert a database from relational to flat-file format
    Show answer

    Answer: To reduce data redundancy and improve data integrity

    Normalization reduces redundancy (storing the same data in multiple places) and prevents update/insert/delete anomalies, improving data integrity.

  5. SQL stands for Structured Query Language.

    Show answer

    Answer: True

    SQL stands for Structured Query Language, the industry-standard language for managing relational databases.

Get a personalized course on Database Fundamentals built around your child.