Skip to content

Session 3

Software Requirements Specification for the Railway Reservation System

Updated View as Markdown

This session produces the Software Requirements Specification (SRS) for the Railway Reservation System (RRS) whose scope you wrote in Session 1 and whose size you estimated in Session 2. The SRS is the contract between the people who want the system and the people who will build it. Every design decision in Sessions 5 and 6, every test case in Session 8, and the program in Session 13 must point back to a numbered requirement on this page. If a requirement is missing or vague here, the mistake travels through every later session and costs the most to fix.

Objectives

Do not copy. Read for understanding and the viva
  • Write an SRS in the IEEE 830 shape that the manual (section 1.3.2) asks for.
  • State each functional requirement as one numbered, testable “shall” sentence.
  • Cover all eight RRS modules and every business rule of the case study.
  • Write non-functional requirements with numbers, not adjectives.
  • Build a traceability table so later sessions can cite requirement IDs.

Problem Statement

Write in lab record

Develop SRS (Software Requirements Specification) for the Railway Reservation System (RRS).

Concept

Do not copy. Read for understanding and the viva

What an SRS is for

The scope statement (Session 1) says what the product is. The SRS says exactly what it must do, from the outside, without saying how. Designers read it to build the system. Testers read it to write test cases. The customer reads it to sign off. So it must be complete (nothing important left out), consistent (no two requirements contradict), unambiguous (one reading only), and verifiable (you can run a test that passes or fails).

The IEEE 830 shape

The manual gives the IEEE format: Introduction, Overall Description, Specific Requirements, Appendices. Section 1 tells the reader why the document exists and how to read it. Section 2 gives the background that makes the requirements understandable: who the users are, what the product sits next to, what limits apply. Section 3 is the real content: every requirement, numbered. Nothing in sections 1 and 2 is a requirement; if a sentence there says “shall”, move it to section 3.

Writing one requirement

A good requirement has the pattern: The system shall <verb> <object> <condition>. One requirement per sentence. Use “shall” for mandatory, “should” for desirable. Avoid “user friendly”, “fast”, “secure”, “etc.” because no test can check them. Compare:

WeakBetter
The system should be fast.The system shall return search results within 2 seconds for 95 percent of requests at 500 concurrent users.
Users can cancel tickets.The system shall allow the booking owner or a Reservation Clerk to cancel a booking by PNR before the train departs from the source station.

Functional versus non-functional

Functional requirements (FR) describe behaviour: input, processing, output. Non-functional requirements (NFR) describe qualities of the whole system: speed, security, uptime, ease of use, ease of change. Both get IDs. Here the FR ID is FR-<module>.<number>, so FR-4.3 is the third requirement of module 4 (Booking). NFRs are NFR-<letter><number>, for example NFR-P1 for performance.

Traceability

Traceability means every requirement can be followed forward to the design element, code, and test that satisfy it, and backward to the scope item or user need it came from. The table at the end of the SRS is the start of that chain. In Session 4 the DFD processes are numbered 1.0 to 8.0 to match the modules, so FR-4.x maps to process 4.0.

Software Requirements Specification

Write in lab record

Software Requirements Specification for the Railway Reservation System (RRS) Version 1.0, prepared for MCS-217 Session 3.

1 Introduction

1.1 Purpose

This SRS states the functional and non-functional requirements of the Railway Reservation System (RRS). It is written for the designers who will produce the modular design (Session 5) and user interface design (Session 6), the testers who will derive test cases, and the developers who will implement the system (Session 13). It also serves as the agreed statement of what the customer will receive.

1.2 Scope

The RRS is a web-based system through which passengers search trains, check seat availability, book and cancel tickets, and pay online; reservation clerks book and cancel at counters; and administrators maintain trains, routes, coaches, fares, and schedules and view reports. The system generates a unique PNR for every booking, maintains a waitlist per schedule and class, applies time-based refund rules on cancellation, and sends SMS and email notifications through an external service. Out of scope: Tatkal quota, concession categories, catering, parcel booking, and integration with the national railway network.

