Volume I · exam cheatsheet · study guide

CMS 706 · Database Systems

PGD Computer Science, Rivers State University, Nkpolu-Oroworukwo, Port Harcourt · built from the lecturer's 29 pages of class notes and the two past papers on file, one of them set by this same lecturer three weeks before this exam
Prepared by Mbosinwa Awunor · www.mbosinwa.dev
Exam: Friday 07 Aug 2026 Time: 11:00 – 14:00 Venue: the exam hall Lecturer: the lecturer

How this examiner sets a paper · evidence from the past papers

Two papers are on file. DTS 304 Data Management I, dated 14/07/2026, was set by the lecturer · the CMS 706 lecturer · and its content is almost exactly these notes. The older CMS 445 paper is by different lecturers but covers the database half.
  1. Scenario questions, not bare definitions. "A hospital replaces its paper records with a DBMS…", "A supermarket chain records millions of transactions daily · explain the difference between data and information using this scenario." Name the concept, then apply it explicitly to the scenario given. An answer that never mentions the hospital or the supermarket loses the application marks.
  2. SQL appears on every paper. Write complete statements, uppercase keywords, ending in a semicolon.
  3. Both papers say "attempt any FIVE". You get to leave one or two questions out · read everything first and choose deliberately.
  4. Lists earn marks per item. Almost every concept in these notes came with a numbered list of advantages, disadvantages, benefits or challenges. Learn the lists, not just the definitions.

The lecturer's own paper of 14/07/2026, in full · seven questions: Q1 hospital DBMS hardware/software, benefits, implementation challenges · logical independence · data as a database component · user consent. Q2 databases and data science · data masking · data vs information (supermarket) · the data lifecycle (healthcare, ten-year retention). Q3 a data cleaning plan · indexing on 20 million records · GPS data for decision-making · classifying data formats. Q4 design an ER diagram for a bank (14 marks). Q5 committee/professor queries · password policy. Q6 the phases of query processing · debugging two broken SQL queries. Q7 the phases of data design · concurrency control · define "transaction".
Read this carefully: questions 1, 2 and 3 are answerable almost entirely from these notes · they are your five-question paper's safest three. Questions 4 to 7 draw on material the class never reached: ER diagrams, query-processing phases, data-design phases and division-style queries are all in Volume III, and you need at least two of them to make up five answers. Learn this volume first, then Volume III §2–§6.

1Definitions to write word-for-word

TermDefinition
DataRaw facts, figures or symbols about people, things, events or processes that can be collected, measured and analysed. It is raw and unprocessed and has no meaning on its own · e.g. 25°C, or a person's age = 25.
InformationProcessed and organized data that is meaningful and useful and helps in decision making · e.g. "Mary scored 25 marks in January." It is structured, organized and active.
Information managementThe process of collecting, storing, organizing and managing information efficiently.
Data scienceA multi-disciplinary field that uses data, algorithms and scientific methods to extract insight and knowledge from structured, semi-structured and unstructured datasets, combining computer science, statistics and machine learning to collect, clean, analyse and visualize data.
Data lifecycleThe stages data goes through from creation to deletion.
MetadataData about data · structured information that describes, explains, locates or otherwise makes it easier to retrieve, use or manage an information resource.
Information retrieval systemA system that searches and retrieves relevant information from stored data · e.g. search engines, library catalogue systems, e-commerce search.
IndexingA technique used to speed up data retrieval by creating a reference (index) to data, like the index in a book. Also: the process of creating a data structure that improves search speed.
DDDMData-driven decision making · the process of making decisions based on data analysis rather than intuition.
Information privacyThe right of individuals or organizations to control how their data is collected, used and shared.
EncryptionThe process of converting data into an unreadable format · e.g. plain text "Hello" → "x592@H".
Data maskingHiding sensitive data · e.g. showing a card number as xxx 1234.
DatabaseA collection of interrelated data stored together with controlled redundancy to serve one or more applications in an optimal fashion, organized so that a computer program can quickly select desired pieces of information. Also: an integrated, self-describing collection of related data.
DBMSA collection of related data and software programs used to define, construct, maintain and manipulate data in a database · it enables you to store, modify and extract data. E.g. SQL Server, Access, Oracle.
TransactionA sequence of actions that represent a logical unit of work, transforming the database from one state to another.
Database modelAn organizing principle that specifies a particular mechanism for data storage and retrieval.
Database architectureHow the database is structured · how data flows between its parts; the blueprint for storing, managing and accessing data efficiently.
Logical data independenceThe ability to change the conceptual (logical) schema without changing the external schema or application program.
Physical data independenceThe ability to change the physical storage scheme without changing the conceptual/logical schema.

