KS3 Edexcel Computer Science: Case Study Practical Exercise | KS3 Edexcel 计算机:案例分析实战演练

📚 KS3 Edexcel Computer Science: Case Study Practical Exercise | KS3 Edexcel 计算机:案例分析实战演练

In this revision article, we approach a real‑world scenario step by step, applying the key KS3 Computer Science concepts required by Edexcel. The case study you will work through is the design of a School Library Management System. You will identify requirements, plan inputs and outputs, structure data, design algorithms and consider hardware, software and cybersecurity. This practical exercise mirrors the problem‑solving style you will meet in your assessments and helps you connect theory to practice.

在这篇复习文章中,我们将逐步解析一个真实场景,运用 Edexcel KS3 计算机科学的核心概念。你将参与的案例是设计一套学校图书馆管理系统。你将明确需求、规划输入与输出、组织数据结构、设计算法,并思考硬件、软件和网络安全。这种实践练习与你在评估中将遇到的题型风格一致,帮助你打通理论与应用。


1. Introduction to the Case Study | 案例介绍

Our Lady’s Secondary School currently uses a paper logbook to record the books that students and staff borrow. The librarian must manually note the borrower’s name, the book title, the date borrowed and the due date. This system is slow, errors are common and it is difficult to search for a book’s availability or to calculate overdue fines. The school has decided to develop a digital Library Management System (LMS) that can be accessed from computers in the library and via the school network.

圣母中学目前使用纸质记录本登记师生借阅的图书。图书管理员必须手动记录借阅者姓名、书名、借阅日期和应还日期。这种系统效率低下、容易出错,并且难以查询图书的可借状态或计算逾期罚款。学校决定开发一套可以通过图书馆电脑和校园网络访问的数字化图书馆管理系统。

The new system must allow the librarian to add new books to the catalogue, search for books by title or author, register a member to borrow a book, record a return, and automatically calculate fines for late returns. It must also store data securely so that only authorised users can perform certain actions. As a computer scientist, you have been asked to analyse the problem and design a solution.

新系统必须允许管理员向目录添加新书、按书名或作者搜索图书、登记成员借书、记录还书并自动计算逾期罚款。它还必须安全地存储数据,只有授权用户才能执行特定操作。作为一名计算机科学家,你被要求分析问题并设计解决方案。

This case study will guide you through the entire design process: from requirements engineering and data modelling to algorithm design with flowcharts and pseudocode, before finally considering the hardware, software and security required to implement the system.

本案例将引导你完成整个设计过程:从需求分析和数据建模,到使用流程图和伪代码进行算法设计,最后再考虑实现系统所需的硬件、软件和安全措施。


2. Identifying Key Requirements | 明确关键需求

The first step in any system design is to work out exactly what the system needs to do. These are the functional requirements. For the library management system, we can list them as follows. The system must allow the librarian to add a new book with details such as ISBN, title, author and publication year. It must enable searching for books by entering a keyword. It must register a new borrower (student or staff) with their name, ID and contact information. It must record a book loan when a borrower takes a book, setting a due date two weeks from the current date. It must process a return and mark the loan as complete. It must calculate a fine of 10p per day for each day a book is overdue. Finally, it must display a list of currently borrowed books for a particular member.

任何系统设计的第一步是明确系统究竟需要做什么。这些是功能性需求。对于图书馆管理系统,我们可以列出如下要求。系统必须允许管理员添加一本新书,包含 ISBN、书名、作者和出版年份等详细信息。必须能够通过输入关键字搜索图书。必须注册新借阅者(学生或教职工),包含姓名、ID 和联系信息。当借阅者取走一本书时,必须记录借阅,并将应还日期设为从当前日期起两周后。必须处理还书并将借阅标记为完成。每逾期一天必须计算每日 10 便士的罚款。最后,必须显示特定成员当前借阅的图书列表。