1.3 Definitions, acronyms and abbreviations

TermMeaning
RRSRailway Reservation System, the software described here
PNRPassenger Name Record, a 10-digit unique number that identifies one booking
ScheduleOne run of a train on one date
RouteThe ordered list of stations a train passes, with times and distances
ClassCoach class: SL (Sleeper), 3A (AC 3-tier), 2A (AC 2-tier), 1A (AC First)
BerthA seat in a coach; types LOWER, MIDDLE, UPPER, SIDE LOWER, SIDE UPPER
Waitlist (WL)Queue of bookings waiting for a seat in a class of a schedule
ClerkageFlat charge deducted from a refund
GatewayExternal payment gateway used for online payment
SRSSoftware Requirements Specification
FR, NFRFunctional requirement, non-functional requirement

1.4 References

  • IEEE Std 830-1998, Recommended Practice for Software Requirements Specifications.
  • Statement of Scope for RRS, Session 1.
  • Effort and cost estimate for RRS, Session 2.
  • MCS-213 Software Engineering, Block 1 (Requirements Analysis).

1.5 Overview

Section 2 describes the product, its users, environment, constraints and assumptions. Section 3 lists the specific requirements: functional requirements by module, external interfaces, and non-functional requirements. Section 4 gives the traceability table.

2 Overall Description

2.1 Product perspective

The RRS is a new, self-contained system. It replaces manual counter registers and a spreadsheet-based seat chart. It depends on two external systems: a Payment Gateway for online payment and a Notification Service for SMS and email. It stores all data in a single relational database shared by the web application and the counter application.

  Passenger (browser)        Reservation Clerk (counter PC)      Administrator (browser)
         |                              |                                  |
         +------------------------------+----------------------------------+
                                        |
                                 +-------------+
                                 |     RRS     |----------> Notification Service (SMS, email)
                                 | web server  |
                                 +-------------+<---------> Payment Gateway
                                        |
                                 +-------------+
                                 |  Database   |
                                 +-------------+

2.2 Product functions

The eight modules and their main functions:

NoModuleMain functions
1User ManagementRegister, login, logout, role control, profile update
2Train and Schedule ManagementMaintain stations, trains, routes, coaches, fares, schedules
3Search and AvailabilitySearch trains by source, destination, date; show seats and fare per class
4BookingCapture passengers, allocate seats or waitlist, generate PNR, PNR enquiry
5Cancellation and RefundCancel by PNR, compute refund, promote waitlist
6PaymentInitiate, confirm, fail, refund through the gateway; cash at counter
7NotificationSend booking, cancellation, waitlist and schedule-change messages
8ReportsOccupancy, revenue, cancellation reports for administrators

2.3 User classes and characteristics

User classDescriptionFrequency of useTechnical skill
PassengerPublic user who books for self or others onlineOccasionalLow; may use a phone browser
Reservation ClerkRailway staff at a counter; books and cancels on behalf of walk-in passengers, takes cashContinuous during counter hoursTrained on the system
AdministratorRailway operations staff; maintains master data and schedules, views reportsDailyTrained; understands railway operations
Payment GatewayExternal system; receives payment requests, returns resultEvery online paymentNot applicable
Notification ServiceExternal system; sends SMS and emailEvery booking eventNot applicable

2.4 Operating environment

  • Server: Linux, Python 3 web application, PostgreSQL 14 or later database.
  • Client: any browser released in the last three years, desktop or mobile, no plug-ins.
  • Counter PC: same browser client on the railway intranet, with a receipt printer.
  • Network: HTTPS over the public internet for passengers; intranet for clerks and administrators.

2.5 Design and implementation constraints

  • Card numbers and CVV shall never be stored; all card handling happens on the gateway page.
  • All timestamps are stored in Indian Standard Time.
  • The database is the single source of truth for seat allocation; no seat map is cached on the client.
  • The system must run on the hardware already available at counters (4 GB RAM PCs).
  • Development effort is bounded by the Session 2 estimate (225 adjusted FP, about 13,500 LOC).

