Volume II · drill pack · the real past paper · walk-in cheatsheet

CMS 706 · Practice, Model Answers & Final Recall

The companion to Volumes I and III. Rather than invent a mock paper, this volume drills the lecturer's own paper of 14/07/2026 question by question, then works every SQL question from the older CMS 445 paper, then hardens the definitions with recall and trap drills.
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 to use this pack

Time you haveDo this
3 hoursSit the real paper (§1) closed-book, choosing five questions exactly as you will on the day → mark yourself against §2 and Volume III → re-read whatever you could not attempt → §5 traps → sleep.
90 minutes§1 questions 1–3 written out in full → the SQL drills (§3) → the ER drill (§2 Q4) → §5 traps.
45 minutesAnswer plans in §2 read as a checklist → rapid-fire recall (§4) → §5 traps → §6 walk-in sheet.
10 minutes at the door§6 only.

The single most valuable habit for this paper: every scenario question gets two paragraphs · the first defines the concept in the notes' own words, the second applies it to the hospital, supermarket, bank or ride-sharing firm you were given. Students who write only the first get half marks; students who write only the second get less.

1The real paper · sit this closed-book

RIVERS STATE UNIVERSITY · FACULTY OF SCIENCE · DEPARTMENT OF COMPUTER SCIENCE
DTS 304: Data Management I · 2025/2026 session · 14/07/2026 · Time allowed: 3 hours
Instructions · attempt any FIVE (5) questions · Lecturers: Dr. Igiri Chima and the lecturer Ominini M.

QQuestionMarks
1(a) A hospital replaces its paper records with a DBMS. i. Identify the required hardware and software. ii. Explain benefits. iii. Discuss implementation challenges. (b) i. Explain how adding new database fields affects logical independence. ii. Describe the importance of data as a database component. iii. Why is user consent important when collecting customer data?8 + 6
2(a) i. Explain the relationship between databases and data science. ii. Describe how data masking protects sensitive information. iii. A supermarket chain records millions of customer transactions daily · explain the difference between data and information using this scenario. (b) A healthcare company stores patient records for ten years before deletion. Outline and discuss the stages of the data lifecycle involved.6 + 8
3(a) As a data scientist you received a dataset from three different countries with varying languages, currencies and date formats. Outline a comprehensive data cleaning plan. (b) i. A bank database contains over 20 million customer records · explain how indexing improves query performance. ii. A ride-sharing company collects GPS locations every second · explain how this data supports business decision-making. iii. A social media platform stores videos, images and comments, XML documents, audio recordings, emails, a customer database and a JSON file · classify each under the data formats you have studied.8 + 6
4Design an ER diagram for a bank storing customers, accounts, branches and employees. Customer identified by SSN, with name, multiple phone numbers and occupation. Account identified by account number and its branch, with balance and type. An account belongs to one or more customers; a customer may have any number of accounts; an account belongs to exactly one branch; branches may have multiple accounts but are not required to have any. Branch identified by branch code, with location and number of employees. Employee identified by SSN, with name and salary; works for exactly one branch; branches have one or more employees; an employee is contact for zero or more customers; every customer has at most one employee as contact.14
5(a) Given professor(profname, deptname), department(deptname, building), committee(profname, commname): i. professors in any one of Smith's committees; ii. professors in at least all of Smith's committees; iii. professors in exactly Smith's committees; iv. professors with an office in the ICICS building. (b) Describe complexity, failed attempts and expired passwords in a password policy and explain how each protects the database.9 + 5
6(a) With the aid of a good diagram describe the phases of query processing in a DBMS, stating the function of each stage. (b) State what is wrong with each query and give a solution: i. select d_no from BusDriver where d_no = 07; on BusDriver(bdno varchar2(5), bdname varchar2(50), …). ii. select bdno, bdname from BusDriver, Depot where bdsalary > 5000 and dname = 'Hornsey' and BusDriver.dno = Depot.dno and bdsalary < 2000;8 + 6
7(a) As leader of the data design team for an inventory tracking system, bring a work plan identifying the phases of data design, giving for each: a description, the inputs, the outputs and a key issue addressed. (b) What is meant by concurrent execution of database transactions in a multiuser system, and why is concurrency control needed? (c) Explain the meaning of "transaction" in the context of database interactions.8 + 4 + 2
Choose your five before you write a word. Questions 1, 2 and 3 come straight out of the class notes · take all three. That leaves two to find among 4–7. Judge them on what you can actually produce: Q7 is the cheapest of the four if you have the data-design table memorised (and 7(b) and 7(c) are pure notes material); Q6 is next if you can draw the three-stage diagram; Q4 is worth 14 marks on one diagram, which is high reward but all-or-nothing; Q5 is the hardest unless the division idiom is solid.