2Data vs information PAST Q · SCENARIO

BasisDataInformation
What it isRaw, unprocessed facts, figures or symbolsProcessed and organized data
MeaningHas no meaning on its ownMeaningful and useful
PurposeThe raw material, awaiting meaningSupports decision making
FormBinary digital encoded (0, 1), measured in bits, bytes, gigabytesStructured, organized and active
DependencyIndependent · exists on its ownDepends on data · cannot exist without it
Example25, 28, 30 · bare marks"Mary scored 25 marks in January"

Data by nature: quantitative · numeric information that can be measured (weight, height, sales figures, temperature) · qualitative · descriptive information expressing characteristics or attributes (customer feedback, colour of a car, satisfaction level).

Answering the supermarket scenario

"A supermarket chain records millions of customer transactions daily. Explain the difference between data and information using this scenario."
The data is the raw transaction records themselves · every individual line: item purchased, price, quantity, till number, date and time. On their own these millions of rows mean nothing; no manager can look at them and decide anything.

The information is what emerges once those records are processed and organized · "bread sales rose 18% in Port Harcourt branches in June", "Saturday afternoon is the busiest trading period", "customers who buy nappies also buy milk". Each of these is meaningful, useful and directly supports a decision: what to restock, when to roster more staff, which products to shelve together.

The one-line summary: the supermarket collects data but manages the business with information · the transactions are the raw material, and processing them into sales trends is what turns them into information.

3Information management and the data lifecycle PAST Q

Core components of information management (6)

  1. Data collection · gathering raw data from sources (forms, sensors, logs)
  2. Data storage · saving data in databases, cloud or files
  3. Data organization · structuring data into tables, categories or format
  4. Data processing · converting raw data into useful information
  5. Data retrieval · accessing stored data when needed
  6. Data security · protecting stored data from unauthorized access

Objectives of information management (4)

Improved decision making · ensure data accuracy and consistency · enhance efficiency · support business operation.

Real-world examples (3)

Banking systems managing transactions · hospital systems managing patient records · e-commerce platforms tracking orders.

The eight stages of the data lifecycle

#StageWhat happens
1Data creationGeneration from sources · users or systems
2Data collectionGathering the data
3Data storageSaving it in databases or the cloud
4Data processingCleaning and transforming
5Data analysisFinding patterns and trends
6Data distributionSharing results with those who need them
7Data archivingMoving inactive data to long-term storage
8Data deletionSecure disposal at end of life

Importance of the data lifecycle: ensures data quality · improves data quality and usefulness · supports compliance and security.

Key insight to quote: better data leads to better decisions.

Answering the healthcare-records scenario PAST Q · 8 MARKS

"A healthcare company stores patient records for ten years before deletion. Outline and discuss the stages of the data lifecycle involved." · walk the eight stages through that specific story: 1. Creation · the record is generated at the point of care: consultation notes, test results, vital signs. 2. Collection · gathered into the hospital's system from wards, labs and monitoring devices. 3. Storage · saved in the EHR database, with backups. 4. Processing · cleaned, coded and transformed into a standard format so records from different departments agree. 5. Analysis · used for diagnosis, treatment planning and disease prediction. 6. Distribution · shared with authorized clinicians, and with insurers or regulators under consent. 7. Archiving · after the patient becomes inactive, records move to long-term storage but must remain retrievable for the full ten-year retention period, which is a legal and compliance requirement, not a technical one. 8. Deletion · at the end of the ten years the records are securely destroyed, because keeping personal health data longer than its purpose requires violates data minimization and privacy regulation such as HIPAA.

4Data science, DDDM and data collection

How data is used in data science (5 steps)

  1. Data is collected · from databases, APIs, sensors
  2. Data cleaning · removing errors, duplicates, spaces
  3. Data analysis · finding patterns and trends
  4. Model building · predictive models, e.g. machine learning
  5. Decision making · business insights and strategies

