Requirements Analysis

Collecting Requirements

A database can only be as correct as the requirements it was built from. This lesson shows how to extract precise, traceable requirements from people who describe their work in prose, in a hurry, and with contradictions.

Beginner

Learning objectives

  • State what makes a statement a usable requirement
  • Identify the stakeholders of a system and what each of them can and cannot tell you
  • Choose the right elicitation technique for a given situation
  • Run a requirements interview without asking leading questions
  • Record requirements with identifiers, sources and volumes so that later phases can be verified against them

Prerequisites

  • Module 1: Database Fundamentals

Introduction

Everything that follows in this course depends on what happens here. The conceptual schema of Module 3 is a formalisation of the requirements produced in Module 2; the relational schema of Module 5 is a translation of that conceptual schema; the SQL of Module 8 is an implementation of that relational schema. If the requirements are wrong, every subsequent artefact is a precise, elegant, rigorously normalised implementation of the wrong thing.

This is not a rhetorical warning. It is the single most common cause of failed database projects, and it is invisible in code review: nothing in a well-written CREATE TABLE statement reveals that the organisation never actually needed that table.

There is a second, subtler reason why this phase matters. Requirements are not found; they are constructed through conversation. The people who know the domain do not think in terms of entities, attributes and cardinalities — they think in terms of their daily work, their exceptions, their frustrations with the current system and the rules they apply without noticing. Your job in this phase is to convert that prose into statements precise enough that a machine can later enforce them.

What a requirement is

Requirement

A requirement is a statement of something the system must do or must be, expressed precisely enough that (a) two competent people reading it independently reach the same conclusion, and (b) it is possible to decide, at the end of the project, whether it has been satisfied.

That definition carries four tests. A statement that fails any of them is not yet a requirement; it is a wish, a note, or a misunderstanding.

Test Question to ask Failing example Fixed version
Unambiguous Can this be read in two ways? "The system must handle members." "The system must store, for each member, name, surname, fiscal code, e-mail and membership expiry date."
Verifiable Can I prove it is satisfied? "The system must be fast." "A search by title must return the first 20 results in under 300 ms with 50 000 books and 200 concurrent users."
Traceable Who asked for this, and why? A requirement nobody remembers requesting R7 — requested by the head librarian, interview of 12 March, needed because loans are currently tracked on paper
Necessary What breaks if we omit it? "The system must have a nice logo." Deleted — it is a design preference, not a requirement

The verifiable test is where most projects quietly fail. "The system must be user-friendly" and "the system must be scalable" cannot be verified, therefore cannot be designed for, therefore will not be delivered. A requirement that cannot fail cannot pass either.

Who the stakeholders are

A stakeholder is anyone who affects the system or is affected by it. Missing one is the second most common cause of failure, after accepting the first person's description as complete.

Stakeholder What they know What they often cannot tell you How to involve them
Owner / sponsor Why the project exists, budget, deadlines, priorities Daily operational detail One or two meetings; decides conflicts
Operational users The real workflow, including every workaround Why the rule exists, or what happens at scale Interviews and observation
Domain expert The rules, the exceptions, the regulations What is technically feasible Workshops, iterative review
IT / operations Existing systems, integrations, constraints Business priorities Interviews about interfaces and volumes
External parties Contracts, formats, obligations Internal processes Document analysis
Regulators / auditors Legal obligations, retention periods Anything about implementation Document analysis, checklist
Future users Nothing yet — and this is the point Their own future needs Represent them explicitly; argue about generality

Sources of requirements

Requirements come from five kinds of source, and each has a characteristic failure mode if it is the only one used.

  1. People — interviews, workshops, questionnaires. Rich in exceptions, poor in completeness; people describe what they did last week, not the full rule set.
  2. Documents — forms, procedures, regulations, contracts, invoices, reports. Excellent for rules and formats; systematically out of date.
  3. The existing system — its screens, its reports, its database, and above all its spreadsheets. Reveals what people actually need, including needs the official process denies.
  4. Observation — watching the work happen. Reveals workarounds that nobody mentions because they feel like cheating.
  5. The data itself — real samples of the documents, codes, names and addresses the system must hold. Reveals quality problems, formats and volumes that no interview will mention.

Elicitation techniques

No single technique is sufficient. The skill is matching the technique to what is still unknown.

Technique Best for Weak for Typical cost
Interview Exceptions, motivations, tacit rules Completeness; you only learn what you thought to ask Low per interview, high in total
Questionnaire Many dispersed users, priorities, satisfaction Discovering unknown unknowns Low, but low yield
Observation / shadowing Real workflow, workarounds, interruptions Rare events; the observer changes behaviour Medium
Document analysis Rules, formats, legal obligations, retention Anything not written down Medium
Workshop (JAD) Resolving conflicts, agreeing on scope quickly Detail; dominant personalities High per session
Prototyping Clarifying screens, reports, terminology Structure of the data Medium to high
Reverse engineering the current system Volumes, real attribute sets, edge cases Intent — you see what exists, not what is needed Medium
Sampling the data Formats, quality, cardinalities Rules that no current row exercises Low