2Answer plans, question by question

Q1 · the hospital DBMS

(a) Split into hardware (server, storage/RAID, backup, workstations, network, UPS, scanners) and software (DBMS, EHR application, OS, security software, backup software, reporting tools) · a list each, not a paragraph. Benefits: give the five DBMS advantages from Volume I §5 plus the healthcare benefits · improved patient care, faster diagnosis, reduced errors. Challenges: cost, data migration of paper records, staff training and resistance, privacy and compliance, integration with lab and imaging systems, downtime, and the need for a DBA. FULL TEXT IN VOL III §8

(b) Three short answers: logical independence · adding a field changes the conceptual schema but the external schema and applications are unaffected, which is precisely what logical data independence means, and it fails only where an application depends on schema shape (e.g. SELECT *) · data as a component · of the four components, data is the substance; relationships, constraints and schema exist only to organize and protect it · consent · the first principle of information privacy, protects against identity theft and misuse, is a legal requirement under GDPR/HIPAA/Nigerian law, and builds the trust that keeps customers sharing data.

Q2 · data science, masking, data vs information, lifecycle

(a) Databases and data science · supply and consumption: the database is the organized store, data science extracts insight from it; step 1 of the data science process is "collect from databases"; without data, analysis is impossible. Masking · hides part of a sensitive value (xxx 1234) so the record stays usable but the sensitive digits are never shown, protecting against exposure to staff, testers and attackers. Data vs information · the table from Volume I §2, then the supermarket applied: raw till records vs "bread sales rose 18% in June".

(b) The eight lifecycle stages walked through a patient record, with the ten-year retention called out at the archiving stage as a legal requirement and deletion justified by data minimization. 8 marks means eight stages · write all eight.

Q3 · cleaning, indexing, GPS, formats

(a) The eight-step cleaning plan (Vol III §8): profile → standardize dates to ISO → normalize currency at a stated rate → fix language and encoding → deduplicate → handle missing values → correct types and units → validate and document. Name the problem each step fixes · that is where the marks are.

(b) Indexing · without it a linear search checks all 20 million rows; the index (a B-tree) is searched instead, the pointer located and only the matching row retrieved; the WHERE clause benefits; the cost is extra storage and slower writes. GPS · the six DDDM steps applied: route optimization, demand forecasting, dynamic pricing, driver safety monitoring, accurate ETAs, expansion planning. Formats · unstructured: videos, images, comments, audio; semi-structured: XML, emails, JSON; structured: the customer database.

Q4 · the ER diagram

Work in this order and you cannot go wrong: 1. four rectangles · Customer, Account, Branch, Employee. 2. key attributes underlined, then the rest; phone as a double ellipse. 3. four diamonds · has, held at, works for, contact. 4. cardinalities: M:N, N:1, N:1, 1:N. 5. double lines where participation is total. 6. a one-line note under the diagram justifying each cardinality by quoting the requirement it came from · that sentence is what separates 14 from 9. DRAWN IN VOL III §1

Q5, Q6, Q7

Q5(a) · recognise which of the three shapes you have: "any one of" → IN; "at least all" → division (double NOT EXISTS or HAVING COUNT); "exactly" → division plus a count equality. (iv) is a plain join through department. Q5(b) · three features, each with what it is and what attack it stops.
Q6(a) · draw parser → optimizer → evaluation engine, with catalog/statistics feeding the optimizer and data feeding the engine; name the output of each stage. Q6(b) · (i) the column does not exist, so it fails at parsing; (ii) the predicate is self-contradictory, so it always returns empty.
Q7(a) · the five-phase table. Q7(b) · define interleaved execution, give the reason (throughput, reduced waiting), then the four problems it causes. Q7(c) · two marks, one sentence: a sequence of actions representing a logical unit of work.

3SQL drills · every query from the older paper, worked

Paper A question 1 gives EMP(empno, deptno, ename, salary, Designation, joiningdate, DOB, city). These five are the most likely shape of any SQL asked of you.

#RequiredQuery
iEmployee name and number in increasing order of salary
SELECT ename, empno FROM EMP ORDER BY salary ASC;
iiEmployee name and number, department-wise
SELECT deptno, ename, empno FROM EMP ORDER BY deptno, ename;
iiiTotal salary of all employees
SELECT SUM(salary) AS total_salary FROM EMP;
ivEmployees whose name starts with "S" and who work in deptno 1002
SELECT ename FROM EMP
WHERE  ename LIKE 'S%' AND deptno = 1002;
vIncrease salary by 20% for employees who joined after 1/1/2005
UPDATE EMP
SET    salary = salary * 1.20
WHERE  joiningdate > '2005-01-01';

