← 返回资讯屏轩教育 · 行业资讯

Database Fundamentals: Concepts and Architecture | 数据库基础:概念与体系结构

2026-08-30 14:31 · 本文部分内容由AI辅助创作

📚 Database Fundamentals: Concepts and Architecture | 数据库基础:概念与体系结构

Databases are the backbone of modern information systems, storing and organising data in a structured way to support efficient retrieval, update, and management. In the CIE A-Level Computer Science syllabus, understanding the core concepts and architectural layers of a database is essential for designing robust systems and reading/writing SQL.

数据库是现代信息系统的核心支柱,它以结构化方式存储和组织数据,以支持高效的检索、更新和管理。在 CIE A-Level 计算机科学考纲中,理解数据库的核心概念与体系结构层,是设计稳健系统以及编写和解读 SQL 的基础。


1. What Is a Database? | 什么是数据库?

A database is an organised collection of interrelated data, stored persistently and managed as a single logical unit. It is designed to represent some aspect of the real world, known as a mini-world or universe of discourse.

数据库是按组织方式存储的相关数据集合,它以持久化的方式保存,并作为一个整体逻辑单元进行管理。数据库通常用来表示现实世界的某个方面,这一方面被称为“小型世界”或“论域”。

For example, a school database may contain data about students, teachers, courses, and examination results, where each record is connected to the others through defined relationships.

例如,一所学校的数据库可能包含学生、教师、课程和考试成绩等数据,其中每条记录都通过明确定义的关系与其他记录相连。

Key properties of a database:

数据库的关键特性包括:


2. DBMS and Database System | DBMS 与数据库系统

A Database Management System (DBMS) is a software package that enables users to define, create, query, update, and administer a database. Examples include MySQL, PostgreSQL, Oracle, and Microsoft SQL Server.

数据库管理系统(DBMS)是一种软件包,它允许用户定义、创建、查询、更新和管理数据库。常见的例子包括 MySQL、PostgreSQL、Oracle 和 Microsoft SQL Server。

A database system (also called a database application system) consists of the database itself, the DBMS, the application programs, and the users. The users may be end users, application programmers, or database administrators.

数据库系统(也称为数据库应用系统)由数据库本身、DBMS、应用程序和用户组成。用户包括最终用户、应用程序员和数据库管理员。

The main functions of a DBMS include:

DBMS 的主要功能包括:


3. Three-Level Architecture | 三层体系结构

The ANSI-SPARC architecture separates a database system into three levels: the external level, the conceptual level, and the internal level. This separation provides data independence and hides implementation details from users.

ANSI-SPARC 体系结构将数据库系统划分为三个层次:外部层、概念层和内部层。这种划分提供了数据独立性,并向用户隐藏了实现细节。

External level – the view presented to individual users or applications. Each external view shows only the data relevant to a particular user, often as a subset of the database. Different users may see different views of the same data.

外部层——呈现给单个用户或应用程序的视图。每个外部视图只显示与特定用户相关的数据,通常是数据库的一个子集。不同用户可能看到同一数据的不同视图。

Conceptual level – the community view of the whole database. It describes what data is stored, the relationships among data items, and the constraints applied, but it does not describe how the data is physically stored.

概念层——整个数据库的全局视图。它描述存储了哪些数据、数据项之间的关系以及应用的约束,但不描述数据在物理上是如何存储的。

Internal level – the physical storage representation, including file organisation, indexing methods, and data compression. It is hidden from end users.

内部层——物理存储表示,包括文件组织、索引方法和数据压缩。它对外部用户完全隐藏。

Data independence is the ability to change the schema at one level without changing the schema at the next higher level. Two types exist:

数据独立性是指在不改变更高级别模式的情况下修改某一级别模式的能力。分为两种类型:


4. Data Models | 数据模型

A data model is a collection of concepts used to describe the structure of a database, including data types, relationships, and constraints. The main categories are:

数据模型是用于描述数据库结构的概念集合,包括数据类型、关系和约束。主要类别有:


5. Relational Database Structure | 关系数据库基本结构

A relational database stores data in tables called relations. Each table consists of rows (tuples) and columns (attributes). The degree of a relation is the number of attributes; the cardinality is the number of tuples.

关系数据库将数据存储在称为关系的表中。每个表由行(元组)和列(属性)组成。关系的度是属性的数量,基数(势)是元组的数量。

StudentID Name Grade
S001 Aisha A
S002 Bilal B

Each attribute has a domain, which is the set of permitted values, such as integers, strings, or dates. A relation schema defines the relation name and its attributes, while a relation instance is the actual set of tuples at a particular moment.

每个属性都有一个域(domain),即允许取值的集合,例如整数、字符串或日期。关系模式定义了关系名及其属性,而关系实例是某一时刻元组的实际集合。

Relations must satisfy the following properties:

关系必须满足以下性质:


6. Keys in Relational Databases | 关系数据库中的键

Keys are essential for maintaining consistency and establishing relationships between tables. The most important keys are:

键对于维护一致性以及建立表之间的关系至关重要。最重要的键包括:

For example, in a Course table, CourseID could be the primary key. In an Enrolment table, the pair (StudentID, CourseID) may form a composite primary key, while StudentID and CourseID are individual foreign keys referencing the Student and Course tables.

