Database Management Grade 11

A database is like a highly organised digital filing cabinet — instead of papers stuffed into folders, your data is stored in neat tables with rows and columns, so you can find, sort and filter it in seconds. A DBMS (Database Management System) is the software that manages it all.

Key Terms

TermDefinition
DatabaseAn organised collection of data stored in tables
TableRows and columns storing one type of entity (e.g. Students)
RecordOne complete row — all data about one item
FieldOne column — a specific attribute (e.g. Surname, Age)
Primary keyUnique field that identifies each record (e.g. StudentID)
Foreign keyA field that links to the primary key of another table
DBMSDatabase Management System — software to create, manage and query databases
T2Term 2 · DBMS, Database Types & Careers

Common DBMS Software

DBMSTypeCostUse Case
Microsoft AccessDesktopPaid (MS Office)Small databases, school/office, learning, Grade 11–12 IT practicals
MySQLOpen-source serverFreeWeb applications, websites (used with PHP)
OracleEnterprise serverVery expensiveBanks, airlines, hospitals — mission-critical systems
PostgreSQLOpen-source serverFreeAdvanced queries, large datasets, analytics
Microsoft SQL ServerEnterprise serverPaidLarge corporate databases, Windows environments

Database Types by Usage

TypeDescriptionExample
Desktop / PersonalSingle user, stored locally on one computerMS Access for a school IT project
Server / CentralisedMulti-user, stored on a server, accessed over a networkSchool administration system accessed by teachers and admin
DistributedSpread across multiple locations/servers, synchronisedA national learner database accessed from all provinces

Database Careers

T3Term 3 · Database Design, Integrity & Working With Data

What a Database Table Looks Like

A table in a database looks exactly like a spreadsheet grid. The table has a name, column headers (fields), and rows of data (records).

tblStudents StudentID PK Name Grade ClassID FK 1001 Alice Nkosi 11 C-01 1002 Bob Dlamini 11 C-02 1003 Callie van Wyk 10 C-01 Primary Key (PK) — unique, cannot repeat Foreign Key (FK) — links to another table Each ROW = one record (one student). Each COLUMN = one field (one attribute).

Primary Key vs Foreign Key

Keys are what make databases powerful — they link tables together so you do not repeat data.

tblStudents StudentID (PK) — unique Name Grade ClassID (FK) → tblClasses.ClassID ClassID links THIS record to a class FK links to PK tblClasses ClassID (PK) — e.g. C-01 ClassName TeacherName RoomNumber One class can have many students
Key TypeDescriptionExample
Primary Key (PK)Uniquely identifies each record. Cannot be NULL. Cannot repeat.StudentID = 1001
Foreign Key (FK)A field in one table that refers to the PK of another table.ClassID in tblStudents → ClassID in tblClasses
Composite KeyTwo or more fields combined to form a unique identifier.StudentID + SubjectCode

Entity Relationship Diagram (ERD)

An ERD shows the tables in a database and how they are related. The line between tables shows the type of relationship (one-to-many, etc.).

tblClasses ClassID (PK) ClassName TeacherName RoomNumber 1 : MANY 1 M One class can have many students tblStudents StudentID (PK) Name Grade ClassID (FK) Email

Database Field Data Types

Each field in a table has a data type that controls what kind of data can be stored.

Data TypeAlso CalledDescriptionSA School Example
Text / Short TextVARCHAR, StringLetters, numbers, symbols — max 255 charsStudent name, school name
NumberInteger, Long IntegerWhole numbers or decimals (for calculations)Mark out of 100, age
Date/TimeDateTimeDates and/or times stored as numeric values internallyDate of birth, test date
Yes/NoBooleanOnly two values: True/False, Yes/No, 1/0Has paid school fees, is a prefect
AutoNumberIdentity, Auto-incrementAutomatically assigns the next unique integer — ideal for PKStudentID, RecordID
CurrencyMoney, DecimalMonetary values with fixed decimal precisionFee amount, textbook cost
Memo / Long TextText (large)Longer text — more than 255 charactersTeacher comments, notes
OLE ObjectBlobStores files — images, documents, audioStudent photo, report PDF

