Topics in this domain

Database Models and DBMS

Operations · 3 min read

Organising data

A filing system can take different shapes. A family tree, where each folder sits inside exactly one parent folder. A web of cross-references. Or a set of spreadsheets that refer to each other by ID number. Databases use the same ideas.

Hierarchical, network, relational and object or NoSQL database models.
ModelHow data is organisedCharacteristics
HierarchicalA tree of parent and child recordsFast for fixed access paths; hard to change; each child has one parent
NetworkRecords linked many-to-manyFlexible but complex to maintain
RelationalTables of rows and columns, linked by keysBy far the most common; SQL; the DBMS enforces integrity
Object-orientedObjects combining data and behaviourSuits complex data such as multimedia or CAD
NoSQLDocuments, key-value pairs, columns or graphsScales out easily; flexible structure; often “eventually consistent”

NoSQL databases often trade strict consistency for scale, so integrity controls may have to live in the application instead of the database.

Relational basics

  • Table: rows (records) and columns (fields).
  • Primary key: the unique ID of each row, like a customer number.
  • Foreign key: a column that points to a primary key in another table, like the customer number on an order.
  • View: a virtual table showing only selected rows or columns. Views are an access control: give a user a view that hides salary columns, and they simply can’t see salaries.
  • Stored procedures and triggers: code inside the database that enforces rules or automates actions.

What the DBMS does

A database management system (DBMS) provides:

  • the three SQL language types (below)
  • security and access control
  • concurrency control (locking, so users don’t overwrite each other)
  • integrity enforcement (keys, constraints)
  • backup, logging and recovery
  • the data dictionary / directory system (DD/DS): metadata describing every data element, structure, relationship, owner and access rule. Unauthorised changes to it can corrupt or expose data, so it’s restricted and logged.

The three SQL languages

DDL changes structure, DML changes data, DCL changes permissions.
  • DDL (data definition) changes structure: CREATE, ALTER, DROP.
  • DML (data manipulation) changes data: SELECT, INSERT, UPDATE, DELETE.
  • DCL (data control) changes permissions: GRANT, REVOKE.

Three-schema architecture

External, conceptual and internal schema levels.
  • External: what each user or application sees (their views).
  • Conceptual: the logical design of the whole database.
  • Internal: how it’s physically stored.

Keeping the levels separate means storage can change without breaking applications (data independence), and views can limit what each user sees.

Watching the DBA

The database administrator (DBA) maintains structures, performance, backup and recovery, and often access. That’s a lot of power: a DBA can change data directly and skip every application control.

The risk of DBA access and the controls over it.
  • separate DBA and security administration duties where possible
  • named DBA accounts, no shared logins
  • DBA activity logged (especially direct data changes and structure changes) and independently reviewed
  • structure changes through change management
  • direct data fixes only through approved tickets

Example. On a manager’s verbal request, a DBA runs an UPDATE statement directly on the payments table to “fix” a vendor’s bank account. The application’s approval workflow for bank detail changes is skipped entirely. Database activity monitoring should flag direct changes to that table for independent review.

How the exam asks about it

If the question asks…The answer is usually…
Language used to grant permissionsDCL (GRANT, REVOKE)
Repository of metadata about the databaseData dictionary / directory system
Database feature restricting what users seeViews
Main risk from DBA accessDirect changes to data bypassing application controls
Most common database modelRelational

In short

  • Database models: hierarchical (tree), network (many-to-many links), relational (tables with keys), object-oriented, and NoSQL (document, key-value, graph, column).
  • Relational databases organise data in tables of rows and columns, linked by primary and foreign keys.
  • A DBMS provides data definition (DDL), manipulation (DML) and control (DCL) languages, plus security, concurrency, backup and recovery.
  • The data dictionary/directory system holds metadata: definitions, structures, relationships and access rules.
  • The three-schema architecture separates the external (user views), conceptual (logical) and internal (physical) levels.
  • The DBA has powerful access to data and structures; their activity must be logged and independently reviewed.

Exam traps

  • DDL changes structure (CREATE, ALTER, DROP); DML changes data (INSERT, UPDATE, DELETE); DCL grants rights (GRANT, REVOKE).
  • Database views can restrict what users see, acting as an access control.
  • Unauthorised changes to the data dictionary can corrupt or expose data; restrict and log them.
  • NoSQL databases often trade strict consistency for scale; integrity controls may sit in the application instead.

Slides

Click the slide and use the arrow keys. F toggles full screen.

CISA · Domain 4 · Operations

Database Models and DBMS

How databases organise data, from family trees to tables to NoSQL, what a database management system does, the three SQL language types, and why the database administrator needs watching.

1 / 9