例如,在 Course 表中,CourseID 可以作为主键。在 Enrolment 表中,对 (StudentID, CourseID) 可以构成复合主键,而 StudentID 和 CourseID 分别是引用 Student 表和 Course 表的外键。


广告 / Sponsored

7. Database Languages | 数据库语言

A DBMS provides various languages to define and manipulate data. In the relational model, SQL (Structured Query Language) is the standard language, divided into three main categories:

DBMS 提供了多种语言来定义和操作数据。在关系模型中,SQL(结构化查询语言)是标准语言,分为三大类:

For instance, the following SQL statement creates a simple table:

例如,下面的 SQL 语句创建一个简单的表:

CREATE TABLE Student (
StudentID VARCHAR(10) PRIMARY KEY,
Name VARCHAR(50) NOT NULL,
Age INT)
;

While the above example is illustrative, CIE A-Level questions often ask candidates to write and trace SQL queries involving SELECT, JOIN, and GROUP BY, so mastering the syntax is vital.

虽然以上示例仅用于说明,但 CIE A-Level 试题经常要求考生编写和追踪涉及 SELECT、JOIN 和 GROUP BY 的 SQL 查询,因此掌握语法至关重要。


8. Database Design and ER Modelling | 数据库设计与 ER 模型

Database design typically proceeds in three phases: conceptual design, logical design, and physical design. In the conceptual phase, an Entity-Relationship (ER) model is often created.

数据库设计通常经历三个阶段:概念设计、逻辑设计和物理设计。在概念阶段,通常会创建实体-联系(ER)模型。

In an ER diagram, the main components are:

在 ER 图中,主要成分包括:

For example, a Student “enrols in” many Courses, and a Course can be taken by many Students. This is a many-to-many relationship, which is usually resolved into two one-to-many relationships using an intermediary table called a junction or link table.

例如,一个学生可以选修多门课程,一门课程也可以被多名学生选修。这是多对多联系,通常通过一个称为连接表或中间表的关系来解决,将其拆分为两个一对多联系。


9. Normalisation | 规范化

Normalisation is the process of organising data to reduce redundancy and improve integrity. The most common normal forms are 1NF, 2NF, and 3NF.

规范化是组织数据以减少冗余并提高完整性的过程。最常见的范式包括第一范式(1NF)、第二范式(2NF)和第三范式(3NF)。

First Normal Form (1NF): a relation is in 1NF if all attributes contain only atomic (indivisible) values and there are no repeating groups.

第一范式(1NF):如果关系中的所有属性都只包含原子(不可再分)值,且没有重复组,则该关系处于 1NF。

Second Normal Form (2NF): a relation is in 2NF if it is in 1NF and every non-key attribute is fully functionally dependent on the entire primary key, not just part of it. This applies mainly to composite primary keys.

第二范式(2NF):如果关系满足 1NF,并且每个非键属性都完全依赖于整个主键(而不是仅依赖于主键的一部分),则该关系处于 2NF。这主要适用于复合主键的情况。

Third Normal Form (3NF): a relation is in 3NF if it is in 2NF and there are no transitive dependencies, meaning non-key attributes do not depend on other non-key attributes.

第三范式(3NF):如果关系满足 2NF,并且没有传递依赖,即非键属性不依赖于其他非键属性,则该关系处于 3NF。

For instance, in a table with (StudentID, CourseID, CourseName), CourseName depends only on CourseID, not on the full key (StudentID, CourseID). This violates 2NF, so the table must be split into two tables.

例如,在包含 (StudentID, CourseID, CourseName) 的表中,CourseName 仅依赖于 CourseID,而不是完全依赖于复合键 (StudentID, CourseID)。这违反了 2NF,因此必须将该表拆分为两个表。


10. Data Integrity and Security | 数据完整性与安全性

Data integrity ensures that data is accurate, consistent, and reliable over time. The main types of integrity are:

数据完整性确保数据在长期内保持准确、一致和可靠。主要的完整性类型包括:

Database security includes authentication (verifying user identity), authorisation (assigning privileges) and encryption (protecting data at rest and in transit). Backup and recovery procedures also protect data against loss or corruption.

数据库安全性包括身份验证(验证用户身份)、授权(分配权限)和加密(保护静态数据和传输中的数据)。备份和恢复过程还能防止数据丢失或损坏。


11. Advantages and Disadvantages of Databases | 数据库的优点与缺点

Compared with traditional file-based systems, database systems offer several advantages:

与传统的基于文件的系统相比,数据库系统具有以下优点:

However, databases also have some disadvantages:

然而,数据库也有一些缺点:


12. Summary and Exam Tips | 总结与考试提示

In this revision guide, we have covered the essential concepts of database systems: the definition of a database, the role of a DBMS, the three-level architecture, relational data structures, keys, SQL categories, ER modelling, normalisation, and integrity/security considerations.

在本复习指南中,我们涵盖了数据库系统的核心概念:数据库的定义、DBMS 的角色、三层体系结构、关系数据结构、键、SQL 分类、ER 建模、规范化以及完整性和安全性考虑。

For the CIE examination, remember the following tips:

针对 CIE 考试,请记住以下提示:

Mastering these database fundamentals will give you a strong foundation for both multiple-choice questions and structured exam questions on the CIE Computer Science paper.

掌握这些数据库基础将为您在 CIE 计算机科学试卷中的选择题和结构化问答题打下坚实基础。


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

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

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

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao