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

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

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

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 consistentIf Grade = 10, Year must be after 2005 (15-year-old)

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