2.6 Assumptions and dependencies

  • The Payment Gateway responds within 5 minutes to every payment request, with a final SUCCESS or FAILURE.
  • The Notification Service accepts messages through an HTTP API and reports delivery status.
  • Station codes, train numbers, and routes are supplied by the administrator from official railway data.
  • One train runs at most once per day, so (train_no, run_date) identifies a schedule.
  • Fares depend only on train, class, and distance; no dynamic pricing.

3 Specific Requirements

3.1 Functional requirements

Priority: M = must have, S = should have.

Module 1: User Management

IDRequirementPriority
FR-1.1The system shall allow a new user to register with name, email, mobile number, and password. Email and mobile shall each be unique across users.M
FR-1.2The system shall store passwords only as salted hashes and shall never display or email a password.M
FR-1.3The system shall authenticate a user by email and password and shall lock the account for 15 minutes after 5 consecutive failed attempts.M
FR-1.4Every user shall have exactly one role: PASSENGER, CLERK, or ADMIN. Only an ADMIN shall be able to create CLERK and ADMIN accounts; self-registration always creates a PASSENGER.M
FR-1.5The system shall allow a logged-in user to change mobile number and password after re-entering the current password.S
FR-1.6The system shall end a session after 20 minutes of inactivity and shall require login again.M

Module 2: Train and Schedule Management

IDRequirementPriority
FR-2.1The system shall allow an ADMIN to add and edit stations with station_code (2 to 5 upper-case letters, unique), name, and city.M
FR-2.2The system shall allow an ADMIN to add a train with train_no (5 digits, unique), name, type (EXPRESS, SUPERFAST, PASSENGER), and total_coaches.M
FR-2.3The system shall allow an ADMIN to define a route for a train as an ordered list of stations with arrival time, departure time, and cumulative distance in km. Sequence numbers shall start at 1 and increase by 1 with no gaps.M
FR-2.4The system shall allow an ADMIN to add coaches to a train with class (SL, 3A, 2A, 1A) and seat_count, and shall generate one Seat record per seat with seat_no and berth_type automatically.M
FR-2.5The system shall allow an ADMIN to set a fare rate_per_km for every (train, class) pair. A train shall not be schedulable until every class of its coaches has a fare.M
FR-2.6The system shall allow an ADMIN to create a schedule (train_no, run_date) with status SCHEDULED, and to change the status to CANCELLED or RESCHEDULED.M
FR-2.7The system shall reject a schedule whose run_date is earlier than the current date, and shall reject a duplicate (train_no, run_date).M

Module 3: Search and Availability

IDRequirementPriority
FR-3.1The system shall let any user, without login, search trains by source station, destination station, and travel date.M
FR-3.2The search shall return only trains whose route contains the source before the destination and which have a schedule on the given date with status SCHEDULED.M
FR-3.3For each train found, the system shall show train_no, name, departure time at source, arrival time at destination, distance, and journey duration, sorted by departure time.M
FR-3.4For each class of each train found, the system shall show the number of available seats, or “WL n” where n is the number of passengers already waitlisted in that class.M
FR-3.5For each class, the system shall show the fare per passenger, computed as rate_per_km multiplied by the distance between source and destination, rounded to the nearest rupee.M
FR-3.6The system shall refresh availability from the database at the time of each search; it shall not show cached counts older than 30 seconds.S

Module 4: Booking