Examples: Netflix recommending movies · TikTok · banks detecting fraud · hospitals predicting disease.
Importance of data: data is the foundation of data science · without data, analysis is impossible.

Data-driven decision making · 6 steps

Data collection → data processing → data analysis → interpretation → decision making → prediction.
Example: sales data shows declining product demand → decision: reduce production or improve marketing.

Advantages of DDDMChallenges of DDDM
More accurate decisionsPoor data quality
Reduced risksLack of skills
Better performanceData overload

The three data collection techniques

TechniqueWhat it is · examplesAdvantagesDisadvantages
ManualCollected by humans without automation · surveys, questionnaires, paper forms, interviews, observationLow cost and simple · flexibleTime consuming · prone to human error · difficult to scale
Sensor-basedCollected automatically by devices · thermometers, temperature sensors, biometric scanners, IoT, GPSReal-time data · high accuracy · automationExpensive · requires maintenance · may produce large data volumes
API-basedCollected from external systems via Application Program Interfaces · weather API, social media API, payment gatewaysFast and automated · access to large datasets · real-time updatesRequires programming knowledge · API limits/restrictions · depends on external systems

Use cases of data science, by sector

Healthcare · patient records, disease prediction · Banking · fraud detection, transaction tracking · E-commerce · product recommendation, customer behaviour analysis · Education · student performance prediction, learning analytics · Transportation · traffic prediction, ride sharing.

Data formats · the classification question PAST Q

FormatDefinitionCharacteristicsExamples
StructuredData organized in a fixed format, usually in tablesRows and columns · easy to store and query · highly organizedStudent records · SQL tables and a customer database · Excel spreadsheets
Semi-structuredData that does not follow strict tables but has some structureFlexible structure · uses tags or key-value pairsJSON files · XML documents · emails
UnstructuredData with no predefined format or structureDifficult to analyse · large in volume · requires advanced tools (AI, NLP)Videos · images · comments · audio recordings · social media posts
The past-paper classification, answered. "A social media platform stores videos, images and comments, XML documents, audio recordings, emails, a customer database and a JSON file · classify each."
Unstructured: videos · images · comments · audio recordings. Semi-structured: XML documents · emails · the JSON file. Structured: the customer database.
A JSON example to quote: { "Name": "John", "Age": 20 } · it has keys and values, so it has some structure, but no fixed table.

5Storage, retrieval, indexing and search

The two storage methods compared

BasisFile-based storageDatabase system (DBMS)
What it isData stored in separate files · text files, spreadsheetsA structured system where data is stored in tables and managed by a DBMS
CharacteristicsFlat files (.txt, .csv) · each file independent · no central controlCentralized storage · tables of rows and columns · supports relationships (keys)
AdvantagesSimple to use · low cost · suitable for small systemsReduces redundancy · better data integrity · improved security · easy data retrieval · multi-user access
DisadvantagesData redundancy · data inconsistency · difficult data sharing · poor security · no relationship between dataVery expensive · requires an expert or administrator · complex to manage

Information retrieval system

Components (5): data collection · indexing system · query processor · search engine · user interface.
Retrieval process (4): user enters query → system searches indexed data → matches result → returns relevant information.
Types of retrieval: exact match (database query) · best match (search engines).

The four types of index

IndexBased on
Primary indexThe primary key · unique values
Secondary indexNon-key attributes · may have duplicates
Clustered indexData stored in order
Non-clustered indexA separate structure pointing to the data

Benefits of indexing: faster search · improved query performance.
Limitations of indexing: takes extra storage · slows down data updates (every insert or update must maintain the index too).

The 20-million-record bank scenario PAST Q

Without an index, a query must perform a linear search · checking all 20 million records one after another until the target is found, which is slow and grows worse as the bank adds customers. An index is a separate reference structure, typically a B-tree, holding the indexed values in sorted order with pointers to the actual rows. The query engine searches the index, locates the pointer and retrieves only the matching record, so it never scans the table. The WHERE condition is what benefits, and the effect grows with table size · which is exactly why it matters at 20 million rows and not at 20. The price is extra storage and slower inserts and updates, because every write must also update the index.

The two search techniques and the two index structures