Non‑functional requirements are also important. These describe how the system should behave. The system should respond to a search within two seconds. It must be easy for the librarian to use, with clear buttons and labels. User data and borrowing records must be protected from unauthorised access, and the system should be available during school hours without unexpected downtime.

非功能性需求同样重要。它们描述系统应如何表现。系统应在两秒内响应搜索。它必须易于图书管理员使用,带有清晰的按钮和标签。用户数据和借阅记录必须受到保护,防止未经授权的访问,并且系统应在学校开放时间内可用,不会出现意外停机。


3. System Inputs and Outputs | 系统输入与输出

Once we know what the system must do, we can define the inputs it will receive and the outputs it will produce. This helps us design the user interface and understand what data flows into and out of the system. The table below summarises the main inputs and outputs for each key function.

一旦清楚了系统必须做什么,我们就可以定义它将接收的输入和产生的输出。这有助于我们设计用户界面并理解数据如何流入和流出系统。下表总结了每个关键功能的主要输入和输出。

Function Inputs Outputs
Add Book ISBN, title, author, year Confirmation message
Search Book Keyword (title or author) List of matching books with status
Register Member Name, member ID, contact Member record created
Borrow Book Member ID, book ISBN Due date, loan confirmation
Return Book Loan ID or member ID + ISBN Return confirmed, fine amount (if any)

In addition to on‑screen outputs, the system may also produce printed receipts or email notifications when a book is due, but for our KS3 scope we will focus on screen‑based interactions.

除了屏幕输出以外,系统还可以在图书到期时生成打印收据或发送邮件提醒,但在 KS3 范围内我们将重点放在基于屏幕的交互上。

Notice how each function has clearly defined input and output. This clarity will help us when we write algorithms later: an algorithm needs to know what data it starts with and what it must produce.

请注意,每个功能都有明确定义的输入和输出。这种清晰性将有助于我们随后编写算法:算法需要知道它从哪些数据开始,以及它必须产生什么结果。


4. Data Storage and Databases | 数据存储与数据库

Digital systems store information in databases. For our library system, we can think of a database as a collection of tables, each representing a real‑world entity. The three main entities are Book, Member and Loan. Designing these tables carefully is crucial so that data is organised and free from unnecessary duplication.

数字系统在数据库中存储信息。对于我们的图书馆系统,可以将数据库视为表的集合,每个表代表一个现实世界的实体。三个主要实体是图书、成员和借阅记录。仔细设计这些表至关重要,这样才能使数据有序并避免不必要的重复。

The Book table might include fields: BookID (a unique identifier, often an auto‑increment number), ISBN, Title, Author, PublicationYear and Status (available or borrowed). The Member table could store: MemberID, FullName, MemberType (student or staff), ContactEmail and DateRegistered. The Loan table ties a member and a book together, and stores: LoanID, BookID, MemberID, DateBorrowed, DueDate, DateReturned and FinePaid.

图书表可能包含这些字段:BookID(唯一标识符,通常是自动递增编号)、ISBN、书名、作者、出版年份和状态(可借或已借出)。成员表可以存储:MemberID、姓名、成员类型(学生或教职工)、联系邮箱和注册日期。借阅表将成员和图书关联起来,存储:LoanID、BookID、MemberID、借阅日期、应还日期、归还日期和罚款支付状态。

Using separate tables avoids redundancy. For example, a book’s title is stored only once in the Book table; whenever a loan refers to that book, it simply uses the BookID. This is the principle of a relational database, and it makes updating information easy.

使用独立的表可以避免冗余。例如,书名只在图书表中存储一次;每当借阅记录引用那本书时,它只使用 BookID。这就是关系型数据库的原理,它使信息更新变得更容易。

For a KS3 project, you might not build a real database, but you should be able to draw a simple entity‑relationship diagram showing how tables are linked through primary keys and foreign keys. BookID in the Loan table is a foreign key linking back to the Book table.

对于 KS3 项目,你可能不会搭建真实的数据库,但应该能够画出一个简单的实体关系图,展示表格如何通过主键和外键关联在一起。借阅表中的 BookID 就是一个外键,它指向图书表。