IDRequirementPriority
FR-4.1The system shall allow only a logged-in PASSENGER or CLERK to start a booking.M
FR-4.2The system shall accept between 1 and 6 passengers per booking, each with name, age, gender, and berth_preference. A seventh passenger shall be rejected with a message.M
FR-4.3The system shall refuse a booking if the schedule status is not SCHEDULED or if the departure time at the source station has already passed.M
FR-4.4The system shall compute total_fare as the per-passenger fare (FR-3.5) multiplied by the number of passengers.M
FR-4.5When enough seats are free in the requested class, the system shall allocate one seat per passenger, honouring berth_preference where possible and keeping all passengers of one booking in the same coach where possible.M
FR-4.6When seats are not enough for all passengers, the system shall place the whole booking on the waitlist for that schedule and class with the next waitlist number. A booking shall never be split between confirmed and waitlisted passengers.M
FR-4.7The system shall hold allocated seats for 10 minutes while payment is pending and shall release them if payment is not successful within that time.M
FR-4.8On successful payment the system shall generate a unique 10-digit PNR, set the booking status to CONFIRMED or WAITLISTED, and record booking_time.M
FR-4.9The system shall let any user, without login, enter a PNR and see the train, date, passengers, allocated seats or waitlist numbers, and booking status.M

Module 5: Cancellation and Refund

IDRequirementPriority
FR-5.1The system shall allow the booking owner or a CLERK to cancel a booking by PNR, either all passengers or selected passengers.M
FR-5.2The system shall refuse cancellation after the departure time of the train at the source station.M
FR-5.3The system shall compute the refund per cancelled passenger from the hours between cancellation and departure at source: more than 48 hours, 100 percent of the fare minus a flat clerkage of 60 rupees; 48 hours down to 12 hours, 50 percent of the fare; less than 12 hours, no refund.M
FR-5.4When all passengers of a booking are cancelled the system shall set the booking status to CANCELLED; when some are cancelled the booking stays in its current status with the remaining passengers.M
FR-5.5When confirmed seats are released, the system shall promote waitlisted bookings of the same schedule and class in waitlist order, one booking at a time, only when the freed seats are enough for all passengers of that booking.M
FR-5.6For every cancellation with a non-zero refund the system shall create a Refund record and pass it to the Payment module for return to the original payment mode.M
FR-5.7The system shall automatically cancel every booking still WAITLISTED at departure time and refund the full fare without clerkage.S

Module 6: Payment

IDRequirementPriority
FR-6.1The system shall create a Payment record with amount equal to total_fare, mode (UPI, CARD, NETBANKING, CASH), and status INITIATED before contacting the gateway.M
FR-6.2For online modes the system shall send the amount and a unique order reference to the Payment Gateway and shall store the txn_ref the gateway returns.M
FR-6.3On a SUCCESS response the system shall set the payment status to SUCCESS and paid_at to the current time, then complete the booking (FR-4.8).M
FR-6.4On a FAILURE response, or no response within 5 minutes, the system shall set the payment status to FAILED and release the held seats (FR-4.7).M
FR-6.5For CLERK bookings the system shall accept mode CASH, skip the gateway, and mark the payment SUCCESS on the clerk’s confirmation.M
FR-6.6The system shall send refund instructions to the gateway for online payments and shall set the refund status to PROCESSED when the gateway confirms; cash refunds are marked PROCESSED by the clerk.M
FR-6.7The system shall never store card numbers, expiry dates, or CVV.M

Module 7: Notification

IDRequirementPriority
FR-7.1On booking completion the system shall send an SMS and an email to the booking user with PNR, train, date, source, destination, passengers with seats or waitlist numbers, and total fare.M
FR-7.2On cancellation the system shall send an SMS and an email with PNR, cancelled passengers, and refund amount.M
FR-7.3On promotion from waitlist the system shall notify the booking user with the new seat numbers.M
FR-7.4When a schedule is set to CANCELLED or RESCHEDULED the system shall notify every CONFIRMED and WAITLISTED booking on that schedule within 15 minutes.M
FR-7.5The system shall log every notification with time, channel, and delivery status, and shall retry a failed send up to 3 times at 5-minute intervals.S

Module 8: Reports