A practical sequencing that works on most projects: document analysis first (so you arrive informed and do not waste the interview on what a form already says), then interviews and observation, then a workshop to resolve contradictions, then prototyping of the ambiguous parts, and finally data sampling to size everything.

Running the interview

An interview about requirements is not a conversation about software. It is a structured attempt to make someone's tacit knowledge explicit, and it has a preparation phase, a questioning phase and a recording phase.

Before the interview

  • Read everything that already exists about the domain: forms, reports, procedures, the old database schema.
  • Write down the five to ten things you must leave with. If you cannot list them, you are not ready.
  • Ask for artefacts: "please bring the form you fill in most often, and one real example of it, filled in".
  • Announce the purpose: "I need to understand how loans work today, including the exceptions. I am not evaluating anyone's work."

During the interview

Four question families, used in this order.

1. Open, narrative questions — start wide, let the interviewee talk.

"Walk me through a typical day at the desk, from opening to closing."

2. Probing questions — follow the nouns and verbs they used.

"You said you 'check whether the member can borrow'. What exactly do you check, and where do you look?"

3. Exception questions — this is where the real rules live.

"What happens when a book is returned damaged?" "What if the member has lost their card?" "What if the same person is both a member and a supplier?" "What happens when the system is down?"

4. Quantification questions — numbers, always.

"How many loans per day, on average and at peak?" "How many books are in the catalogue? How many members?" "How long must a loan record be kept after it is returned?"

After the interview

Within the same day, while memory is fresh:

  1. Transcribe the facts, not the conversation. Not "she said loans are complicated", but "a loan is created at the desk; a member may hold at most 5 active loans; a loan is 30 days for students, 60 for staff".
  2. Separate what was said from what you inferred. Mark inferences explicitly; they must be confirmed.
  3. Send the summary back. "Here is what I understood; please correct anything wrong." This single step catches a large fraction of misunderstandings, and it is the cheapest quality control in the project.
  4. Record open questions. An unanswered question is an asset, not a failure — as long as it is written down.

From prose to requirements: the register

The output of elicitation is prose. The output of the phase is a requirements register: a table where each row is one requirement, with an identifier, a source and enough numbers to be verifiable.

ID Requirement Type Source Verification
R1 The system must record, for each member, name, surname, fiscal code, e-mail, phone and membership expiry date Functional Head librarian, 12/03 Field-by-field check against the membership form
R2 A member may hold at most 5 active loans at any time Functional (rule) Head librarian, 12/03 Attempt a 6th loan; it must be refused
R3 A loan lasts 30 days for students and 60 days for staff Functional (rule) Regulation art. 7 Loan a book with each membership type; check the due date
R4 A search by title must return results in under 300 ms with 50 000 books Non-functional (performance) IT manager, 19/03 Load test at 50 000 books
R5 Loan records must be kept for 5 years after return Non-functional (legal) Regulation art. 22 Inspect retention policy and purge job
R6 A member with an overdue loan cannot create a new loan Functional (rule) Observation, 14/03 Create an overdue loan; attempt a new loan

Three properties of a good register:

  • Identifiers are stable. R1 stays R1 forever. Later phases cite them: "the LOAN relation implements R2, R3 and R6".
  • Sources are recorded. When a requirement is challenged in month six, you can go back to the person who asked for it.
  • Verification is written at the same time as the requirement. If you cannot write the verification, the requirement is not yet verifiable — fix it now, not after implementation.

The numbers you must collect now

Design decisions that look like matters of taste are usually matters of volume. Collect these before Module 3, because they determine cardinalities, indexes and even whether a construct is worth modelling at all.

Number Why the designer needs it Example question
Cardinality of each entity Whether an index is needed; whether a "small" table can be cached "How many books? How many members?"
Growth rate Whether the design must survive 10× "How many new loans per month?"
Peak frequency Concurrency, locking, transaction boundaries "How many loans in the busiest hour?"
Retention period Whether history is archived or kept online "How long must we keep returned loans?"
Ratio of active to total Whether "current" and "historical" data should be separated "Of 50 000 books, how many are on loan right now?"
Attribute size Storage and index width "How long is a typical title? The longest?"

Conflicts and arbitration

Two stakeholders will contradict each other. This is normal and it is information, not noise.

  • The librarian wants loan history kept forever, for reader advice.
  • The IT manager wants it purged after five years, for cost and privacy.

Both are right within their own constraint. Your job is not to choose silently; it is to record the conflict, the options and the decision, with the name of whoever decided.

A conflict register entry looks like this:

C3 — Retention of loan history. Librarian requests indefinite retention for recommendation features; IT requests purge at 5 years for GDPR and storage. Options: (a) keep online 5 years, archive to cold storage indefinitely; (b) purge at 5 years; (c) keep anonymised aggregates indefinitely, purge personal data at 5 years. Decision (owner, 20/03): option (c). Consequence for the design: LOAN must allow the member reference to become null or be anonymised while the loan row survives.

That last line is the reason this section exists. A conflict resolved in words becomes a design constraint — here, an optional relationship between LOAN and MEMBER — and if the conflict had been resolved silently in someone's head, the constraint would have been discovered after implementation.

The deliverable of this phase

The phase produces one document, the requirements document. Its structure is stable across projects:

  1. Purpose and scope — what the system is for, what is explicitly out of scope.
  2. Stakeholders — who they are and what each one cares about.
  3. Glossary — one definition per term, agreed with the domain expert. (Detailed in the lesson on the glossary.)
  4. Domain description — how the organisation works today, in prose, including the current system and its problems.
  5. Functional requirements — the register.
  6. Non-functional requirements — volumes, performance, security, retention, availability.
  7. Business rules — the constraints that hold regardless of software.
  8. Conflict register and decisions — including the design consequences.
  9. Open questions — with an owner and a date.
  10. Traceability matrix — requirement → source, and later requirement → design artefact.

Worked example: an interview becomes requirements

Here is an extract of a real-style interview about the library. Read the transcript, then the extraction.

Analyst: Walk me through a typical loan. Librarian: The member comes with the book, I read their card, I check in the system that they don't have too many books out, and I register the loan. Then they get 30 days, or 60 if they're staff. Analyst: What does "too many" mean? Librarian: Five. But students in the thesis programme can have eight, because they need the references. Analyst: And if the card is expired? Librarian: I renew it if they pay the fee. If they don't pay, no loan. Analyst: What about reservations? Librarian: If the book is out, they can reserve it. When it comes back I put it aside for three days and call them. If they don't come, it goes to the next in the queue, or back on the shelf. Analyst: How many loans a day? Librarian: Now? About 120. In exam weeks, 400. Analyst: How do you know who to call? Librarian: The phone number is in the card file. Some have e-mail, but we don't always have it.

From those seven answers, here is the register:

ID Requirement Note
R1 A member has at most 5 active loans Default rule
R2 A member in the thesis programme has at most 8 active loans Exception to R1 — needs an attribute distinguishing the two
R3 Loan duration is 30 days for students, 60 for staff Duration depends on membership type
R4 An expired membership blocks new loans Rule with an operational consequence
R5 Membership can be renewed on payment of a fee Introduces a payment event
R6 A reservation can be placed only when no copy is available Precondition
R7 A reservation expires after 3 days and passes to the next in the queue Time-dependent state — needs an expiry date, not just a flag
R8 About 120 loans per day, 400 at peak Volume — drives the index design in Module 7
R9 Member contact data: phone always, e-mail sometimes Optional attribute — this is why "e-mail" cannot be mandatory

Look at what those nine lines already decide, before any diagram exists:

  • R2 forces a distinction between member categories — which in Module 3 becomes a generalisation or an attribute, a decision with real consequences.
  • R7 forces the reservation to have an expiry date and a position in a queue, not a boolean "reserved".
  • R9 forces optionality on the e-mail, which becomes a nullable column in Module 5 and a NULL policy in Module 7.
  • R8 tells you that the loan table will hold roughly 120 × 365 ≈ 44 000 rows per year, and 220 000 over five years — a number that decides, in Module 7, whether an index is a luxury or a necessity.

Common mistakes

Mistake Why it hurts What to do instead
Interviewing one person and calling it complete One perspective, systematically blind to exceptions At least one operational user, one owner, one document source
Accepting solutions as requirements Locks design before the problem is understood Ask "what need does that screen serve?" and record the need
Skipping the numbers Cardinalities and indexes guessed Collect volumes, peaks, growth and retention in this phase
Not writing the verification Unfalsifiable requirements, discovered as failures at acceptance Write the test with the requirement
Recording prose instead of a register Nothing is traceable, nothing is checkable One row per requirement, with ID and source
Resolving conflicts silently The constraint appears after implementation Conflict register with options, decision and consequence
Ignoring the current system's data Formats and volumes discovered too late Sample real data; count real rows
Treating open questions as failures They get invented answers instead of being asked Keep an open-questions list with owners

Summary

  • A requirement must be unambiguous, verifiable, traceable and necessary. Failing any of the four, it is not yet a requirement.
  • Requirements are constructed through elicitation, not found in a drawer. Each source — people, documents, the existing system, observation, data — sees a different part of the truth.
  • The interview has a preparation, a questioning and a recording phase; the exception questions and the quantification questions carry most of the value.
  • The output is a register with stable identifiers and sources, so that every later artefact can be traced back and defended.
  • Volumes, peaks, growth and retention belong to this phase, because they decide cardinalities, indexes and even whether a construct is worth modelling.
  • Conflicts are resolved on paper, with a named decider, and their design consequences recorded.

Verification questions

Beginner

Check your understanding

  1. Why is "the system must be easy to use" not a requirement?
  2. Give an example of a statement that is a solution disguised as a requirement, and rewrite it as a requirement.
  3. Which question family would you use to discover that a library also lends DVDs, and why?
  4. Why must volumes be collected before conceptual design rather than during physical design?
  5. A stakeholder says "we keep a list of members in Excel". What are the three most valuable things to ask next?
Show the answers
  1. Because it cannot be verified: there is no observation that would prove it false. A requirement that cannot fail cannot be shown to be satisfied. A verifiable version would state a task, a population and a threshold: "a librarian must be able to register a loan in under 30 seconds after scanning the card".
  2. "We need a MEMBER table with an email column." The need behind it is contact: "the system must be able to contact a member about a reservation, by phone or e-mail". Rewriting it as a requirement also exposes the real question — e-mail is optional, phone is not.
  3. Exception questions: "which items can be loaned — only books, or also DVDs, maps, laptops? Is there any item type we have not mentioned?" Open narrative questions tend to stay on the main path; exceptions surface the variants.
  4. Because volume decides structure: whether a "current loans" table needs to be separated from history, whether a relationship is worth modelling, whether a 1:N becomes a table. Discovering at physical-design time that there are 20 million rows forces a structural change that belongs to conceptual design.
  5. (a) Ask for a copy and inspect the columns — each column is an attribute someone genuinely needed. (b) Ask why each column exists — some are workarounds, some are rules. (c) Ask how many rows, and how they are kept unique — this reveals both the volume and the identifier, which is the hardest thing to get right in Module 3.

Exercise

Intermediate

From transcript to register

Below is a short interview with the manager of a car repair workshop. Produce a requirements register of at least eight requirements, with IDs, and mark for each one whether it is functional, a business rule, or non-functional. Then list three questions you would have asked and were not asked here.

Manager: A customer calls, we take the car in, we write down the plate, the model and what's wrong. Then a mechanic looks at it and we call the customer with an estimate. If they say yes, we order the parts and fix it. If not, they pay for the inspection and take the car. Analyst: How do you know what parts you used? Manager: We write them on the job sheet. Sometimes we forget, honestly. Analyst: Can the same car come back? Manager: Of course, some customers come twice a year. Analyst: Who can see the estimates? Manager: Me and the accountant. The mechanics shouldn't, they'd argue about the prices. Analyst: How many jobs per week? Manager: Thirty, forty. But in November, with winter tyres, we do ninety.

Show the commented solution

A workable register:

ID Requirement Type
R1 For each vehicle the system stores plate, make, model and owner Functional
R2 A vehicle can be brought in for many repairs over time; each repair is a separate job Functional (structural)
R3 A job records the reported fault in free text Functional
R4 A job has an estimate, produced after inspection, with a total amount Functional
R5 A job can be authorised or refused by the customer; a refusal closes the job with a payable inspection fee Business rule
R6 Parts used must be recorded on the job Functional — and R6 is the requirement the current process fails, since "sometimes we forget"
R7 Only the manager and the accountant can read estimate amounts Non-functional (security)
R8 About 35 jobs per week, 90 at peak in November Non-functional (volume)
R9 Repair history must be retained for at least the life of the vehicle's presence in the workshop Non-functional (retention) — ambiguous, see below

What the register already reveals. R2 is the sentence that determines the whole schema: "some customers come twice a year" means a vehicle is not a job, and the relationship between them is 1:N over time. An analyst who missed it would build one table with the vehicle data duplicated in every row. R6 is not a new feature; it is a diagnosis of the current system, and its design consequence is that parts must be attached to a job rather than to a text field.

The three questions that were not asked:

  1. "Is the plate enough to identify a vehicle?" — it is unique per vehicle, but the same plate can change owner, and a workshop serves cars, not owners. This is the identifier question of Module 3 arriving early.
  2. "Where do parts come from — a catalogue, or free text?" — if there is a supplier catalogue, PART is an entity with a price history; if it is free text, the design is different and cheaper. Nobody asked, so the designer would have guessed.
  3. "What does 'estimate' mean legally — is an accepted estimate a contract?" — this decides whether authorisation must be recorded with a date, a signature or a timestamp, and whether it is auditable.

Note also R9: "for at least the life of the vehicle's presence" is not verifiable. The correct move is to take it back to the manager and convert it into a number ("seven years after the last job on that vehicle"), not to write it down as is.

Where to go next

Related lessons