5. Designing Algorithms with Flowcharts | 使用流程图设计算法

An algorithm is a step‑by‑step set of instructions to solve a problem. Flowcharts are a visual way to represent algorithms, using standard symbols such as ovals for start/end, parallelograms for input/output, rectangles for processes and diamonds for decisions. Let’s design a flowchart for the ‘Borrow Book’ function.

算法是解决问题的一套逐步指令。流程图是一种用图形表示算法的方式,它使用标准符号,如椭圆表示开始/结束,平行四边形表示输入/输出,矩形表示处理过程,菱形表示判断。我们来为“借书”功能设计一个流程图。

The process begins when the librarian selects the borrow option. The system asks for the Member ID. It then checks whether the member exists. If not, an error message is displayed and the process ends. Next, the system asks for the book’s ISBN. It verifies the book exists and whether its status is ‘available’. If the book is already borrowed, the system displays ‘Book not available’ and stops. If both checks pass, the system creates a new Loan record, sets the DueDate to the current date plus 14 days, changes the book’s status to ‘borrowed’, and displays a confirmation message showing the due date.

当图书管理员选择借阅选项时,过程开始。系统要求输入 Member ID,然后检查该成员是否存在。如果不存在,则显示错误信息,过程结束。接下来,系统要求输入图书的 ISBN。它验证图书是否存在,以及其状态是否为“可借”。如果图书已被借出,系统显示“图书不可借”并停止。如果两项检查都通过,系统将创建一条新的借阅记录,将应还日期设为当前日期加 14 天,把图书状态改为“已借出”,并显示一条确认消息,包含应还日期。

In a flowchart, each of these steps is represented by a symbol, and arrows connect them to show the flow of logic. Decision diamonds split the path into ‘yes’ and ‘no’ branches. This flowchart would be an essential part of your design documentation.

在流程图中,每一步都用符号表示,箭头将它们连接起来以展示逻辑流程。判断菱形将路径分成“是”和“否”两个分支。这个流程图将成为你设计文档的重要组成部分。

Drawing flowcharts helps you spot potential errors early. For instance, what if a member tries to borrow more than three books? You could add another decision box to check the number of active loans and display a limit warning.

画流程图有助于及早发现潜在错误。例如,如果成员试图借阅超过三本书怎么办?你可以再添加一个判断框来检查当前活跃借阅的数量,并显示限额警告。


6. Pseudocode for Core Functions | 核心功能的伪代码

Pseudocode is a text‑based way to describe an algorithm without worrying about strict programming language syntax. It uses common terms like INPUT, OUTPUT, IF … THEN … ELSE and WHILE. The borrow book algorithm described in the flowchart can be expressed in pseudocode as follows:

伪代码是一种基于文本的算法描述方式,无需担心严格的编程语言语法。它使用常见的术语,如 INPUT、OUTPUT、IF … THEN … ELSE 和 WHILE。流程图中描述的借书算法可以用如下的伪代码表达:

INPUT MemberID
IF MemberID not in Member table THEN
  OUTPUT ‘Member not found’
  STOP
ENDIF
INPUT ISBN
IF ISBN not in Book table THEN
  OUTPUT ‘Book not found’
  STOP
ENDIF
IF Book.Status = ‘borrowed’ THEN
  OUTPUT ‘Book not available’
  STOP
ENDIF
SET DueDate = CurrentDate + 14
INSERT INTO Loan (BookID, MemberID, DateBorrowed, DueDate)
UPDATE Book SET Status = ‘borrowed’
OUTPUT ‘Book borrowed. Due date: ‘ + DueDate

This pseudocode is clear and can quickly be turned into a program in Python or another language. It uses a mixture of structured English and database commands, which is acceptable at KS3. Note how we check conditions in sequence, ensuring that we handle errors before moving forward.

