📚 Databases | 数据库
Databases are fundamental tools in modern science and technology. From storing patient records in hospitals to cataloguing the genomes of thousands of species, databases allow scientists to organise, search and analyse vast amounts of information efficiently. In this revision guide, we explore the key concepts of databases that you need to know for your IGCSE Cambridge Science course.
数据库是现代科学与技术中的基础工具。从医院存储患者病历到为数千个物种的基因组编制目录,数据库使科学家能够高效地组织、检索和分析海量信息。在本复习指南中,我们将探讨IGCSE剑桥科学课程中你需要掌握的数据库核心概念。
1. What is a Database? | 什么是数据库?
A database is an organised collection of data that can be stored, accessed and managed electronically. It is designed so that data can be easily retrieved, updated and analysed, making it far more powerful than a simple paper filing system.
数据库是以电子方式存储、访问和管理的有组织的数据集合。它的设计使得数据能够被轻松地检索、更新和分析,因此远比简单的纸质归档系统更加强大。
In scientific contexts, databases are used to store experimental results, species records, chemical properties and medical histories. A well-designed database ensures that the data is accurate, consistent and always available when needed.
在科学领域中,数据库被用于存储实验结果、物种记录、化学性质和病历资料。精心设计的数据库能够确保数据准确、一致,并且在需要时随时可用。
-
A database is centralised, meaning all data is stored in one place | 数据库是集中式的,所有数据存储在一个位置
-
Multiple users can access the same database simultaneously | 多个用户可以同时访问同一个数据库
-
Data can be secured using passwords and user permissions | 数据可以通过密码和用户权限进行安全保护
2. Tables, Records and Fields | 表、记录与字段
A database is built from one or more tables. A table is a collection of data arranged in rows and columns, much like a spreadsheet but with stricter rules about what can be entered.
数据库由一个或多个表构成。表是以行和列排列的数据集合,类似于电子表格,但对于可以输入的内容有更严格的规则。
Each row in a table is called a record. A record represents a single complete item or entity, such as one experiment, one patient or one chemical element. Each column is called a field, and it stores one specific type of information about every record.
表中的每一行称为一条记录。一条记录代表一个完整的单项或实体,例如一次实验、一位患者或一种化学元素。每一列称为一个字段,它存储每条记录中某一特定类型的信息。
For example, consider a database table called Elements used by a chemistry laboratory. Each record is one element, and the fields might include name, symbol, atomic number and atomic mass.
例如,假设有一个名为Elements(元素)的数据库表,供化学实验室使用。每条记录是一种元素,字段可能包括名称、符号、原子序数和原子质量。
| Element_Name | Symbol | Atomic_Number | Atomic_Mass |
|---|---|---|---|
| Hydrogen | H | 1 | 1.008 |
| Oxygen | O | 8 | 16.00 |
| Carbon | C | 6 | 12.01 |
3. Primary Keys | 主键
Every table in a well-designed database should have a primary key. A primary key is a field that uniquely identifies each record in the table, so that no two records can ever be confused with one another.
设计良好的数据库中的每个表都应有一个主键。主键是能够唯一标识表中每条记录的字段,因此任何两条记录都不会被混淆。
In the Elements table above, the atomic number would make an excellent primary key, because every element has a different atomic number. The element name might also work, but names could theoretically repeat or change; atomic numbers are always unique and permanent.
在上面的Elements表中,原子序数是一个极好的主键,因为每种元素的原子序数都不相同。元素名称也许可行,但名称理论上可能重复或改变;而原子序数始终是唯一且固定的。
-
A primary key must be unique for every record | 主键对于每条记录必须是唯一的
-
A primary key can never be empty or null | 主键不能为空或空值
-
Common examples include ID numbers, serial numbers and unique codes | 常见例子包括ID编号、序列号和唯一代码
Primary keys allow records to be found extremely quickly. Without a primary key, the database would have to search every record to find the one required, which is slow and inefficient.
主键使得记录可以被极快地找到。如果没有主键,数据库将不得不搜索每一条记录才能找到目标记录,这是缓慢且低效的。
4. Data Types | 数据类型
Each field in a database must be assigned a data type. The data type defines what kind of value can be stored in that field, and it prevents users from entering incorrect information.
数据库中的每个字段都必须指定一种数据类型。数据类型定义了该字段可以存储的值的种类,同时防止用户输入错误信息。
For example, a field for atomic mass should be a numeric type, while a field for a chemical symbol should be text. Choosing the correct data type is essential for accurate scientific data.
例如,表示原子质量的字段应为数值类型,而表示化学符号的字段应为文本类型。选择正确的数据类型对于准确记录科学数据至关重要。
| Data Type | 数据类型 | Description | 说明 | Example | 示例 |
|---|---|---|
| Text / String | Letters, words or symbols | ‘Hydrogen’ |
| Integer | Whole numbers | 8 |
| Real / Float | Numbers with decimals | 1.008 |
| Boolean | True or false values | TRUE |
| Date / Time | Calendar dates and times | 2025-01-15 |
5. Querying a Database | 查询数据库
A query is a request made to the database to find or modify specific data. Queries allow scientists to ask complex questions, such as ‘Which elements have an atomic mass greater than 10?’ or ‘How many patients were treated in January?’
查询是向数据库发出的查找或修改特定数据的请求。查询使科学家能够提出复杂的问题,例如”哪些元素的原子质量大于10?”或”一月份有多少患者接受了治疗?”
Queries can include conditions called criteria. Criteria are written using comparison operators such as = (equals), > (greater than), < (less than), >= (greater than or equal to), and <= (less than or equal to).
查询可以包含称为条件的限制条件。条件使用比较运算符书写,例如 =(等于)、>(大于)、<(小于)、>=(大于或等于)和 <=(小于或等于)。
Logical operators AND, OR and NOT are used to combine multiple criteria. For example, a biologist might query for all species that are endangered AND live in freshwater habitats.
逻辑运算符AND(与)、OR(或)和NOT(非)用于组合多个条件。例如,生物学家可能查询所有处于濒危状态并且生活在淡水栖息地的物种。
SELECT species_name FROM Endangered_Species WHERE status = ‘Endangered’ AND habitat = ‘Freshwater’
The result of a query is displayed in a temporary table, which can then be printed, graphed or exported for further analysis. This process is known as producing a report.
查询结果显示在临时表中,之后可以被打印、绘制成图表或导出以供进一步分析。这一过程称为生成报告。
6. Structured Query Language (SQL) | 结构化查询语言
Structured Query Language (SQL) is the standard language used to communicate with databases. It allows users to create tables, insert data, update records and run queries using simple English-like commands.
结构化查询语言(SQL)是与数据库通信的标准语言。它允许用户使用类似英语的简单命令来创建表、插入数据、更新记录和执行查询。
For an IGCSE science course, you do not need to memorise complex SQL, but understanding the basic commands helps you appreciate how databases work. The four most important commands are SELECT, INSERT, UPDATE and DELETE.
对于IGCSE科学课程,你不需要记住复杂的SQL语句,但理解基本命令有助于你理解数据库的工作原理。四个最重要的命令是SELECT、INSERT、UPDATE和DELETE。
-
SELECT retrieves data from a table | SELECT用于从表中检索数据
-
INSERT adds a new record to a table | INSERT用于向表中添加新记录
-
UPDATE modifies existing records | UPDATE用于修改现有记录
-
DELETE removes records from a table | DELETE用于从表中删除记录
These four operations are collectively known as CRUD (Create, Read, Update, Delete), which is the foundation of almost every database system in the world.
这四个操作统称为CRUD(创建、读取、更新、删除),它是世界上几乎所有数据库系统的基础。
7. Databases vs Spreadsheets | 数据库与电子表格
Many students wonder why a database is needed when a spreadsheet such as Microsoft Excel can also store data. While both can hold tabular data, there are important differences.
许多学生会问:电子表格(如Microsoft Excel)也能存储数据,为什么还需要数据库呢?虽然两者都能保存表格数据,但它们之间存在重要差异。
| Feature | 特性 | Database | 数据库 | Spreadsheet | 电子表格 |
|---|---|---|
| Volume of data | 数据量 | Can handle millions of records efficiently | 能高效处理数百万条记录 | Becomes slow with very large data sets | 数据量过大时速度变慢 |
| Multiple users | 多用户访问 | Many users can access simultaneously | 许多用户可以同时访问 | Usually one user at a time | 通常一次只能一人使用 |
| Data validation | 数据验证 | Strict rules and data types enforced | 强制严格的规则和数据类型 | Limited checking, errors possible | 检查有限,可能出错 |
| Relationships | 关系 | Tables can be linked together | 表之间可以相互关联 | No built-in linking | 没有内置的关联功能 |
For large-scale scientific projects, such as the Human Genome Project, spreadsheets are simply not powerful enough. Databases are the only practical choice when data is measured in gigabytes or terabytes.
对于大规模科学项目,例如人类基因组计划,电子表格根本不够强大。当数据量以吉字节或太字节计算时,数据库是唯一实用的选择。
8. Databases in Scientific Research | 数据库在科学研究中的应用
Databases are used across all branches of science, from biology to astronomy. They allow researchers to store, share and compare data collected from all over the world.
数据库被广泛应用于从生物学到天文学的所有科学分支。它们使研究人员能够存储、共享和比较来自世界各地的数据。
One well-known example is the Chemical Abstracts Service (CAS), which combines data on more than 200 million chemical substances. This database is essential for chemists who need to know the properties and reactions of known compounds.
一个著名的例子是美国化学文摘社(CAS),它汇集了超过2亿种化学物质的数据。对于需要了解已知化合物性质和反应的化学家来说,这个数据库至关重要。
-
Medicine: patient records, drug interactions and disease tracking | 医学:病历、药物相互作用和疾病追踪
-
Ecology: species populations, migration patterns and habitats | 生态学:物种种群、迁徙模式和栖息地
-
Astronomy: star catalogues, galaxy surveys and telescope data | 天文学:恒星目录、星系巡天和望远镜数据
-
Meteorology: weather records, climate trends and forecasts | 气象学:天气记录、气候趋势和预报
Databases also make scientific collaboration possible. Researchers in different countries can upload their results to a shared database, allowing the global scientific community to build on each other’s discoveries.
数据库还使科学协作成为可能。不同国家的研究人员可以将他们的结果上传到共享数据库中,使全球科学界能够在他人的发现基础上继续前进。
9. Data Integrity and Security | 数据完整性与安全性
Data integrity means that the data in a database is accurate, consistent and reliable. Several mechanisms help maintain integrity, including validation rules, range checks and data types.
数据完整性是指数据库中的数据准确、一致且可靠。多种机制有助于维护完整性,包括验证规则、范围检查和数据类型。
A validation rule might check that a temperature value is between -273 °C and 500 °C, or that a date of birth is not in the future. If someone tries to enter an invalid value, the database rejects it and shows an error message.
验证规则可以检查温度值是否在-273 °C到500 °C之间,或者出生日期是否在未来。如果有人试图输入无效值,数据库会拒绝该输入并显示错误消息。
Security is equally important, especially for sensitive scientific data such as patient records. Databases use user authentication (passwords and usernames) and access levels so that only authorised users can view or edit certain data.
安全性同样重要,尤其是对于患者记录等敏感科学数据。数据库使用用户身份验证(密码和用户名)和访问权限级别,确保只有授权用户才能查看或编辑某些数据。
Regular backups are essential. If a database is damaged or deleted, a recent backup allows the data to be restored, preventing irreplaceable scientific records from being lost.
定期备份至关重要。如果数据库被损坏或删除,最近的备份可以恢复数据,防止不可替代的科学记录丢失。
10. Summary | 总结
Databases are powerful, organised data storage systems that play an essential role in modern science. They are built from tables, records and fields, with primary keys ensuring each record is unique. Data is protected using appropriate data types, validation rules and user permissions.
数据库是强大而有组织的数据存储系统,在现代科学中发挥着至关重要的作用。它们由表、记录和字段构成,主键确保每条记录都是唯一的。通过适当的数据类型、验证规则和用户权限来保护数据。
For IGCSE Cambridge Science, you should be able to identify the components of a database, understand the purpose of a primary key, explain the difference between a database and a spreadsheet, and give examples of how databases are used in scientific research. Mastering these ideas will give you a solid foundation for more advanced topics in computer science and data analysis.
对于IGCSE剑桥科学考试,你应该能够识别数据库的组成部分,理解主键的用途,解释数据库与电子表格的区别,并举例说明数据库在科学研究中的应用。掌握这些概念将为你在计算机科学和数据分析方面更高级的学习打下坚实的基础。
Published by TutorHao | Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导