UNIHIVE

Study Hub UNIPORT CSC 282

CSC 282 · Database Programming

From files to databases: the DBMS

Problems of separate files, what a database and a DBMS are, the three-level architecture and the people involved.

Our notes

2 min read

Problems 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

  1. External level: each user's view (Bursary sees fees; a lecturer sees course results).
  2. Conceptual level: the whole logical structure (all tables and relationships).
  3. 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

Watch

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.

All CSC 282 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.