TechniqueHow it worksAdvantagesDisadvantages
Linear (sequential) searchAll elements are checked one after another until the target is found: start at the first record, compare each value, stop when found or when the end is reachedSimple to implement · works on unsorted dataSlow for large datasets · poor time complexity
Index searchUses an index to locate data without scanning all records: search the index, locate the pointer, retrieve the actual dataMuch faster · efficient for large dataRequires extra storage · index maintenance overhead

Worked example from class: search for 25 in {10, 15, 25, 30} · linear search checks 10, then 15, then 25 and stops. An index search would go straight to it.

StructureHow it worksAdvantagesDisadvantages
B-tree indexingA balanced tree structure storing sorted data. Nodes contain multiple keys; all leaf nodes are at the same level. Search by traversing tree levelsEfficient for large datasets · balanced structure gives consistent performance · supports range queriesComplex structure · requires maintenance
HashingUses a hash function to map a key to a specific location in memory · Hash(25) → Address 5Very fast look-up · good time complexityCollision · two keys map to the same location · not suitable for range queries
B-tree:      [20]
            /    \
        [10]   [30, 40]      all leaves on one level

6Querying data efficiently and SQL

The class table · StudentDB

S/NNameMatNoAgeDeptSex
1John2025/PGD/00122Agric ScM
2Ada2025/PGD/00224EconomicsF
3Rueben2025/PGD/00330MathsM
4Eze2025/PGD/00432Computer ScM
5Obuchi2025/PGD/00521LawF
SELECT Name FROM StudentDB WHERE Age >= 30;

Result:  Rueben
         Eze

Six techniques for efficient queries

  1. Use an index · speeds up the WHERE condition
  2. Avoid SELECT * · retrieve only the needed columns
  3. Use WHERE properly · filter the data at the source
  4. Use JOIN efficiently · join Table 1 (Name, MatNo, Age, Dept, Sex) to Table 2 (State, LGA) to get the combined row
  5. Limit results · return only the rows you need
  6. Use aggregation carefully · e.g. SELECT COUNT(*) FROM Table1

Query optimization concept: the query optimizer chooses the best execution plan · by reducing disk access, by reducing CPU usage, and by using indexes and statistics.

The four sub-languages of SQL LEARN THE TABLE

CategoryFull nameWhat you doKeywords
DQLData Query LanguageRead dataSELECT
DMLData Manipulation LanguageChange dataINSERT, UPDATE, DELETE
DDLData Definition LanguageDefine structureCREATE, ALTER, DROP
DCL / TCLData Control / Transaction Control LanguagePermission and transactionGRANT, REVOKE, COMMIT, ROLLBACK

The core statements, as written in class

SELECT Name, Price
FROM Products
WHERE Category = 'iphones'
ORDER BY Price DESC
LIMIT 10;

INSERT INTO Users (Name, Email)
VALUES ('Ada', '[email protected]');

UPDATE Products
SET Price = Price * 1.1
WHERE Category = 'iphone';
Clause order never changes: SELECT … FROM … WHERE … GROUP BY … HAVING … ORDER BY … LIMIT. Writing WHERE after ORDER BY is a syntax error and an easy lost mark.

Real-world applications: e-commerce · fast product search using indices · banking · quick transaction retrieval · social media · searching users.

7Privacy, integrity and security PAST Q

The five key principles of privacy

  1. Consent · data should be collected with user permission
  2. Purpose limitation · data used only for its intended purpose
  3. Data minimization · collect only necessary data
  4. Transparency · inform users how data is used
  5. Accountability · organizations are responsible for data protection

Why user consent matters PAST Q

Consent is the first principle of information privacy · the right of individuals to control how their data is collected, used and shared. Without it, collection is unauthorized access and exposes the customer to identity theft and data misuse. It is also a legal requirement under GDPR, HIPAA and Nigeria's data protection laws, so collecting without it risks penalties. And it is commercial: consent builds the trust and transparency that keep customers willing to share data at all. Consent also bounds the other principles · it is what defines the "intended purpose" that purpose limitation then restricts you to.

Types of data: personal (name, age) · financial (bank details) · health records · biometric · academic.
Privacy risks: identity theft · data misuse · unauthorized access.
Regulations: GDPR (Europe) · HIPAA (healthcare) · local data protection laws (Nigeria).