IDRequirementPriority
FR-8.1The system shall allow only an ADMIN to open the reports module.M
FR-8.2The system shall produce an occupancy report for a schedule showing, per class, total seats, confirmed, available, waitlisted, and percentage occupancy.M
FR-8.3The system shall produce a revenue report for a date range showing, per train and class, number of bookings, gross fare, refunds paid, and net revenue.M
FR-8.4The system shall produce a cancellation report for a date range showing count and refund total in each of the three refund time bands.M
FR-8.5The system shall allow every report to be downloaded as a CSV file.S

3.2 External interface requirements

User interfaces

ScreenUsersContent
Register, LoginAllForm fields with inline validation messages next to the field in error
SearchAllSource, destination, date; results table with class-wise availability and fare
Booking formPassenger, ClerkUp to 6 passenger rows, class, fare summary, proceed to pay
PNR statusAllPNR input; passenger list with seat or WL number and status
CancellationPassenger, ClerkPNR lookup, passenger tick boxes, refund preview before confirm
Admin consoleAdminTabs for stations, trains, routes, coaches, fares, schedules, reports

Every screen shall work at 360 px width (phone) and 1280 px width (desktop). Every error shall say what was wrong and what to do.

Hardware interfaces

  • Receipt printer at counters through the browser print dialog; the ticket page shall have a print layout on A5 paper.

Software interfaces

InterfaceDirectionProtocol and data
DatabaseRRS to PostgreSQLSQL over TCP; tables per the data dictionary in Session 4
Payment GatewayRRS to gateway and backHTTPS REST; request: order reference, amount, currency, return URL; response: txn_ref, status
Notification ServiceRRS to serviceHTTPS REST; request: channel (SMS or EMAIL), recipient, message; response: message id, status

Communication interfaces

  • All browser traffic over HTTPS with TLS 1.2 or later.
  • Gateway and notification calls authenticated with API keys kept in server configuration, not in source code.

3.3 Non-functional requirements

IDCategoryRequirement
NFR-P1PerformanceSearch results shall appear within 2 seconds for 95 percent of requests at 500 concurrent users.
NFR-P2PerformanceA booking shall be confirmed and its PNR shown within 5 seconds after the gateway returns SUCCESS.
NFR-P3PerformanceThe system shall support 1,000 logged-in users and 100 bookings per minute at peak.
NFR-S1SecurityAll pages shall be served only over HTTPS; HTTP requests shall be redirected.
NFR-S2SecurityPasswords shall be hashed with bcrypt (cost 12 or higher).
NFR-S3SecurityRole checks shall be enforced on the server for every request; hiding a menu item is not sufficient.
NFR-S4SecurityEvery booking, cancellation, refund, and admin change shall be written to an audit log with user id and timestamp, retained for 1 year.
NFR-R1ReliabilityA seat on a schedule shall never be allocated to two passengers; concurrent bookings shall be serialised by database transactions.
NFR-R2ReliabilityA failed payment shall never leave a booking in CONFIRMED status; a successful payment shall never leave a booking without a PNR.
NFR-R3ReliabilityThe database shall be backed up every 6 hours and a restore shall lose at most 6 hours of data.
NFR-A1AvailabilityThe system shall be available 99.5 percent of each calendar month, measured outside the maintenance window.
NFR-A2AvailabilityPlanned maintenance shall occur only between 02:00 and 04:00 IST and shall be announced on the login page 24 hours earlier.
NFR-U1UsabilityA first-time passenger shall complete a search and booking in under 5 minutes without help, measured with 5 test users.
NFR-U2UsabilityEvery input error shall be shown next to the field, in plain language, without clearing the other fields.
NFR-U3UsabilityThe interface shall be in English and Hindi, selectable on every page.
NFR-M1MaintainabilityEach of the eight modules shall be a separate package with no direct access to another module’s tables; cross-module calls go through documented functions.
NFR-M2MaintainabilityAdding a new coach class or changing the clerkage amount shall require a configuration change only, no code change.
NFR-M3MaintainabilityUnit tests shall cover at least 70 percent of statements in modules 4, 5, and 6.

4 Requirements traceability