Further drills on the class StudentDB table

RequiredQuery
Names of students aged 30 or overSELECT Name FROM StudentDB WHERE Age >= 30;
All female studentsSELECT * FROM StudentDB WHERE Sex = 'F';
How many students there areSELECT COUNT(*) FROM StudentDB;
Average age per departmentSELECT Dept, AVG(Age) FROM StudentDB GROUP BY Dept;
Departments with more than one studentSELECT Dept FROM StudentDB GROUP BY Dept HAVING COUNT(*) > 1;
The three oldest studentsSELECT Name, Age FROM StudentDB ORDER BY Age DESC LIMIT 3;
Students joined to their state and LGASELECT s.Name, s.Dept, t.State, t.LGA FROM StudentDB s JOIN Table2 t ON s.MatNo = t.MatNo;
Add a new studentINSERT INTO StudentDB (Name, MatNo, Age, Dept, Sex) VALUES ('Uche','2025/PGD/006',27,'Law','F');
Correct a departmentUPDATE StudentDB SET Dept = 'Maths' WHERE MatNo = '2025/PGD/003';
Remove a withdrawn studentDELETE FROM StudentDB WHERE MatNo = '2025/PGD/005';

The five mistakes that cost SQL marks

  1. Clause order. It is always SELECT … FROM … WHERE … GROUP BY … HAVING … ORDER BY … LIMIT. Nothing else parses.
  2. WHERE vs HAVING. WHERE filters rows before grouping; HAVING filters groups after. You cannot put COUNT(*) in a WHERE.
  3. Quoting. Text and dates take single quotes; numbers do not. deptno = 1002 but ename LIKE 'S%'.
  4. Forgetting the join condition in a two-table query · without it you get a cartesian product, every row against every row.
  5. Missing semicolon, or writing SELECT * when the question named the columns it wants.
The LIKE patterns worth memorising: 'S%' starts with S · '%s' ends with s · '%an%' contains "an" · '_a%' has "a" as the second character. % is any run of characters, _ is exactly one.

4Rapid-fire recall · cover the right column

PromptAnswer
Data, in one lineRaw, unprocessed facts, figures or symbols with no meaning on their own
Information, in one lineProcessed and organized data that is meaningful, useful and supports decisions
Data by natureQuantitative (measured) · qualitative (descriptive)
Six core components of information managementCollection · storage · organization · processing · retrieval · security
Eight stages of the data lifecycleCreation · collection · storage · processing · analysis · distribution · archiving · deletion
Data science, in one lineA multi-disciplinary field using data, algorithms and scientific methods to extract insight and knowledge
Five steps of using data in data scienceCollect · clean · analyse · build models · decide
Six steps of DDDMCollection · processing · analysis · interpretation · decision · prediction
MetadataData about data · describes, explains and locates an information resource
Three data collection techniquesManual · sensor-based · API-based
Three data formatsStructured · semi-structured · unstructured
Where JSON, XML and email sitSemi-structured
File-based storage's five weaknessesRedundancy · inconsistency · difficult sharing · poor security · no relationships
Five DBMS advantagesReduced redundancy · integrity · security · easy retrieval · multi-user access
Five components of an IRSData collection · indexing system · query processor · search engine · user interface
Four types of indexPrimary · secondary · clustered · non-clustered
Two costs of indexingExtra storage · slower updates
B-tree vs hashingB-tree is balanced, sorted and supports range queries; hashing is very fast look-up but collides and cannot do ranges
PromptAnswer
Six techniques for efficient queriesUse an index · avoid SELECT * · use WHERE properly · use JOIN efficiently · limit results · use aggregation carefully
What the query optimizer doesChooses the best execution plan by reducing disk access, reducing CPU usage and using indexes and statistics
Five principles of privacyConsent · purpose limitation · data minimization · transparency · accountability
Three privacy regulationsGDPR (Europe) · HIPAA (healthcare) · local data protection laws (Nigeria)
Five data protection techniquesEncryption · access control · backup and recovery · data masking · firewalls and antivirus
Five security threatsMalware · phishing · unauthorized access · SQL injection · data breaches
Six security controlsAuthentication · authorization · encryption · firewalls · monitoring and auditing · update and patching
Four components of a databaseData · relationship · constraints · schema
Definition of a databaseA collection of interrelated data stored with controlled redundancy to serve one or more applications in an optimal fashion
Seven services of the DBMSTransaction · concurrency · recovery · security · language interface · storage · data catalog management
Three limitations of the file-based systemSegregation and isolation · duplication · data dependency
Four database models (plus two)Hierarchical · network · relational · object oriented; also object-relational and deductive
What makes the network model differentMany-to-many (n-n) · records may have more than one parent
Three levels of the ANSI/SPARC architectureExternal/view · conceptual/logical · internal/physical
Two types of database architectureClient–server · three-tier
Logical vs physical independenceChange the logical schema without touching applications · change the storage without touching the logical schema
The four SQL sub-languagesDQL SELECT · DML INSERT/UPDATE/DELETE · DDL CREATE/ALTER/DROP · DCL/TCL GRANT/REVOKE/COMMIT/ROLLBACK
Transaction, ACID and its delimitersA logical unit of work · atomicity, consistency, isolation, durability · BEGIN … COMMIT / ROLLBACK