Five data protection techniques

TechniqueWhat it does
EncryptionConverts data into an unreadable format · "Hello" → "x592@H". Two types: symmetric and asymmetric
Access controlRestricts who can view or modify data · role-based access control and user authentication (password / biometrics)
Backup and recoveryRegular backups prevent data loss; recovery systems restore data after failure
Data maskingHiding sensitive data · e.g. a card shown as xxx 1234
Firewalls and antivirusProtect against unauthorized access and malware

Threats and the controls that answer them

ThreatControl
Malware · viruses, worms, ransomwareFirewalls · block unauthorized network access
Phishing · fake emails to steal informationAuthentication · verify user identity
Unauthorized access · hackers accessing systemsAuthorization · define what users can access
SQL injection · malicious SQL commandsUpdate and patching · fix system vulnerabilities
Data breaches · exposure of sensitive dataEncryption · monitoring and auditing · track system activities

How data masking protects sensitive information: it replaces or hides part of a sensitive value while leaving the record usable · a card number displayed as xxx 1234 still identifies the card to its owner but is useless to anyone who sees it, whether a call-centre agent, a developer testing on real data, or an attacker who obtains the screen. Unlike encryption it is not reversed for the viewer · the hidden digits are simply never shown.

8Databases, the DBMS and its services

The four components of a database

ComponentMeaning
1. DataAny computer representation of a stored logical entity · discrete pieces of information usually formatted in a special way
2. RelationshipRepresents a correspondence between various elements
3. ConstraintsPredicates that define the correct state of the database
4. SchemaDescribes the organization of and relationships between the database · the design of the database

Why several tables? · the class explanation

Given Table 1 (Age, Name, MatNo), Table 2 (LGA, State), Table 3 (Religion, Country), Table 4 (PA, Sex, Height) · the schema separates the data into tables that are related because common attributes exist in a selected pair of the tables. Because of those common attributes we can combine two or more tables to get the complete data of each student. That is exactly what a JOIN does.

The DBMS

The DBMS is made up of (a) the database, (b) the DBMS itself, (c) the application program · what the user interacts with. Its primary goal is to provide a mechanism where data can be stored and information retrieved from the database.

  User
    ↓
┌───────────────────────────────┐
│  Application Process          │
│ ┌───────────────────────────┐ │      ┌──────────┐
│ │ Transaction Processing    │─┼─────▶│ DB       │
│ │ Data Management           │ │      │ metadata │
│ └───────────────────────────┘ │      └──────────┘
└───────────────────────────────┘  DBS

The seven services of the DBMS

ServiceWhat it does
1. Transaction managementA transaction is a sequence of actions representing a logical unit of work, transforming the database from one state to another. On COMMIT the changes are made permanent; on ROLLBACK the transaction returns to its original state.
2. Concurrency controlCoordinates database manipulation processes that operate concurrently, access shared data and can potentially interfere with one another. Its goal is to allow concurrency while maintaining consistency of the shared data.
3. Recovery managementEnsures that an aborted or failed transaction does not adversely affect the database or other transactions · the database is returned to a consistent state after a failure.
4. Security managementThe protection of data against unauthorized access · only authorized users or administrators may reach the database.
5. Language interfaceProvides the languages for the definition and manipulation of data · structures created with the DDL, manipulation done with DML commands.
6. Storage managementManages the permanent storage of data. The internal schema defines how data is stored, and the storage manager interfaces with the operating system to reach physical storage.
7. Data catalog managementThe data catalog is a system database holding metadata · information about data, relationships, constraints and the entire schema · organized into a unified database that can itself be queried to learn the structure of the database.

Why the DBMS replaced the file-based system

The file-based system was developed in response to industry's need for more efficient data access, but it has three named limitations · this is a standard exam question:

  1. Segregation and isolation of data · when data is isolated in separate files it is more difficult to access data that should be available; the difficulty is compounded when data is required from more than two files.
  2. Duplication of data · because each department takes a decentralized approach, the FBS encourages uncontrolled duplication, and duplication is wasteful.
  3. Data dependency · the physical structure and storage of files and records are defined in the application code, so changes to an existing structure are difficult to make.

Applications of a database (7): purchasing from the supermarket · using credit cards · booking a vacation with a travel agent · a computerized library system · using the internet · taking out insurance · renting a video.

