UNIHIVE

Study Hub UNIPORT CSC 480

CSC 480 · Database Management

Database security and integrity

Threats to databases, authentication and authorisation, GRANT and REVOKE, roles and views, discretionary and mandatory access control, encryption, auditing and backups, integrity constraints and triggers, and data protection law in Nigeria.

Our notes

2 min read

Threats

Theft and fraud, loss of confidentiality (leaked student records), loss of integrity (results altered), loss of availability (server down, ransomware), accidental damage (a DELETE without WHERE), SQL injection, weak passwords, insiders with too much access.

Authentication and authorisation

  • Authentication: proving who you are (passwords stored only as salted hashes, two-step verification for staff).
  • Authorisation: what you may do once in.

Discretionary access control (DAC) in SQL:
GRANT SELECT, UPDATE (score) ON registration TO exams_officer;
REVOKE UPDATE ON registration FROM exams_officer;
WITH GRANT OPTION lets the receiver pass a privilege on (use sparingly).
Roles group privileges (CREATE ROLE lecturer; GRANT ... TO lecturer; GRANT lecturer TO user).
Views restrict which rows and columns a user sees.
Principle of least privilege: a web app's database user should have only the rights it needs (never the root account).

Mandatory access control (MAC)

Data and users get security levels (Top secret > Secret > Confidential > Unclassified). Bell-LaPadula rules: no read up (cannot read above your level), no write down (cannot leak by writing to a lower level). Used in military systems.

Other protections

  • Encryption: in transit (HTTPS/TLS) and at rest (encrypted disks or columns for sensitive data such as ID numbers).
  • Auditing: logs of who did what and when, especially for changes to results or payments.
  • Backups: regular, tested, kept off the server; RAID protects against single-disk failure but is not a backup.
  • Statistical databases: allow only aggregates, but an attacker can sometimes infer individuals by clever combinations of queries (inference control).
  • Physical security and staff training.

Integrity

Keeping data correct and consistent:

  • Domain constraints, NOT NULL, CHECK.
  • Entity and referential integrity (primary and foreign keys).
  • Assertions (rules across tables; rarely supported) and triggers: procedures that run automatically on INSERT, UPDATE or DELETE (log every change to scores into an audit table; refuse registration above the unit limit).

Integrity enforced in the database protects data even when a buggy program forgets to check.

Data protection law in Nigeria

The Nigeria Data Protection Act 2023 (replacing the 2019 NDPR) applies to anyone processing personal data of people in Nigeria. Key duties: a lawful basis for processing, purpose limitation, data minimisation, accuracy, storage limitation, security, data subjects' rights (access, correction, deletion), notifying breaches to the Nigeria Data Protection Commission within 72 hours. Database designers apply it by collecting only what is needed, protecting it and deleting it on time.

Exams usually ask: threats and countermeasures; GRANT/REVOKE and roles; DAC versus MAC (Bell-LaPadula); integrity constraints and triggers; encryption, auditing and backup; the main duties under Nigeria's data protection law.

Common mistake: treating RAID or replication as a backup. If someone deletes a table, the deletion is copied to every mirror instantly; only a separate backup brings it back.

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