UNIHIVE

Study Hub UNIPORT CSC 486

CSC 486 · Systems Analysis And Design

File and database design

Files and records, file organisation, databases and DBMS, keys, normalisation to 3NF with a worked example, and data security and backup.

Our notes

2 min read

Files and records

  • Field: one item (matric number). Record: related fields about one thing (one student). File/table: a set of records.
  • Master files (fairly permanent: students) vs transaction files (events: registrations, payments).

File organisation

OrganisationAccessUse
Serialin the order addedlogs, transaction files
Sequentialsorted by key, read in orderpayroll runs
Indexed sequentialsorted plus an index for direct accessstudent records
Direct (random/hashed)key turned into an addressfast lookups (booking systems)

Databases and DBMS

A database is an organised, shared collection of related data; a DBMS (MySQL, PostgreSQL, Oracle, SQL Server) manages it.
Advantages over separate files: less duplication (redundancy), consistency, data sharing, integrity rules, security, easier queries (SQL), backup and recovery.
Disadvantages: cost, complexity, a single point of failure.

Keys

  • Primary key: uniquely identifies each record (matric number).
  • Candidate key: any field that could be the primary key (email, matric number).
  • Composite key: two or more fields together (matric number + course code).
  • Foreign key: a field that refers to the primary key of another table (course code in Registrations points to Courses).

Normalisation (worked)

Normalisation removes repeated and badly placed data so updates do not cause anomalies (insert, update, delete).
Unnormalised: Registration(MatricNo, StudentName, Dept, {CourseCode, CourseTitle, Units, Grade}).
1NF (no repeating groups; each cell holds one value): one row per student per course:
Registration(MatricNo, CourseCode, StudentName, Dept, CourseTitle, Units, Grade).
2NF (1NF + no partial dependency: every non-key field depends on the whole key):

  • StudentName and Dept depend only on MatricNo → Student(MatricNo, StudentName, DeptCode).
  • CourseTitle and Units depend only on CourseCode → Course(CourseCode, CourseTitle, Units).
  • Grade depends on both → Result(MatricNo, CourseCode, Grade).

3NF (2NF + no transitive dependency: non-key fields depend only on the key): if Student also held DeptName and Faculty, which depend on DeptCode, not MatricNo, move them out → Department(DeptCode, DeptName, Faculty).
Final tables: Student, Department, Course, Result. Each fact is stored once: changing a course title is one update.

Data security and integrity

  • Access control: usernames, passwords, two-step login, roles.
  • Encryption of sensitive data and connections (HTTPS).
  • Backups (regular, kept off site; test restoring them) and audit trails (logs of who changed what).
  • Integrity constraints: primary keys unique, foreign keys must match, valid ranges.
  • Privacy law: collect only needed personal data and protect it (Nigeria Data Protection Act 2023).

Exams usually ask: define field, record, file; file organisation methods; DBMS advantages; types of keys; normalise a given table to 3NF; update anomalies; data security measures.

Common mistake: stopping at 1NF by just splitting rows. 2NF and 3NF need you to check which fields depend on which keys.

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 486 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.