Note the symmetry worth writing: each FBS limitation is answered by a DBMS advantage · isolation is answered by centralized storage and relationships, duplication by controlled redundancy, and data dependency by data independence (§10). Structuring the answer that way turns a list into an argument.

9Database models

A database model is an organizing principle that specifies a particular mechanism for data storage and retrieval. The primary difference between models lies in the methods of expressing relationships and constraints among the data elements. The relational model is the current favoured model, while object-oriented and structured models are emerging.

#ModelHow it organizes dataAdvantagesDisadvantages
1HierarchicalOrganizes data elements as tabular rows, one per instance of an entity, in a tree: parent → child. E.g. a company's GM above departmental managersSimple · has data security and integrity · efficient (not complicated) · fast accessImplementation complexity · database management problems · lack of structural independence · programming complexity · implementation limitation · rigid, difficult to modify
2NetworkReplaces the hierarchical tree with a graph, allowing more general connections among nodes. Its defining difference is the many-to-many (n-n) relationship · records may have more than one parentConceptual simplicity · handles more relationship types · ease of data access · data integrity and independence · database standardsSystem complexity · absence of structural independence
3RelationalStores data in tables. Powerful because it requires few assumptions about how data is related or extracted, so the same database can be viewed in different ways and a single database can be spread across several tables. Each table corresponds to an entity, each row to an instanceSimple and widely used · easy querying with SQL · flexible viewsLess flexible for very complex data
4Object orientedData stored as objects, as in programmingHandles complex dataComplex implementation
5Semi-structuredA flexible model using formats like JSON and XMLAdaptable · used in modern web systemsWeaker guarantees than a fixed schema

Also named in the notes: the object-relational model and the deductive model.

The Book / Distributor relationship example

Book ──── 1:1 ──── Distributor
   given a book, its distributor is determined

Book ──── n:1 ──── Distributor
   what books does this distributor supply?

Book ──── n:n ──── Distributor
   combines both; readable from either side

The notes use this to make one point: the same real-world relationship can be depicted in several ways, and the model you choose decides which questions are cheap to answer.

The hierarchical example from class

                General Manager
        ┌───────────┬────────────┬──────────┐
      Sales     Treasury      Supply    Accounts
      Manager    Manager     Manager    Manager
        └───────────┴────────────┴──────────┘
                   Departments

Note the sentence the notes give for why the hierarchical model fell out of use: many of its limitations result from its overly restrictive view of relationships · a child may have only one parent, which real data often violates. That is precisely the gap the network model's n-n relationship was invented to fill.

10Database architecture and independence

The ANSI/SPARC three-level architecture

Used in most RDBMS · Postgres, MySQL, Oracle. Database architecture is how the database is structured · how data flows between its parts; the blueprint for storing, managing and accessing data efficiently.

LevelWhat it holds
1. External / ViewThe area or angle the users see · views, reports, app interfaces. The user cannot see the whole database; complexity is hidden and security is added
2. Conceptual / LogicalDBMS independent; where the DBA works. It holds the "what" · tables, relationships, constraints and schemas
3. Internal / PhysicalHow data is stored · files, indices, data blocks, partitions, on disk or SSD

Types of database architecture: client–server · three-tier.

┌──────────────────────────────┐
│ EXTERNAL   views · reports   │ ← what users see
├──────────────────────────────┤
│ CONCEPTUAL tables · relations│ ← what the DBA designs
├──────────────────────────────┤
│ INTERNAL   files · indices   │ ← how it is stored
└──────────────────────────────┘

The two independences · and why the levels exist

IndependenceDefinitionClass example
Logical data independenceThe ability to change the conceptual (logical) schema without changing the external schema or application programYou add a new column Middle-Name to the Customers table. If the application, running SELECT First-Name, Middle-Name FROM Customers_Table, keeps working, the database is logically independent
Physical data independenceThe ability to change the physical storage scheme without changing the conceptual/logical schemaYou move Customers_Table from HDD to SSD. If the application keeps working, you have physical independence

"How does adding new database fields affect logical independence?" PAST Q

Adding a field changes the conceptual/logical schema. Logical data independence is precisely the property that this change does not force a change to the external schema or the application programs · existing views and queries that never mention the new column continue to run unchanged, because each external view exposes only the subset of the schema it was defined over.