Metadata

Metadata is "data about data" — information that describes other data, rather than being the actual content itself. It helps you organise, categorise, search and correctly interpret data.

DataExample Metadata
A photographDate taken, camera type, GPS location
A documentAuthor, creation date, date last revised
A database fieldData type, size, constraints (e.g. required, max length)

Table Relationships

RelationshipDescriptionExample
One-to-OneOne record in Table A links to exactly one record in Table BStudent ↔ Locker (each student has one locker)
One-to-ManyOne record in Table A links to many records in Table BClass → Students (one class has many students)
Many-to-ManyMany records in A link to many records in B (needs a linking table)Students ↔ Subjects (students take many subjects; subjects have many students)

Data Quality Characteristics

Data quality means the data is fit for purpose. Poor quality data leads to wrong decisions.

CharacteristicMeaningSA School Example
AccuracyData is correct and free from errorsA learner's mark recorded as 78, not 87 (transposition error)
CorrectnessData conforms to defined rules and constraintsGrade field only contains values 8–12
CurrencyData is up to date — not outdatedA learner's address updated after they move house
CompletenessAll required data is present — no blank fields where requiredEvery learner record has a valid ID number and grade
RelevanceOnly data that is needed is storedA school database does not need to store a learner's favourite colour

Data Integrity

Data integrity ensures data is accurate, consistent and reliable over its entire lifetime.

Validation Types

Validation checks that data entered is reasonable and in the correct format — it does not check if data is true, just if it is acceptable.

CheckDescriptionSA School Example
Format checkData matches required pattern or structureEmail must contain @ and a dot — alice@school.co.za
Range checkValue falls within acceptable minimum and maximumTest mark must be between 0 and 100
Type checkData entered is the correct data typeAge field must be a number, not text
Presence checkThe field must not be blank (required)Surname cannot be empty — every learner must have a surname
Check digitA calculated digit is appended and re-calculated to verify correctnessSA ID number: last digit is a check digit
Lookup checkValue must match an item in a predefined listProvince field: only one of the 9 SA province names allowed
Consistency checkTwo or more fields must be logically consistentDate of Birth must match the learner's stated age

Manual vs Electronic Methods

Data doesn't have to live in a computer database — it can also be recorded and processed by hand. Comparing the two shows why databases and DBMS software are so valuable.

MethodDescriptionAdvantagesDisadvantages
ManualRecording and processing data by hand — no computer involved (e.g. registers, index cards, paper forms)No electricity or computer needed; simple for very small datasetsSlow; prone to errors (typos, miscalculations); hard to search, sort or summarise large amounts of data
ElectronicUsing a computer and software (e.g. a DBMS) to capture, store and process dataFast access and processing of large datasets; less prone to error when validation rules are used; easy to search, sort, filter and generate reports; many users can access data at onceNeeds electricity and working hardware/software; security risks if not managed properly

Creating and Maintaining a Database

Setting up a working database is a process, not a single step:

  1. Design the table — decide the purpose (e.g. track student information), the fields (columns) needed, and set a primary key (e.g. StudentID) so every record is unique.
  2. Insert / import data — add records manually through a form (e.g. an MS Access form), or import them in bulk from a spreadsheet or CSV file.
  3. Edit / update data — correct mistakes or update values as information changes (e.g. a learner moves up a grade).
  4. Delete data — remove records that are no longer needed or were entered incorrectly.

Processing Data: Sort, Query, Filter, Report

Once data is stored, a DBMS lets you turn it into useful information in several ways:

TechniquePurposeExample
SortingArrange records in a specific orderSort students alphabetically by Surname, or by Mark from highest to lowest
QueryingRetrieve specific records that answer a question you ask the database"Find all students in Grade 11"; "List students older than 16"
FilteringDisplay only the records that meet a condition, hiding the restShow only students with Grade = 12
Generating reportsSummarise or present data in a readable format — tables, charts or dashboardsCount of students in each grade; average age of students; list of email addresses
Looking ahead

You will practise Filter and Sort for real using TADOTable in Databases in Delphi, and full querying with SQL next year in Grade 12.