📚 Case Study in Action: A Practical Walkthrough for Year 10 Eduqas Computer Science | 案例分析实战演练:Year 10 Eduqas 计算机科学实战指南
Case studies are a vital part of the Eduqas GCSE Computer Science course, bringing together theory and real‑world problem‑solving. In this article we work through a detailed example: designing a library loan system for a school. You will see how to analyse requirements, choose hardware, design algorithms, and address legal, ethical, and security concerns — all skills needed for the exam.
案例分析是Eduqas GCSE计算机科学课程的重要组成部分,它将理论与实践相结合。在本文中,我们将通过一个详细案例——为学校设计图书馆借阅系统,来示范如何分析需求、选择硬件、设计算法,以及应对法律、伦理与安全问题,这些都是考试中不可或缺的技能。
1. Understanding the Scenario | 理解案例场景
The school librarian wants a digital system to replace paper records. Pupils must be able to borrow and return books, and the librarian needs to view who has which book, when it is due, and generate overdue notices. The system will be used by the librarian on a desktop PC and by pupils at a self‑service kiosk in the library.
学校图书馆员希望用数字系统替代纸质记录。学生需要能够借阅和归还图书,图书管理员需要查看谁借了什么书、何时到期,并能生成逾期通知。该系统将由管理员在台式电脑上使用,学生则通过图书馆的自助服务终端操作。
We are given a budget of £3000 for hardware and software, and the system must comply with the school’s data protection policy. No off‑the‑shelf library software fits the budget, so the school IT technician will write custom software in Python with a SQLite database.
系统预算为3000英镑,用于硬件和软件,且必须符合学校的数据保护政策。由于没有现成的商业软件在预算内,学校IT技术员将用Python和SQLite数据库编写定制软件。
- The core functions: borrowing, returning, searching, overdue tracking.
- 核心功能:借书、还书、搜索、逾期跟踪。
- Users: librarian (full control), pupils (limited self‑service).
- 用户:图书管理员(完全控制),学生(有限自助服务)。
2. Stakeholders and Their Needs | 利益相关者及其需求
Identifying stakeholders ensures the system meets real expectations. The primary stakeholders are the librarian, pupils, and the school’s senior leadership team (SLT) who fund the project. Secondary stakeholders include the IT technician and the data protection officer.
识别利益相关者可以确保系统满足实际期望。主要利益相关者包括图书管理员、学生和提供项目经费的学校领导团队;次要利益相关者包括IT技术员和数据保护官。
| Stakeholder / 利益相关者 | Need / 需求 |
|---|---|
| Librarian | Fast check‑in/out, clear overdue reports, simple interface. |
| Pupils | Quick self‑service, search for books by title/author, see own loans. |
| SLT | Value for money, data security, improves library usage. |
The librarian also requested barcode scanning to speed up transactions. Pupils want the kiosk to show recommended reads based on their previous loans. SLT insisted on encryption of all personal data at rest.
图书管理员还要求使用条码扫描加快处理速度。学生希望自助终端能根据他们之前的借阅记录推荐图书。学校领导团队则要求所有个人数据在存储时必须加密。
3. Hardware Selection | 硬件选择
We need a desktop for the librarian, a kiosk touchscreen computer for pupils, a barcode scanner, and a receipt printer for overdue slips. The school already has a server room with a Linux machine that can host the database. Given the £3000 budget, we choose cost‑effective components.
我们需要为图书管理员配备一台台式电脑,为学生配备一台自助触摸屏电脑,一个条码扫描器,以及一台用于打印逾期通知单的收据打印机。学校已有服务器机房中一台可托管数据库的Linux机器。在3000英镑预算内,我们选择性价比高的组件。
| Hardware / 硬件 | Justification / 理由 | Cost / 成本 |
|---|---|---|
| Refurbished Dell desktop (i5, 8 GB RAM, SSD) | Reliable for database client and reporting. | £350 |
| 15″ touchscreen all‑in‑one (Celeron, 4 GB RAM) | Runs simple Python GUI, space‑saving. | £500 |
| USB barcode scanner | Speeds up book and pupil card scanning. | £30 |
| Thermal receipt printer | No ink needed, prints overdue reminders. | £120 |
Total hardware cost: approximately £1000. The remaining £2000 is for software development time (40 hours at £50/hour internal costing) and contingency. No cloud subscription is needed because the system runs on the school’s local network.
硬件总成本约1000英镑。剩余的2000英镑用于软件开发时间(按内部成本每小时50英镑计,共40小时)和应急储备。由于系统在学校本地网络上运行,无需云订阅费用。
4. Software and Data Structures | 软件与数据结构
The system uses Python with Tkinter for the GUI and SQLite for the database. SQLite is serverless and perfect for a single‑user scenario (the database server handles requests from both clients). The main tables are:
系统使用Python搭配Tkinter构建图形界面,数据库采用SQLite。SQLite无服务器架构,非常适合单用户场景(数据库服务器处理来自两个客户端的请求)。主要数据表如下:
- Pupils: PupilID (TEXT, primary key), Name, YearGroup, Barcode.
- Pupils: 学生ID(文本,主键),姓名,年级,条码。
- Books: ISBN (TEXT, primary key), Title, Author, Barcode, CopiesTotal, CopiesAvailable.
- Books: 图书ISBN(文本,主键),书名,作者,条码,总册数,可借册数。
- Loans: LoanID (INTEGER, primary key, auto), PupilID, ISBN, DateBorrowed, DateDue, DateReturned.
- Loans: 借阅ID(整数,主键,自增),学生ID,ISBN,借书日期,应还日期,归还日期。
We chose a barcode field separate from ISBN to allow multiple copies of the same book to have unique barcodes. The CopiesAvailable field is updated by a trigger when a loan is made or returned.
我们单独设置了条码字段,而非直接使用ISBN,这样同一本书的多本副本可以拥有唯一条码。可借册数字段通过借阅和归还时的触发器自动更新。
CopiesAvailable = CopiesTotal – COUNT(Loans WHERE DateReturned IS NULL)
5. Algorithm Design: Borrowing a Book | 算法设计:借书
The borrowing process must handle concurrent access safely. The algorithm for the self‑service kiosk:
借书过程必须安全处理并发访问。自助终端借书算法如下:
1. Scan pupil barcode → query Pupils table for PupilID.
1. 扫描学生条码 → 查询Pupils表获取学生ID。
2. If not found, display "Unknown pupil".
2. 如果未找到,显示“未知学生”。
3. Scan book barcode → query Books for ISBN and check CopiesAvailable > 0.
3. 扫描图书条码 → 查询Books表获取ISBN并检查可借册数 > 0。
new Loan record with DateBorrowed = today, DateDue = today + 14 days, DateReturned = NULL.
4. 如果可以借出,插入一条新的借阅记录,借书日期为今日,应还日期为今日加14天,归还日期为空。
5. Update Books set CopiesAvailable = CopiesAvailable - 1 (via trigger).
5. 通过触发器更新Books表:可借册数减1。
6. Print a receipt showing due date.
6. 打印收据显示应还日期。
All steps are wrapped in a database transaction to prevent two pupils borrowing the last copy simultaneously.
所有步骤封装在一个数据库事务中,防止两名学生同时借走最后一本书。
6. Algorithm Design: Overdue Notices | 算法设计:逾期通知
The librarian runs a report each morning. The algorithm:
图书管理员每天早上运行一次报告。算法如下:
1. SELECT Loans JOIN Pupils JOIN Books WHERE DateDue < today AND DateReturned IS NULL.
1. 联接Loans、Pupils、Books表,查询应还日期早于今天且尚未归还的记录。
2. For each result, generate a line for the notice: pupil name, form, book title, days overdue.
2. 对每条结果,生成通知行:学生姓名、班级、书名、逾期天数。
3. Sort by days overdue descending so the worst offenders appear first.
3. 按逾期天数降序排列,使逾期最严重的学生排在前面。
4. Output to the thermal printer and to a PDF file for emailing to form tutors.
4. 输出到热敏打印机,同时生成PDF文件以便通过电子邮件发送给班主任。
The SQL query uses a calculated field:
SQL查询使用计算字段:
julianday('now') – julianday(DateDue) AS DaysOverdue
This integer shows how many days a book is late. The system also generates a fine of £0.10 per school day overdue, but only if SLT approves the policy.
这个整数显示图书逾期多少天。系统还能生成罚款,每个上课日逾期罚款0.10英镑,但这需要学校领导团队批准相关政策。
7. User Interface Design | 用户界面设计
The kiosk must be simple enough for Year 7 pupils to use without training. We prototype a touchscreen graphical interface with large buttons: Borrow, Return, Search, and a text display area for feedback. The librarian’s desktop interface includes extra tabs for reports, pupil management, and system configuration.
自助终端必须足够简单,使七年级学生无需培训就能使用。我们设计了触摸屏图形界面原型,包含大按钮:借书、还书、搜索,以及一个用于反馈的文本显示区域。图书管理员的桌面界面则额外包含报告、学生管理和系统配置选项卡。
Accessibility features: high‑contrast mode, keyboard navigation for the librarian, and audio feedback (beep) on successful scan for visually impaired users. Text font is sans‑serif and at least 24 pt on the kiosk.
无障碍功能:高对比度模式,管理员可使用键盘导航,成功扫描后提供声音反馈(蜂鸣声)以帮助视障用户。自助终端字体为无衬线体,字号至少24磅。
8. Data Protection and Legal Compliance | 数据保护与法律合规
The system stores personal data (pupil names, IDs, loan history). Under UK GDPR and the Data Protection Act 2018, the school is the data controller. The system must adhere to the six principles: lawfulness, fairness, and transparency; purpose limitation; data minimisation; accuracy; storage limitation; integrity and confidentiality.
系统存储个人数据(学生姓名、ID、借阅历史)。根据英国GDPR和2018年《数据保护法》,学校是数据控制者。系统必须遵守六项原则:合法、公平和透明;目的限制;数据最小化;准确性;存储限制;完整性和保密性。
Implementation steps: we only store data necessary for library operations (data minimisation). Loan records are anonymised after the pupil leaves the school (storage limitation). All database files are encrypted at rest using AES‑256. The kiosk clears the screen after 30 seconds of inactivity and logs out automatically.
实施措施:我们只存储图书馆运营所需的数据(数据最小化)。学生离校后借阅记录将被匿名化(存储限制)。所有数据库文件使用AES‑256静态加密。自助终端在30秒不活动后清除屏幕并自动注销。
9. Ethical and Environmental Issues | 伦理与环境问题
Ethically, the system must not profile pupils based on reading choices. The recommendation engine is disabled by default and requires opt‑in consent from parents. The librarian cannot view recommendations unless specifically asked to troubleshoot.
在伦理方面,系统不得根据学生的阅读选择进行画像。推荐引擎默认关闭,需要家长选择同意才能启用。除非特别要求进行故障排除,图书管理员不得查看推荐内容。
Environmental impact: the kiosk uses an energy‑efficient all‑in‑one PC with automatic sleep mode. The thermal printer produces no toner waste, only biodegradable paper. Old PCs are refurbished models, extending their lifespan and reducing e‑waste.
环境影响:自助终端采用节能一体机,具有自动休眠模式。热敏打印机不产生碳粉废弃物,仅使用可生物降解纸张。旧电脑为翻新机型,延长了使用寿命并减少电子垃圾。
10. Testing and Evaluation | 测试与评估
We design a test plan covering normal, boundary, and erroneous data. Examples:
我们设计了一个测试计划,涵盖正常数据、边界数据和错误数据。示例:
| Test / 测试 | Data / 数据 | Expected Outcome / 预期结果 |
|---|---|---|
| Borrow available book | Valid pupil ID, book with CopiesAvailable = 2 | Loan recorded, CopiesAvailable becomes 1 |
| Borrow unavailable book | Book with CopiesAvailable = 0 | Message "All copies on loan" |
| Return already returned book | Scan same book barcode twice | "Book already returned" |
| Overdue report on empty database | No loans | Report shows "No overdue books" |
User acceptance testing involves the librarian and a small group of pupils. Their feedback leads to a larger font and a help button on each screen.
用户验收测试邀请了图书管理员和一组学生参与。他们的反馈促使我们加大了字号,并在每个屏幕上添加了帮助按钮。
11. Cybersecurity Considerations | 网络安全考量
Because the database contains personal data, we mitigate risks using the CIA triad: confidentiality, integrity, availability. Encryption protects confidentiality. Integrity is ensured by using database constraints and input validation (all barcodes are numeric strings of exactly 13 digits). Availability is maintained by daily backups to the school’s network storage.
由于数据库包含个人数据,我们采用CIA三要素来降低风险:机密性、完整性、可用性。加密保障机密性。通过数据库约束和输入验证确保完整性(所有条码都是恰好13位的数字字符串)。每日备份到学校网络存储以保证可用性。
Penetration testing by the IT team shows the kiosk is hardened: the touchscreen app runs in kiosk mode, preventing access to the operating system. SQL queries use parameterized statements to stop injection attacks.
IT团队进行的渗透测试表明自助终端足够安全:触摸屏应用程序以自助服务亭模式运行,阻止访问操作系统。SQL查询使用参数化语句,防止注入攻击。
12. Reflecting on the Case Study for the Exam | 案例研究的考试反思
In your Eduqas exam, you may be given a similar scenario and asked to identify hardware, design an algorithm, or discuss legal issues. Use this structured approach: read the scenario carefully, list stakeholders, define functional and non‑functional requirements, sketch data tables, and always justify your choices. Practice writing algorithms in pseudocode or flowcharts, and be prepared to evaluate the social and ethical impact.
在Eduqas考试中,你可能会遇到类似的场景,要求你确定硬件、设计算法或讨论法律问题。请采用这种结构化的方法:仔细阅读场景,列出利益相关者,定义功能和非功能性需求,草拟数据表,并始终为你的选择提供理由。练习用伪代码或流程图编写算法,并准备好评估社会和伦理影响。
Remember to use technical vocabulary: stakeholder, constraint, prototype, encryption, data minimisation, trigger, transaction, kiosk mode. These terms show the examiner you understand real‑world system development.
记得使用专业术语:利益相关者、约束条件、原型、加密、数据最小化、触发器、事务、自助服务亭模式。这些术语能让考官看到你理解现实世界的系统开发。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图