ModuleFR IDsScope item (Session 1)DFD process (Session 4)Main data stores
1 User ManagementFR-1.1 to FR-1.6Login facility, secure access1.0 Manage UsersD1 User
2 Train and Schedule ManagementFR-2.1 to FR-2.7Update train information and schedule2.0 Manage Trains and SchedulesD2 Train Master, D3 Schedule
3 Search and AvailabilityFR-3.1 to FR-3.6Seat availability, journey time3.0 Search TrainsD2 Train Master, D3 Schedule, D4 Booking
4 BookingFR-4.1 to FR-4.9Create reservation, view reservation status4.0 Book TicketD4 Booking, D2 Train Master
5 Cancellation and RefundFR-5.1 to FR-5.7Cancel reservation, easy and fast refund5.0 Cancel and RefundD4 Booking, D6 Refund
6 PaymentFR-6.1 to FR-6.7All payment modes supported6.0 Process PaymentD5 Payment
7 NotificationFR-7.1 to FR-7.5Details sent to email and mobile7.0 Send NotificationsD7 Notification Log
8 ReportsFR-8.1 to FR-8.5Generating reports8.0 Generate ReportsD3, D4, D5, D6

Non-functional requirements apply across modules: NFR-S1 to NFR-S4 trace to the security paragraph of the scope; NFR-A1 and NFR-A2 to “twenty-four-7 accessibility”; NFR-U1 to NFR-U3 to “user friendly, simple interface” and “multilingual”.

Viva Questions

Do not copy. Read for understanding and the viva
  • Q: What is the difference between the scope statement and the SRS? A: The scope says what the product is and its boundary; the SRS states every requirement precisely enough to design and test against.
  • Q: Why must a requirement be verifiable? A: Because a tester needs to write a test that clearly passes or fails; “the system should be fast” cannot be tested.
  • Q: What does “shall” mean in an SRS? A: A mandatory requirement; “should” marks a desirable one.
  • Q: Where in the IEEE 830 format do functional requirements go? A: Section 3, Specific Requirements; sections 1 and 2 give context only.
  • Q: Give one non-functional requirement of the RRS with a number in it. A: NFR-P1: search results within 2 seconds for 95 percent of requests at 500 concurrent users.
  • Q: What is traceability? A: The ability to follow a requirement forward to design, code, and tests, and backward to the need that produced it.
  • Q: Why is the refund rule in the SRS and not left to the design? A: It is a business rule the customer must agree to; the design only decides how to compute it.
  • Q: What are the external interfaces of the RRS? A: Browser user interface, receipt printer, database, Payment Gateway API, Notification Service API.
  • Q: What happens if a payment fails after seats are held? A: FR-6.4 and FR-4.7: the payment is marked FAILED and the held seats are released after the 10-minute hold.

Common Mistakes

Do not copy. Read for understanding and the viva
  • Writing the SRS as a feature list of one-line bullets without IDs; then no later session can refer to a requirement.
  • Mixing design into requirements (“the system shall use a hash table for seats”). Say what, not how.
  • Non-functional requirements without numbers: “secure”, “reliable”, “user friendly” are wishes, not requirements.
  • Leaving out the business rules (refund bands, max 6 passengers, no booking after departure). These are the requirements a viva examiner asks about first.
  • Forgetting the external actors. Payment Gateway and Notification Service are not users, but their interfaces must be specified.
  • Two requirements that contradict each other, for example one saying search needs login and another saying it does not. Read the whole list once for consistency before submitting.

Session Summary

Write in lab record
  • Problem statement copied verbatim.
  • SRS sections 1 and 2: introduction, definitions table, product perspective diagram, product functions table, user classes table, environment, constraints, assumptions.
  • Section 3.1: functional requirements tables for all eight modules, FR-1.1 to FR-8.5, each a single testable “shall” sentence with priority.
  • Section 3.2: user, hardware, software, and communication interfaces.
  • Section 3.3: non-functional requirements NFR-P, S, R, A, U, M, each with a measurable value.
  • Section 4: traceability table from modules and FR ranges to scope items and DFD processes.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close