这段伪代码清晰明了,可以快速转换为 Python 或其他语言的程序。它混合使用了结构化的英语和数据库命令,这在 KS3 阶段是可以接受的。请注意我们如何按顺序检查条件,确保在继续进行之前已处理了错误。

Similarly, we can write pseudocode for the ‘Calculate Fine’ function. When a book is returned, the system compares the return date with the due date. If the return date is later, it calculates the number of overdue days, multiplies by 0.10 pounds and outputs the fine amount.

同样,我们可以为“计算罚款”功能编写伪代码。当归还图书时,系统比较归还日期和应还日期。如果归还日期更晚,它就计算逾期天数,乘以 0.10 英镑,并输出罚款金额。


7. Hardware and Software Components | 硬件与软件组成

Any information system relies on a combination of hardware and software. For the library management system, the librarian will use a desktop computer or a laptop in the library. This computer needs a monitor, keyboard and mouse or touchscreen. Because books have ISBN barcodes, a barcode scanner is an efficient input device to read book details quickly. The school network connects the librarian’s computer to a server where the database is stored.

任何信息系统都依赖于硬件和软件的组合。对于图书馆管理系统,图书管理员将使用图书馆内的台式计算机或笔记本电脑。这台计算机需要显示器、键盘和鼠标或触摸屏。由于图书有 ISBN 条形码,条形码扫描器是一种高效的输入设备,可以快速读取图书信息。学校网络将管理员的计算机与存储数据库的服务器连接起来。

On the software side, the system requires an operating system such as Windows. The database could be managed with a relational database management system (RDBMS) like Microsoft Access (common in schools) or SQLite. The application interface might be built with a programming language such as Python, using libraries like Tkinter for a graphical user interface (GUI). The software must handle user authentication, data validation and transaction processing.

在软件方面,系统需要一个操作系统,例如 Windows。数据库可以用关系型数据库管理系统管理,如学校常见的 Microsoft Access 或 SQLite。应用程序界面可以用 Python 等编程语言构建,并使用 Tkinter 等库创建图形用户界面。该软件必须处理用户认证、数据验证和事务处理。

Selecting appropriate hardware and software is part of the design process. The hardware must be reliable and cost‑effective for a school budget. The software must be compatible with the school’s existing IT infrastructure and easy for the librarian to learn.

选择合适的硬件和软件是设计过程的一部分。硬件必须在学校预算内可靠且成本合理。软件必须与学校现有的 IT 基础设施兼容,并且便于图书管理员学习。


8. Testing and Evaluation Strategy | 测试与评估策略

No system can be deployed without testing. A test plan lists test cases that cover normal, boundary and erroneous inputs. For example, to test the borrow function, we would try to borrow a book with a valid member and an available book to check if the due date is set correctly. We would also try borrowing a book that is already borrowed, expecting the error message ‘Book not available’. We would test with a non‑existent member ID to confirm the system does not crash.

未经测试的系统不能部署。测试计划列出了覆盖正常、边界和错误输入的测试用例。例如,要测试借阅功能,我们会尝试用有效的成员和一本可借的图书借书,检查应还日期是否正确设置。我们还会尝试借出已借出的图书,预期出现错误信息“图书不可借”。我们会用一个不存在的成员 ID 进行测试,以确认系统不会崩溃。

Boundary testing is particularly important. If the borrowing limit is 14 days, we should test what happens on exactly the 14th day and on the 15th day. The fine calculation must be tested with 0 days overdue, 1 day overdue and a large number of days overdue to ensure arithmetic accuracy.

边界测试尤其重要。如果借阅期限为 14 天,我们应该测试恰好在第 14 天和第 15 天时会发生什么。罚款计算必须用逾期 0 天、1 天和大量逾期天数进行测试,以确保算术准确性。

Evaluation goes beyond testing. It considers whether the system meets the original requirements. Is the search fast enough? Can the librarian complete a borrowing transaction in under one minute? We might also collect feedback from users and observe how they interact with the system to identify interface improvements.

