Database Management System (DBMS)
Software that creates, stores, retrieves, and manages data in one or more databases.
Relational Database Management System (RDBMS)
A type of DBMS that organises data into two-dimensional tables (relations) linked by keys.
Outline the Functions and Tools of a DBMS
- Data dictionary: The DBMS maintains a dedicated “metadata repository” that lists every table, column, data‑type, length and relationship, so the engine always knows the exact structure it must enforce.
- Data safety: Built‑in backup, recovery and integrity‑checking modules create consistent snapshots, ship logs and verify pages so that data can be restored accurately after hardware failures or user errors.
- Query processor: An SQL interpreter parses each query, validates it against the schema and hands it to an optimiser that chooses the most efficient execution plan before returning the result set.
- Storage engine: Low‑level routines handle all create, read, update and delete (CRUD) operations on disk, translating logical rows into physical pages and ensuring every change is recorded in the transaction log.
- Concurrency control: A transaction manager applies locks, timestamps or multiversion snapshots so that many users can work simultaneously without overwriting one another, giving the illusion of a serial schedule.
- Security services: The DBMS enforces role‑based access rights that specify who may read or write each object, records every change in an audit trail, and optionally encrypts data at rest and in transit to safeguard confidentiality.
- Database‑administrator (DBA) tasks: The DBA designs and updates schemas, assigns user privileges and passwords, schedules backups, and drafts disaster‑recovery plans to keep the system resilient and compliant.
- Data‑definition language (DDL): A privileged command set (part of) which allows DBAs to create, alter or drop objects, automatically updating the data dictionary with each structural change.
How a DBMS Promotes Data Security
- Data validation:
- Column data‑types, length limits and CHECK constraints block out‑of‑range or ill‑formed values as they enter the database.
- NOT NULL, primary‑key and foreign‑key rules stop duplicates and orphan records.
- Triggers or stored procedures add extra logic, such as rejecting orders dated in the past.
- The result is that only well‑formed, consistent data ever reach storage.
- Imagine a school database where students enter their date of birth on a registration form.
- If the system accepts a date like “32/13/2025”, it would lead to invalid data.
- To prevent this, data validation rules can check that the date is in the correct format and within a logical range (e.g., between 1900 and today).
- This ensures that only real, properly structured data is allowed into the system, avoiding issues later on with reports or calculations.
- Access rights:
- Built‑in authentication confirms each user’s identity, then role‑based privileges (GRANT / REVOKE) specify who may SELECT, INSERT, UPDATE or DELETE each table, column or view.
- Views and row‑level security masks let sensitive columns (e.g., salaries) or rows be hidden from unauthorised readers.
- The result is that users see and change only the information they are entitled to, reducing accidental leaks or malicious tampering.
- In a school’s report system, teachers should be able to update grades, but students should only be allowed to view their own.
- Using access control, the system assigns different roles:
- A teacher has UPDATE privileges on the “Grades” table.
- A student has only SELECT privileges on their own records.
- This makes sure that users only see or change the data they are meant to, reducing errors and protecting privacy.
- Data locking (concurrency control):
- The transaction manager applies row‑, page‑ or table‑level locks, or multiversion snapshots to ensure one user’s update is isolated from another’s read or write.
- Locks prevent lost updates and dirty reads, while automatic rollbacks undo incomplete transactions after a crash.
- The result is that even under heavy multi‑user load the database never drifts into an inconsistent or partially written state.
- Suppose two school administrators are updating the same student’s profile at the same time where: one changes the address, and the other updates emergency contact info.
- Without data locking, their updates might conflict, and one set of changes could be lost.
- The DBMS locks the student’s record while one admin is editing, ensuring the second admin waits or works on a separate copy.
- This way, no data is overwritten or lost, and the database remains accurate and consistent.