5Spot the error · every statement is wrong except four

#StatementT / FCorrection
1Data and information mean the same thing in a database context.FData is raw and meaningless on its own; information is processed, organized and useful for decisions.
2An email is unstructured data.FEmail is semi-structured · it has headers and fields, so it has some structure without being a table.
3Indexing makes every database operation faster.FIt speeds reads but costs extra storage and slows inserts and updates, which must maintain the index.
4Hashing is the best choice for range queries.FHashing is not suitable for range queries · that is the B-tree's strength.
5All leaf nodes of a B-tree are at the same level.TCorrect · that is what "balanced" means, and it is why performance is consistent.
6The hierarchical model supports many-to-many relationships.FIt does not · a child has one parent. The network model introduced n-n.
7The DBA works at the external level of the ANSI/SPARC architecture.FThe DBA works at the conceptual/logical level. The external level is what users see.
8Physical data independence means applications survive a change to the logical schema.FThat is logical independence. Physical independence is surviving a change to storage · e.g. HDD to SSD.
9DELETE is a DDL command.FDELETE removes rows and is DML. DROP removes the table and is DDL.
10COMMIT makes a transaction's changes permanent.TCorrect · and ROLLBACK returns the transaction to its original state.
11Concurrency control exists to make transactions run faster.FConcurrency exists for speed; concurrency control exists to preserve consistency while allowing it.
12A cache of one transaction reading another's uncommitted data is called a dirty read.TCorrect · and if that transaction then aborts, the reader used data that never existed.
13Encryption and data masking are the same technique.FEncryption converts data into an unreadable format that can be decrypted; masking hides part of a value and is not reversed for the viewer.
14A weak entity is drawn as a double rectangle.TCorrect · and a multivalued attribute is a double ellipse, total participation a double line.
15An M:N relationship maps to a foreign key in one of the two tables.FM:N needs a new table holding both keys. Only 1:N maps to a posted foreign key.
16Fragmentation means keeping copies of the same data at several sites.FThat is replication. Fragmentation is dividing a relation into pieces stored at different sites.

6Walk-in sheet · the last ten minutes

The ten facts most likely to be tested

  1. Data = raw, meaningless · information = processed, meaningful, supports decisions
  2. Lifecycle (8): creation · collection · storage · processing · analysis · distribution · archiving · deletion
  3. Formats: structured = tables · semi-structured = JSON, XML, email · unstructured = video, image, audio, comments
  4. Indexing speeds reads via a B-tree; costs storage and slows writes. Hashing = fast look-up, no ranges
  5. Database = interrelated data with controlled redundancy · components: data, relationship, constraints, schema
  6. 7 DBMS services: transaction · concurrency · recovery · security · language interface · storage · data catalog
  7. ANSI/SPARC: external (users) · conceptual (DBA) · internal (storage). Logical vs physical independence
  8. SQL: DQL SELECT · DML INSERT/UPDATE/DELETE · DDL CREATE/ALTER/DROP · DCL/TCL GRANT/COMMIT/ROLLBACK
  9. ER: rectangle = entity · ellipse = attribute · diamond = relationship · double line = total participation
  10. Query processing: parse and translate → optimize → evaluate. Transaction = a logical unit of work; ACID

The five privacy principles, in order

Consent · purpose limitation · data minimization · transparency · accountability. Every privacy or consent question is answered by naming these and applying two or three.

Three moves in the first five minutes

  1. Read all seven questions. Take the three built on the class notes, then pick the two of the remainder you can actually finish.
  2. For every scenario question write the definition first, then the application. Never one without the other.
  3. Count the marks and count your points: an 8-mark part wants eight things, not three.

If your mind goes blank

Write the definition, then the numbered list that belongs to it, then one example, then apply it to the scenario in the question. Every answer on this paper is built from those four moves, and each scores on its own.