评估超越了测试本身。它考虑系统是否满足原始需求。搜索是否足够快?图书管理员能在一分钟内完成一次借阅操作吗?我们还可以收集用户的反馈,观察他们如何与系统交互,以发现界面上的改进点。


9. Cybersecurity Considerations | 网络安全考虑

Because the system stores personal data about members and tracks valuable school assets, cybersecurity must be built in from the start. The first line of defence is authentication: the librarian must log in with a username and strong password. This prevents unauthorised students from borrowing books or altering records.

由于系统存储了成员的个人数据并跟踪有价值的学校资产,必须从一开始就考虑网络安全。第一道防线是身份认证:图书管理员必须使用用户名和强密码登录。这可以防止未经授权的学生借阅图书或篡改记录。

Data in transit between the librarian’s computer and the server should be encrypted if possible, but at KS3 you may suggest that the school’s secure internal network provides a level of protection. The database should be backed up regularly – perhaps every evening – so that records can be restored if hardware fails or data is accidentally deleted.

如果可能,图书管理员电脑与服务器之间传输的数据应该加密,但在 KS3 阶段你可以指出学校安全的内部网络提供了一定程度的保护。数据库应定期备份——也许每晚一次——以便在硬件故障或数据意外删除时能够恢复记录。

Access levels are another security measure. Not every user needs the same permissions. The librarian can add and edit books, while a student searching the catalogue may only view book details and availability. This principle is known as ‘least privilege’ and is a core cybersecurity concept.

访问级别是另一项安全措施。并非每个用户都需要相同的权限。图书管理员可以添加和编辑图书,而搜索目录的学生只能查看图书详情和可借状态。这一原则称为“最小权限”,是一个核心的网络安全概念。

Finally, the system should validate all inputs to prevent malicious data entry, such as trying to type SQL commands into a name field (an attack called SQL injection). Simple input sanitisation, like disallowing semicolons or special characters, can help protect the database.

最后,系统应对所有输入进行验证,以防止恶意数据输入,比如试图在姓名字段中输入 SQL 命令(称为 SQL 注入的攻击)。简单的输入清理,如禁止分号或特殊字符,可以帮助保护数据库。


10. Conclusion and Real-World Links | 总结与实际联系

This case study has taken you through the complete design of a library management system, from initial requirements to security considerations. You have practised skills that are central to the KS3 Edexcel Computer Science curriculum: computational thinking, data representation, algorithm design with flowcharts and pseudocode, and evaluating systems against their purpose.

本案例带你走过了图书馆管理系统的完整设计过程,从最初的需求到安全考虑。你练习了 KS3 Edexcel 计算机科学课程的核心技能:计算思维、数据表示、使用流程图和伪代码设计算法,以及根据目的评估系统。

In the real world, systems like this are ubiquitous. Every library, from a small primary school to a university, uses a digital catalogue and borrowing system. The principles you have applied – modular design, database normalisation, error handling and user‑centred testing – are the same ones software engineers use when building large‑scale applications. You might even recognise these ideas when using an online bookstore or a video streaming service, where searching, borrowing or purchasing follow similar logical flows.

在现实世界中,像这样的系统无处不在。从小学到大学,每个图书馆都使用数字化目录和借阅系统。你应用的原则——模块化设计、数据库规范化、错误处理和以用户为中心的测试——与软件工程师构建大规模应用时使用的原则相同。你在使用网上书店或视频流媒体服务时,甚至可能认出这些理念,那里的搜索、借阅或购买都遵循类似的逻辑流程。

Remember that each design choice has trade‑offs. A barcode scanner makes input fast, but adds cost. A strong password policy increases security, but might frustrate users if forgotten. Good computer scientists always balance functionality, usability, cost and security.

记住,每个设计选择都有利弊。条形码扫描器使输入变快,但增加了成本。强密码策略提高了安全性,但用户忘记密码时可能会感到沮丧。优秀的计算机科学家总是在功能、可用性、成本和安全性之间取得平衡。

Published by TutorHao | Computer Science Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading