CSC 282 · Database Programming
Our notes
2 min readProblems with separate files
When each office keeps its own files (Admissions, Bursary, Exams):
- Redundancy: the same student's address stored three times.
- Inconsistency: the address is changed in one file only.
- Program-data dependence: changing a record layout means rewriting every program that reads it.
- Hard to answer new questions: "students owing fees who have a carry-over" needs data from two systems.
- Weak security and concurrency control.
Database and DBMS
A database is a shared, integrated collection of related data, with a description of its structure (the data dictionary or catalogue).
A database management system (DBMS) is the software that creates, stores, protects and retrieves it: MS Access, MySQL, PostgreSQL, SQL Server, Oracle, SQLite.
What a DBMS does
- Defines data (tables, types, keys, rules).
- Stores and retrieves it efficiently (indexes, query optimisation).
- Enforces integrity rules (no duplicate keys, no result for a student who does not exist).
- Security: users, passwords, permissions.
- Concurrency control: many users at once without lost updates.
- Backup and recovery after failures.
The three-level (ANSI-SPARC) architecture
- External level: each user's view (Bursary sees fees; a lecturer sees course results).
- Conceptual level: the whole logical structure (all tables and relationships).
- Internal level: how data is physically stored (files, indexes).
This gives data independence: physical storage can change without changing programs (physical independence), and new tables or fields can be added without breaking existing views (logical independence).
Data models
- Hierarchical: tree of parent-child records (old IBM IMS).
- Network: records linked in a graph (CODASYL).
- Relational: data in tables related by key values; the model almost every business system now uses.
- NoSQL stores (document, key-value, graph) exist for very large or loosely structured data; you will meet them later.
People
- Database administrator (DBA): manages structure, security, backups and performance.
- Database designer: decides tables and relationships.
- Application programmers: write programs that use the database.
- End users: use forms, queries and reports.
Exams usually ask
- List the problems of file-based systems and how a DBMS solves each.
- Explain the three-level architecture and data independence.
- State the functions of a DBMS and the duties of a DBA.
Common mistake
Calling a spreadsheet a database. A spreadsheet holds a table, but it does not enforce keys, relationships, many-user control or security like a DBMS.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Introduction to Computer Science, 8.2 Data Management Systems
(opens openstax.org in a new tab)
OpenStax, Introduction to Computer Science, 8.2 Data Management Systems, CC BY-NC-SA 4.0 · licence
-
Workplace Software and Skills, 13.1 What Is a Database?
(opens openstax.org in a new tab)
OpenStax, Workplace Software and Skills, 13.1 What Is a Database?, CC BY-NC-SA 4.0 · licence
-
Database
(opens en.wikipedia.org in a new tab)
Wikipedia, Database, CC BY-SA 4.0 · licence
-
Database administrator
(opens en.wikipedia.org in a new tab)
Wikipedia, Database administrator, CC BY-SA 4.0 · licence
-
NOUN CIT 304: Data Management
NOUN course book (PDF, about 6.9 MB: best on Wi-Fi). Files, databases, the relational model and SQL.
(opens nou.edu.ng in a new tab)
-
OpenStax, Introduction to Computer Science (whole free textbook)
The whole book, free to read online or download as a PDF (the PDF is large: Wi-Fi).
(opens openstax.org in a new tab)
OpenStax, OpenStax, Introduction to Computer Science (whole free textbook), CC BY-NC-SA 4.0 · licence
-
OpenStax, Workplace Software and Skills (whole free textbook)
The whole book, free to read online or download as a PDF (the PDF is large: Wi-Fi).
(opens openstax.org in a new tab)
OpenStax, OpenStax, Workplace Software and Skills (whole free textbook), CC BY-NC-SA 4.0 · licence
Watch
-
Databases, Files and datawarehousing: Database management systems (DBMS)
6 min · ≈ 27 MB · about ₦15
(opens youtube.com in a new tab)
-
Lec 1: Introduction to DBMS | Database Management System
22 min · ≈ 99 MB · about ₦56
(opens youtube.com in a new tab)
-
DBMS - Database System Applications
3 min · ≈ 14 MB · about ₦8
(opens youtube.com in a new tab)
-
File System vs. Database Management System
23 min · ≈ 104 MB · about ₦58
(opens youtube.com in a new tab)
-
DBMS Full Course for Beginners | Learn Database Management System from Scratch | What is DBMS
4 h 25 min · ≈ 1.2 GB · about ₦670
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.