So a well-designed three-level architecture absorbs the addition: the DBA adds Middle-Name at the conceptual level, and programs using SELECT First-Name FROM Customers_Table are unaffected. Independence fails only where an application depends on the schema's shape rather than on named columns · the classic case being SELECT *, which silently starts returning an extra column, or code that reads fields by position. That is the strongest single argument for avoiding SELECT * in application code, and it ties this question straight back to the efficient-query techniques in §6.

11Sector applications · the table to memorise

SectorData collectedApplications usedBenefitsChallenges
HealthcarePatient records (name, age, history) · medical images (X-ray, MRI) · lab results · vital signs (heart rate, blood pressure)EHR · centralized patient data storage · CDSS · clinical decision support helping doctors diagnose · telemedicine · remote consultation · health monitoring systems · wearablesImproved patient care · faster diagnosis · reduced errorsData privacy concerns · high system cost · integration issues
FinanceTransaction records · customer profiles · credit history · market data (stock monitoring)Online banking systems · fraud detection systems · risk management systems · automated trading systemsSecure transactions · real-time processing · better financial decisionsCyber security, threats and regulatory compliance
LogisticsShipment details · inventory levels · delivery routes · GPS trackingSupply chain management · inventory management · route optimization · warehouse managementEfficient delivery · reduced cost · real-time trackingData integration · system complexity
Social mediaUser profiles (text, likes, comments) · behavioural data · multimedia contentRecommendation systems · targeted advertising · content moderation · trend analysisPersonalized user experience · increased engagement · business insightPrivacy issues · misinformation · data overload

The ride-sharing GPS scenario PAST Q

"A ride-sharing company collects GPS locations every second. Explain how this data supports business decision-making." · this is a DDDM question wearing a logistics costume. Walk the six DDDM steps through it: the GPS stream is collected by sensor-based collection, processed and cleaned, analysed for patterns, interpreted, then used for decisions and prediction. Concretely, the company gains: route optimization · the shortest actual route given live traffic, cutting fuel cost and trip time · demand forecasting · which areas generate rides at which hours, so drivers are positioned before demand appears · dynamic pricing · surge where demand exceeds supply · driver performance and safety monitoring · speeding, harsh braking, idle time · accurate ETAs, which drive customer satisfaction and retention · and expansion planning · which new areas are underserved. Close with the DDDM definition itself: every one of these is a decision made from data analysis rather than intuition.

12Things you can lose easy marks on

  1. Defining data and information in the same words. Data has no meaning on its own; information is processed, meaningful and supports a decision.
  2. Answering a scenario question with pure theory. Name the concept, then apply it to the hospital, supermarket or bank you were given.
  3. Calling email or XML unstructured. They are semi-structured · they have tags or key–value pairs.
  4. Saying indexing has no cost. It takes extra storage and slows down updates.
  5. Claiming hashing is good for range queries. It is not · that is B-tree's advantage.
  6. Confusing the two independences. Logical = change the logical schema, applications survive; physical = change the storage, the logical schema survives.
  1. Mixing up the DBMS services. Concurrency control coordinates simultaneous transactions; recovery management handles failed ones.
  2. Saying COMMIT can be undone. COMMIT makes changes permanent; ROLLBACK is what returns the transaction to its original state.
  3. Putting DELETE under DDL. DELETE removes rows and is DML; DROP removes the table and is DDL.
  4. Writing SQL clauses out of order or without a semicolon.
  5. Giving the hierarchical model's n-n relationship. Many-to-many is the network model · hierarchical allows only one parent.
  6. Listing three points where the question is worth 8 marks. Marks are per point · write the whole list.

Timing plan for a 3-hour paper

Both past papers say "attempt any FIVE", so the first five minutes are spent reading all the questions and choosing · pick the five whose lists you know cold, and be willing to skip the one heaviest on unfamiliar material. Budget roughly 30 minutes per question. For a scenario question, spend the first minute writing the concept name and its definition, then the rest applying it · that guarantees the definition marks before you risk anything on the application. For a question with parts (a), (b), (c), split the time by the marks shown, not evenly: a 3-mark part deserves a third of what an 8-mark part gets.