Skip to main content

常用数据库术语表

介绍

¥Introduction

处理数据库时,你必须学习许多术语才能理解该技术、如何最好地使用它以及它与你环境的其他部分的关系。本词汇表旨在收集数据库社区中常用的术语,并提供定义和上下文,以帮助你增长知识。

¥When dealing with databases, there is a lot of terminology that you must learn in order to understand the technology, how best to use it, and how it relates to other parts of your environment. This glossary aims to collect common terminology used in the database community and provide definitions and context to help you grow your knowledge.

本词汇表仍在编写中,并且是一份动态文档。我们计划随着时间的推移更新它以添加新主题并完善现有条目。我们希望在不久的将来添加一些术语,但如果你有任何希望我们讨论的内容,请创建 GitHub 问题 来添加你的建议。

¥This glossary is a work in progress and a living document. We intend to update it to add new topics and refine the existing entries as time goes on. We have a backlog of terms we hope to add in the near future, but if you have anything you'd like us to talk about, please open a GitHub issue to add your suggestions.

术语

¥Terminology

1NF

1NF,即第一范式,描述了一种数据库规范化类型,其中每个表列只有一个值。如果列的值包含嵌套表,则不符合第一范式 (1NF)。

¥1NF, or first normal form, describes a type of database normalization where each table column only has a single value. A column that has a nested table as a value or multiple values is not in 1NF.

2NF

2NF,即第二范式,描述了一种数据库规范化类型:

¥2NF, or second normal form, describes a type of database normalization that:

  1. 满足 1NF 的要求,

    ¥satisfies the requirements of 1NF,

  2. 没有与候选键子集直接关联的值。换句话说,如果一个关系符合 1NF,并且所有非候选值都依赖于整个组合键,而不仅仅是候选键的一部分,则该关系符合 2NF。例如,如果一个 book 表的候选键由 titleauthor 组成,并且它还包含一个描述作者出生日期的 dob 字段,则它不能符合 2NF。该列值仅取决于 author 的值,如果值不同步,可能会导致不一致。

    ¥has no values that are tied directly to a subset of a candidate key. In other words, a relation is in 2NF if it is in 1NF and all of the non-candidate values are dependent on the composite key in whole, not just a portion of the candidate key. For example, a book table that has a candidate key composed of title and author cannot be in 2NF if it also includes a dob field describing the author's date of birth. That column value is dependent only on the value of author and could lead to inconsistencies if the values get out of sync.

3NF

3NF,即第三范式,描述了一种数据库规范化类型:

¥3NF, or third normal form, describes a type of database normalization that:

  1. 满足 2NF 的要求,

    ¥satisfies the requirements of 2NF,

  2. 每个非键属性不传递依赖于键属性。例如,如果 user 表的主键是 user_id 列,并且包含 user_city 列和 user_state 列,则它不属于 3NF,因为 user_state 传递依赖于 user_iduser_city(城市和州应该提取到各自的表中并一起引用)。

    ¥each non-key attribute is not transitively dependent on a key attribute. For example, if a user table has a user_id column as a primary key, a user_city column, and a user_state column, it would not be in 3NF because user_state is transitively dependent on user_id through user_city (the city and state should be extracted to their own table and referenced together).

4NF

4NF,即第四范式,描述了一种数据库规范化类型:

¥4NF, or fourth normal form, describes a type of database normalization that:

  1. 满足 BCNF 的要求,

    ¥satisfies the requirements of BCNF,

  2. 对于每个非平凡的多值依赖,依赖中的决定性属性要么是候选键,要么是候选键的超集。换句话说,如果一个字段有多个彼此独立的依赖字段,则可能导致违反 4NF 规则的冗余。

    ¥for every non-trivial multivalued dependency, the determining attribute in the dependency is either a candidate key or a superset of it. In other words, if a field has multiple dependent fields that are independent from one another, it can lead to redundancies that violate 4NF rules.

ACID

ACID(由原子性、一致性、隔离性和持久性四个单词组成的缩写)描述了数据库事务应提供的一组特性。原子性保证事务中的所有操作都将成功完成或回滚。一致性通常被认为是由应用而不是数据库维护的属性,通常通过事务来实现,以确保所有相关值都同时更新。事务隔离旨在允许并发事务独立执行。持久性意味着事务提交后将被存储在非易失性存储中。

¥ACID — an acronym created from the words atomicity, consistency, isolation, and durability — describes a set of characteristics that database transactions are meant to provide. Atomicity guarantees that all operations in a transaction will complete successfully or will be rolled back. Consistency, often considered a property maintained by the application rather than the database, is often achieved through transactions to make sure that all related values are updated at once. Transaction isolation aims to allow simultaneous transactions to execute independently. Durability means that transactions are meant to be stored on non-volatile storage when committed.

访问控制列表 (ACL)

¥Access control list (ACL)

访问控制列表(通常缩写为 ACL)是一个安全策略列表,它规定了每个用户或进程可以对哪些资源执行哪些操作。ACL 有很多不同的类型,但它们各自描述了系统允许的权限和访问模式。

¥An access control list, often shortened to ACL, is a security policy list that dictates which actions each user or process can perform on which resources. There are many different types of ACLs, but they each describe the permissions and access patterns that are allowed by a system.

活动记录 ORM

¥Active record ORM

Active Record ORM 是一种对象关系映射器,其工作原理是尝试将数据库中的每个表表示为应用中的一个类。表中的每条记录都表示为类的一个实例。通过与应用中的这些表示进行交互来添加和管理数据库条目。

¥An active record ORM is an object-relational mapper that functions by trying to represent each table in a database as a class in the application. Each record in the table is represented as an instance of the class. Database entries are added and managed by interacting with these representations in the application.

反缓存

¥Anti-caching

反缓存是一种策略,当在更快的内存缓存中找不到数据,而必须从速度较慢的持久性存储中检索时,可以使用这种策略。该技术涉及中止事务并启动异步操作,以将数据从较慢的介质提取到内存。事务可以稍后重试,并且信息将准备好从内存中提供。

¥Anti-caching is a strategy that can be used when data is not found in the faster in-memory cache and must be retrieved from slower, persistent storage. The technique involves aborting the transaction and kicking off an asynchronous operation to fetch the data from the slower medium to memory. The transaction can be retried later and the information will be ready to be served from memory.

原子性

¥Atomicity

原子性是一种主要与数据库事务相关的特性,这意味着事务中封装的操作将以“全有或全无”的方式处理。这可以防止在出现错误条件之前执行某些操作而发生部分更新,从而导致数据不一致。在事务的情况下,要么提交所有操作,要么回滚所有操作,使数据库保持事务开始时的状态。

¥Atomicity is a quality mainly associated with database transactions that means that the operations encapsulated in the transaction are handled in an all-or-nothing fashion. This prevents partial updates from occurring where some operations were performed before an error condition arose, leading to inconsistent data. In the case of transactions, either all of the operations are committed or every operation is rolled back to leave the database in the same state that it was in when the transaction began.

属性

¥Attributes

属性是描述数据库中某个实体的特性。在 ER(实体-关系)模型中,属性是指任何不属于关系的附加属性,用于添加有关实体的信息。

¥Attributes are characteristics that describe a certain entity in a database. In the ER (entity-relationship) model, attributes are any additional properties that are not relationships that add information about an entity.

身份验证

¥Authentication

身份验证是验证身份的操作。在计算和数据库中,身份验证主要用于证明请求访问权限的人员或进程拥有凭据,以验证他们可以使用特定身份进行操作。实际上,这可能包括提供身份信息(例如用户名)和相关的身份验证材料(例如密码、证书或密钥文件,或由与身份相关的人员的硬件设备生成的密钥)。身份验证与授权结合使用,以确定用户是否有权在系统上执行操作。

¥Authentication is an action that validates an identity. In computing and databases, authentication is mainly used as a way to prove that the person or process requesting access has the credentials to validate that they can operate with a specific identity. In practical terms, this might include providing an identity (like a username) and associated authentication material (such as a password, a certificate or key file, or a secret generated by a hardware device belonging to the person associated with the identity). Authentication is used in conjunction with authorization to determine if a user has permission to perform actions on a system.

授权

¥Authorization

授权是一种确定是否允许某个用户或进程执行某个操作的操作。授权涉及根据一组描述谁应该被允许执行哪些操作的准则来检查请求的操作。授权通常依赖于在请求之前进行的可信身份验证过程,以确认主体的身份。

¥Authorization is an action that determines if a certain user or process should be allowed to perform a certain action. Authorization involves checking the requested action against a set of guidelines that describe who should be allowed to perform what actions. Authorization usually relies on a trusted authentication process to take place before the request in order to confirm the subject's identity.

可用性

¥Availability

可用性是一种属性,它描述了系统运行和执行工作的程度。就数据库等计算系统而言,对于单台机器而言,可用性与该计算机上应用的正常运行时间同义。对于分布式系统,可用性受规则约束,这些规则规定了当系统的某个子集不可用时,系统可以以何种容量继续运行。

¥Availability is a property that describes the degree to which a system is running and capable of performing work. In terms of computing systems like databases, for a single machine, availability is synonymous with the uptime of the application on that computer. For distributed systems, availability is subject to rules that dictate in what capacity the system is allowed to continue functioning if a subset of the system is unavailable.

BASE

BASE - 由“基本可用”、“软状态”和“最终一致”三个词组成的首字母缩写 - 描述了一些 NoSQL 数据库的一组特性。它用于描述某些不符合 ACID 特性(原子性、一致性、隔离性和持久性)的数据库。BASE 数据库选择在网络分区的情况下以牺牲严格的数据一致性为代价来保持可用性。软状态组件指的是系统状态可能不断变化,因为不同成员会协商系统中最正确的值。最终一致性是另一个相关表述,表示只要有足够的时间,并且假设在此期间不会引入新的不一致性,系统最终将实现一致性。

¥BASE — an acronym created from the words Basically Available, Soft-state, and Eventually consistent — describes a set of characteristics of some NoSQL databases. It is offered as a description for certain databases that do not conform to the properties described by ACID-compliance (atomicity, consistency, isolation, and durability). BASE databases choose to remain available at the expense of strict data consistency in cases of network partitions. The soft-state component refers to the fact that the state of the system can be in flux as the different members negotiate the most correct values in the system. Eventually consistent is another related statement indicating that the system will eventually achieve consistency given enough time and assuming new inconsistencies aren't introduced during that time.

BCNF

BCNF,即 Boyce-Codd 范式,描述了一种数据库规范化类型:

¥BCNF, or Boyce-Codd normal form, describes a type of database normalization that:

  1. 满足 3NF 的要求,

    ¥satisfies the requirements of 3NF,

  2. 每个依赖中的关键属性(决定另一个属性值的属性)要么是从属属性的超集,要么是候选键,要么是候选键的超集。

    ¥where the determining attribute in each dependency (the attribute that dictates another attribute's value) is either a superset of the dependent attribute, is a candidate key, or is a superset of a candidate key.

蓝绿部署

¥Blue-green deployments

蓝绿部署是一种通过管理两组相同基础架构之间的活动流量来部署软件更新的技术,几乎不会造成停机。新版本可以部署到非活跃基础架构组并进行独立测试。要解决瓶颈问题,你必须首先确定限制系统性能的资源,然后添加额外容量或采取措施降低使用率。先前处于活动状态的基础架构现在将作为下一次更新的目标。如果频繁发生冲突,此策略非常有用,因为它可以确保系统不会浪费时间执行由于冲突而无法提交的事务。

¥Blue-green deployments are a technique for deploying software updates with little to no downtime by managing active traffic between two identical sets of infrastructure. New releases can be deployed to the inactive infrastructure group and tested independently. To release the new version, a traffic routing mechanism is switched to direct traffic from the current infrastructure to the infrastructure with the new version. The previously-active infrastructure now functions as the target for the next updates. This strategy is helpful in that the routing mechanism can easily switch back and forth to roll backwards or forwards depending on the success of a deployment.

瓶颈

¥Bottleneck

在计算字段,当系统的性能或容量受到单个组件争用的限制时,就会出现瓶颈。在数据库中,这可能与数据库运行的硬件或可用的网络环境有关。应用使用模式也会影响哪些资源的争用程度最高。要指定其他数据库,请使用 选项。

¥In computing, a bottleneck occurs when the performance or capacity of a system is limited by contention around a single component. In databases, this can be related to the hardware that the database runs on or the network environment that is available. Application usage patterns can also affect which resource is most under contention. To solve bottlenecks, you must first identify the resource limiting your system's performance and then either add additional capacity or take measures to reduce the rate of usage.

CAP 定理

¥CAP theorem

CAP 定理是关于分布式数据库的一条语句,它指出任何系统最多只能提供以下三个特性中的两个:一致性、可用性和分区容错性。通常,分区容忍度是任何分布式系统都必须具备的特性(因为避免所有网络分区的唯一方法是使用非分布式系统)。因此,每个分布式系统都必须决定是优先考虑数据一致性(在分区情况下不接受新的更改)还是系统可用性(为了在分区期间仍然能够引入新的更改而牺牲一些一致性)。

¥CAP theorem is a statement about distributed databases that states that any system can only provide at most two out of the following three qualities: consistency, availability, and partition tolerance. Generally, it is agreed that partition tolerance must be a feature of any distributed system (as the only way to avoid all network partitions is to have a non-distributed system). Therefore, each distributed system must make a decision as to whether they want to prioritize data consistency (by not accepting new changes in the case of a partition) or system availability (by sacrificing some consistency for the sake of still being able to introduce new changes during the partition).

CRUD

CRUD(创建、读取、更新和删除的首字母缩写)描述了用于操作存储数据的基本操作。在 SQL 中,CRUD 的组件大致对应于操作 INSERTSELECTUPDATEDELETE,但许多其他操作可以实现更精细的操作。更一般地说,CRUD 也经常在用户界面和 API 的上下文中讨论,作为系统可能允许的操作类型的描述。

¥CRUD — an acronym standing for Create, Read, Update, and Delete — describes the basic operations that one uses to operate on stored data. In SQL, the components of CRUD broadly correspond to the operations INSERT, SELECT, UPDATE, and DELETE, but many other operations facilitate more granular actions. More generally, CRUD is also often discussed in the context of user interfaces and APIs as a description of the types of actions that a system may permit.

缓存

¥Cache

缓存是系统的一个组件,旨在更快地检索高价值或频繁请求的数据。通常,缓存的功能是将有用数据的一部分存储在性能更高或更靠近客户端的介质上,而不是通常使用的专注于长期非易失性存储的持久性介质。通常,缓存的性能更高,但容量有限且价格更高。

¥A cache is a component of a system designed to allow faster retrieval for high value or frequently requested pieces of data. In general, caches function by storing a useful fraction of data on media that is either higher performance or closer to the client than the general use persistent media focused on long term, non-volatile storage. In general, caches tend to be higher performance but tend to have more limited capacity and be more expensive.

缓存旁路

¥Cache-aside

Cache-aside 是一种缓存架构,它将缓存置于应用和数据库之间的常规路径之外。在这种安排下,如果缓存中存在可用数据,应用将从缓存中获取数据。如果数据不在缓存中,应用将向原始数据源发出单独的查询以获取数据,然后将该数据写入缓存以供后续查询使用。缓存和后端数据源之间的最小交叉使该架构能够应对缓存不可用的情况。Cache-aside 非常适合读取密集型工作负载。

¥Cache-aside is a caching architecture that positions the cache outside of the regular path between application and database. In this arrangement, the application will fetch data from the cache if it is available there. If the data is not in the cache, the application will issue a separate query to the original data source to fetch the data and then write that data to the cache for subsequent queries. The minimal crossover between the cache and backing data source allows this architecture to be resilient against unavailable caches. Cache-aside is well-suited for read-heavy workloads.

缓存失效

¥Cache invalidation

缓存失效是从缓存中定位和删除特定项目的过程。通常,这在更新记录时作为例程的一部分执行,以便缓存中的数据不会向客户端提供过时的数据。

¥Cache invalidation is the process of targeting and removing specific items from a cache. Most often, this is performed as part of a routine when updating records so that the data in the cache does not serve stale data to clients.

预览版发布

¥Canary releases

预览版发布是一种发布策略,即将新版本的软件部署到一小部分服务器上,以便在影响有限的环境中测试新的更改。团队会观察测试组的部署及其结果行为,然后决定是回滚更改还是继续将更改部署到更广泛的主机。预览版发布是一种在生产环境中进行测试的方法,同时可以限制受问题影响的客户端数量。

¥A canary release describes a release strategy where new versions of software are deployed to a small subset of servers to test new changes in an environment with limited impact. The deployment and resulting behavior of the test group are observed and the team can then decide if they want to roll back the changes or continue to deploy the changes to a wider range of hosts. Canary releases are a way of testing in production while limiting the number of clients impacted by any problems.

候选键

¥Candidate key

关系数据库中的候选键是指最小超键。换句话说,候选键是任何列或列的组合,可用于唯一标识关系中的每条记录,而无需包含对特异性没有帮助的列。在 cars 表中,唯一的 car_id 列可以作为候选键,也可以是 makemodelyear 列的组合(假设该列足够具体,可以消除任何重复项)。但是,car_idmake 不会成为候选键,因为在本例中,make 对缩小每行的唯一性没有任何作用。

¥A candidate key in a relational database is the term for a minimal superkey. In other words, a candidate key is any column or combination of columns that can be used to uniquely identify each record in a relation without including columns that do not help in specificity. In a cars table, a unique car_id column would be a candidate key as well as a combination of the make, model, and year columns (assuming that's specific enough to eliminate any duplicates). However, car_id and make would not be a candidate key since in this instance, make does nothing to narrow down the uniqueness of each row.

级联

¥Cascade

在关系数据库中,级联是一种选项,用于处理在其他表中具有相关条目的记录的删除或更新。级联意味着操作(删除或更新)也应应用于子行(依赖行)。这有助于避免在删除时出现孤立行,以及在更新时出现不同步的值。

¥In relational databases, cascade is an option for how to handle deletes or updates for records that have related entries in other tables. Cascade means that the operation (delete or update) should be applied to the child, dependent rows as well. This helps you avoid orphaned rows in the case of deletes and out of sync values in the case of updates.

Cassandra

Apache Cassandra 是一个分布式、宽列 NoSQL 数据库,专注于操作和管理海量数据。Cassandra 的扩展性非常好,集群中的每个节点都可以接受读取或写入操作。数据存储在可唯一标识的行中,并根据分区键进行分区。每个分区键返回一行数据,其列名和值均在内部定义,这意味着同一列族中的每一行可能包含不同的列。

¥Apache Cassandra is a distributed, wide-column NoSQL database focused on operating on and managing large volumes of data. Cassandra scales incredibly well and each node in the cluster can accept reads or writes. Data is stored in rows that are uniquely identifiable and partitioned based on partition key. Each partition key returns a row of data with both column names and values defined internally, meaning each row in the same column family may contain different columns.

检查约束

¥Check constraint

检查约束可能是可以添加到关系数据库中最灵活的表或列约束。它被定义为一个布尔条件,系统必须满足该条件才能接受所提议的数据。由于条件的性质相当开放,因此可以使用检查约束来模拟许多不同类型的需求,以确保进入系统的数据符合预期。

¥A check constraint is perhaps the most flexible table or column constraint that can be added to a relational database. It is defined as a boolean condition that must be met for the proposed data to be accepted by the system. Because the nature of the condition is fairly open-ended, check constraints can be used to model many different types of requirements to ensure that the data coming into the system conforms to expectations.

集群

¥Cluster

在计算字段,集群是一组专用于协助执行共享任务的计算机。与部署在单台计算机上的数据库相比,数据库集群用于提高某些类型操作的容量、可用性和性能。不同的集群系统采用许多不同的拓扑结构、技术和权衡取舍,以实现不同级别的性能或容错能力。由于不同实现的多样性,很难概括适用于所有集群数据库系统的特定特性。

¥In computing, a cluster is a group of computers all dedicated to helping with a shared task. Database clusters are used to increase the capacity, availability, and performance of certain types of actions compared to database deployed on a single computer. There are many different topologies, technologies, and trade-offs that different clustered systems employ to achieve different levels of performance or fault tolerance. Because of the diversity of different implementations, it can be difficult to generalize specific characteristics that apply to all clustered database systems.

排序规则

¥Collation

数据库中的排序规则是指不同字符系统的排序和比较特性。大多数数据库允许你指定排序规则设置,这会影响系统中文本的排序、显示和相互比较方式。排序规则通常使用一组标签来定义,这些标签描述字符集、语言环境以及关于大小写、重音符号和其他字符修饰符的敏感度或不敏感度的不同选项。

¥Collation in databases refers to the ordering and comparison characteristics of different character systems. Most databases allow you to assign collation settings, which impact how text in the system are sorted, displayed, and compared against one another. Collation is often defined using a set of labels that describe the character set, language context, and different options about sensitivity or insensitivity to capitalization, accents, and other character modifiers.

集合

¥Collections

在文档数据库中,集合是用于存储文档组的容器。这些集合可能具有由应用和数据库设计者赋予的语义含义,但除此之外,它们只是系统中将不同文档集彼此划分的一种方式。可以为不同的集合分配不同的属性,并针对特定的文档集合执行操作。

¥In document databases, collections are containers that are used to store groups of documents together. The collections may have semantic meaning assigned by the application and database designers, but otherwise are simply a way to partition different sets of documents from one another in the system. Different collections can be assigned different properties and actions can be performed targeting specific collections of documents.

¥Column

列是面向表的数据库的组成部分,它标记并潜在地定义存储在该列中的每个值的类型。在传统的关系数据库中,一系列列的属性是定义表属性的主要方式之一。添加到表中的每一行都必须提供符合表列相关要求的值。在非关系数据库中,列可以具有许多不同的属性。然而,它们通常用于标记和定义记录选择存储在该列中的值的特性。

¥Columns are a component of table-oriented databases that label and potentially define the type of each value stored in that column. In traditional relational databases, the properties of a series of columns are one of the primary ways of defining the properties of the table in general. Each row added to the table must provide values that conform to the requirements associated with the table's columns. In non-relational databases, columns can have many different properties. Generally, however, they are used to label and define the characteristics for values that records choose to store in that column.

列数据库

¥Column database

列数据库或面向列的数据库是一种面向表的数据库,类似于传统的关系数据库,它在后台按列而不是按记录存储数据。这意味着与单个列关联的数据存储在一起,而不是将与单个记录关联的所有数据分组。这可以根据使用模式提供不同的性能特性,但通常不会影响用户每天与表中数据的交互方式。虽然在文献中经常被混淆,但列数据库不应与宽列数据库或列族数据库混淆。

¥A column database or column-oriented database is a table-oriented database similar to a traditional relational database that stores data in the background by column instead of by record. This means that the data associated with a single column are stored together rather than grouping all of the data associated with a single record. This can provide different performance characteristics depending on usage patterns, but generally doesn't affect how the user interacts with the data in the table on a daily basis. Although often confused in the literature, column databases are not to be confused with wide column databases or column family databases.

列族

¥Column family

列族是一种数据库对象,用于存储键值对组,其中每个键代表一个行标识符,每个值代表一组列名和值。总而言之,列族构建的东西类似于关系数据库中的表。但是,每行可以定义自己的列,这意味着行的长度各不相同,并且不必在所表示的列或存储的数据类型上相互匹配。

¥A column family is a database object that stores groups of key-value pairs where each key is a row identifier and each value is a group of column names and values. All together, a column family constructs something that is akin to a table in relational databases. However, each row can define its own columns, meaning that rows are of varying lengths and do not have to match each other in the columns represented or the data types stored.

命令查询职责分离 (CQRS)

¥Command query responsibility segregation (CQRS)

命令查询职责分离是一种应用设计模式,允许你根据操作对底层数据库的影响来分离操作。通常,这通常意味着为读取数据的查询和更改数据的查询提供不同的机制。分离这两个上下文允许你进行基础架构和系统更改,以独立扩展每个用例,从而提高性能。

¥Command query responsibility segregation is an application design pattern that allows you to separate operations based on their impact on the underlying database. In general, this usually means providing different mechanisms for queries that read data versus queries that change data. Separating these two contexts allows you to make infrastructure and system changes to scale each use-case independently, increasing performance.

提交

¥Commit

在数据库字段,提交数据是指执行并持久存储一组建议操作的过程。许多数据库配置为在系统收到每个语句时自动提交,但例如,事务是一种机制,你可以通过将多个语句分组并作为一个组提交来控制数据库的提交行为。数据库中的提交操作实际上负责在系统上执行永久性操作。

¥In the context of databases, committing data is the process whereby you execute and durably store a set of proposed actions. Many databases are configured to automatically commit each statement as it is received by the system, but transactions, for example, are one mechanism through which you can control the commit behavior of the database by grouping multiple statements together and committing them as a group. Committing in database is the action that is actually responsible for performing a permanent action on the system.

复合键

¥Composite key

在关系数据库中,复合键是由两列或多列组成的键,可用于唯一标识表中的任何记录。例如,如果我们有一个 shirts 表,其中每个尺寸和颜色的组合只存储一条记录,那么它可以有一个由 colorsize 列组合定义的复合键。

¥In relational databases, a composite key is a key composed of two or more columns that can be used to uniquely identify any record in a table. For example, if we have a shirts table that only stores a single record for each combination of size and color could have a composite key defined by a combination of the color and size columns.

并发性

¥Concurrency

并发是指系统能够同时处理多个任务而不影响整体结果的能力。并发允许系统并行执行操作,从而提高任务组的相对性能。

¥Concurrency is the ability of a system to work on multiple tasks at once without affecting the overall result. Concurrency allows systems to execute operations in parallel, increasing the relative performance of the group of tasks.

连接池

¥Connection pooling

连接池是一种策略,用于通过管理应用和数据库之间的连接来提高性能并避免连接耗尽。它通过维护数据库连接池来实现这一点。通过保持连接打开并将其重用于多个查询,应用可以省去每次都必须建立连接的开销,并且数据库的连接限制可以由连接池组件管理。

¥Connection pooling is a strategy used to improve performance and avoid connection exhaustion by managing the connections between an application and database. It does this by maintaining a pool of connections to the database. By keeping the connections open and reusing them for multiple queries, the application can forgo the overhead of having to establish a connection each time and the database's connection limits can be managed by the pooling component.

一致性

¥Consistency

一致性是数据系统的一个属性,这意味着即使引入了更改,各个数据实体也不会发生冲突,并且能够继续对其所需的信息进行建模。必须验证每条数据和更改,以确保其符合数据结构所规定的规则,并且必须注意平衡任何可能影响其他数据的更改(例如同时借记和贷记不同的账户)。

¥Consistency is a property of data systems that means that the individual data entities do not conflict and continue to model the information they intend to even as changes are introduced. Each piece of data and change must be validated to ensure that it conforms to the rules imposed on the data structures and care must be taken to balance out any changes that should impact other data (like debiting and crediting different accounts at the same time).

约束

¥Constraint

约束是对特定列或表施加的​​限制,会影响系统接受的值范围。约束用于定义数据库系统可以强制执行的规则,以确保值符合要求。

¥A constraint is a limitation imposed on a specific column or table that impacts the range of values accepted by the system. Constraints are used to define rules that the database system can enforce to ensure that values conform to requirements.

Cursor

数据库游标是客户端以可控、精确的方式迭代记录和查询结果的一种方式。游标主要用于逐行翻阅与查询匹配的结果,通过迭代返回下一行进行处理。这可以帮助你通过将结果作为队列访问来操作未知数量的记录。使用游标时必须小心,因为它们会占用数据库系统资源,可能导致锁定,并且通常会导致比实际需要更多的网络往返。

¥A database cursor is a way for clients to iterate over records and query results in a controlled, precise manner. Cursors are primarily used to page through results that match a query one-by-one by iteratively returning the next row for processing. This can help you operate on an unknown number of records by accessing the results as a queue. Care must be taken when using cursors as they take up resources on the database system, can result in locking, and often result in many more network round trips than would be required otherwise.

暗启动

¥Dark launching

暗启动是一种部署和发布策略,可帮助组织在生产环境中测试新的更改,而不会影响用户体验。暗启动是指与原始功能并行发布新代码。然后,请求和操作将被镜像并针对新旧代码运行。虽然从用户角度来看,系统的行为仅受原始代码的影响,但可以使用真实数据测试新代码,以验证功能并发现性能和功能问题。经过适当审查后,可以修改应用以专门使用新的代码路径。

¥Dark launching is a deployment and release strategy that helps organizations test new changes in production contexts without affecting the user experience. Dark launching involves releasing new code in parallel to the original functionality. Requests and actions are then mirrored and run against both the old code and the new code. While the system's behavior from the user's perspective is only affected by the original code, the new code can be tested with real data to validate functionality and catch performance and functional problems. When properly vetted, the application can be altered to use the new code path exclusively.

数据

¥Data

从广义上讲,数据是事实或信息片段。它们是包含某些信息的测量值或值。在某些情况下,数据被定义为不同于信息,因为信息是经过分析或处理的数据,而数据仅由原始值组成。然而,实际上,这些术语通常用作同义词,通常包含任何事实以及解释或将其上下文化所需的相关上下文。数据是几乎所有通信和活动的重要组成部分,在收集、分析和情境化的过程中,数据可以获得意义和价值。

¥In the broadest sense, data are facts or pieces of information. They are measurements or values that contain information about something. In some contexts, data is defined as distinct from information in that information is analyzed or processed data while data consists only of raw values. Practically speaking, however, these terms are often used as synonyms and typically encapsulate any fact along with the relevant context necessary to interpret or contextualize it. Data is an essential component of almost all communication and activity and it can gain meaning and value as it is collected, analyzed, and contextualized.

数据定义语言 (DDL)

¥Data definition language (DDL)

数据定义语言 (DDL) 是一组用于定义数据库结构和对象的命令或操作。它们是关系数据库和其他数据库的关键组件,并以 SQL 等语言中可用于管理数据的可用命令的子集的形式表示。数据定义语言是语言中专门用于描述、创建和修改结构以及用于保存数据的框架的部分。

¥A data definition language, or DDL, is a set of commands or actions that are used to define database structures and objects. They are a key component to relational and other databases and are expressed as a subset of the available commands available to manage data in languages like SQL. Data definition language is the portion of the language dedicated to describing, creating, and modifying structures and the frameworks that will hold data.

数据独立性

¥Data independence

数据独立性是一个术语,用于描述数据库客户端或应用与负责表示和存储数据的底层结构的分离。如果数据库能够以某种方式抽象结构,使得即使关系中添加了其他属性(逻辑独立性)或存储介质的细节发生变化(物理独立性),用户应用也能继续运行,则实现了数据独立性。

¥Data independence is a term used to describe the separation of database clients or applications from the underlying structure responsible for representing and storing the data. Data independence is achieved if the database is able to abstract the structure in a way that allows user applications to continue running even if additional attributes are added to a relation (logical independence) or if the details of the storage medium changes (physical independence), for instance.

数据映射器 ORM

¥Data mapper ORM

数据映射器 (ORM),或简称为数据映射器,是一种应用组件,充当数据库表示形式和应用中数据结构之间的转换桥梁。数据映射器允许你的应用逻辑和数据库数据表示保持独立。数据映射器在这两种介质之间管理和转换数据,以便每种表示形式都是独立的,并且可以智能地进行结构化。

¥A data mapper ORM, or just simply a data mapper, is an application component that acts as a go between to translate between database representations and the data structures present in applications. Data mappers allow your application logic and database data representations to remain independent. The data mapper manages and translates data between these two mediums so that each representation is independent and can be structured intelligently.

数据类型

¥Data type

数据类型是表示对有效值约束的类别或属性。例如,整数类型指定变量或字段仅适合且仅期望使用整数。数据类型允许你在定义字段或容器时指定对数据的期望和要求。然后,编程语言或应用可以验证引入的数据是否符合必要的条件。数据类型还有助于确定可对数据执行的可用操作。

¥A data type is a category or attribute that expresses a constraint on valid values. For example, an integer type specifies that only whole numbers are appropriate and expected for a variable or field. Data types allow you to specify expectations and requirements about your data when defining a field or container. The programming language or application can then validate that the introduced data meets the necessary criteria. Data types also help determine the available operations that can be performed on a piece of data.

数据库

¥Database

数据库是一种用于组织、构建和存储数据的结构。数据库通常由数据库管理系统管理,该系统提供用于操作和与数据库及其管理的数据交互的接口。数据库可以高度结构化,也可以允许更灵活的数据存储模式,并且可以存储多种不同类型的数据,以便在检索时进行查询、调用和组合。

¥A database is a structure used to organize, structure, and store data. Databases are often managed by a database management system which provides an interface to manipulate and interact with the database and the data it manages. Databases can be highly structured or allow more flexible data storage patterns and can store many different types of data in a way that allows for querying, recalling, and combining data at the time of retrieval.

数据库抽象层

¥Database abstraction layer

数据库抽象层是一种编程接口,它试图抽象底层数据库技术之间的差异,以便为应用层提供统一的体验或接口。数据库抽象层通常对开发者很有帮助,因为它们有助于规范不同产品之间的实现差异,并且即使底层技术不断发展也能保持稳定。但是,也存在一些挑战,例如泄漏抽象、向用户隐藏特定于实现的功能或优化,以及创建难以消除的依赖。

¥A database abstraction layer is a programming interface that attempts to abstract differences between underlying database technologies to provide a unified experience or interface to the application layer. Database abstraction layers are often helpful for developers because they help to normalize the implementation differences between various offerings and can stay stable even as the underlying technology evolves. However, there are some challenges as well, such as leaking abstractions, masking implementation-specific features or optimizations from the user, and creating a dependency that can be difficult to dislodge.

数据库管理员 (DBA)

¥Database administrator (DBA)

数据库管理员(DBA)负责配置、管理和优化数据库系统以及相关的软硬件生态系统。他们可能涉及的一些职责包括架构规划、配置、模式和变更管理、迁移、复制和负载平衡、分片、安全考虑、管理备份策略等等。数据库管理员通常需要具备数据库设计和理论方面的专业知识,并能够帮助组织做出有关数据库技术选择和实现的决策。在许多现代组织中,传统上由 DBA 承担的职责现在分配给开发和运营团队的各个成员,或者已转移给外部提供商,以简化工作中的一些基础设施管理部分。

¥A database administrator, or DBA, is a role responsible for configuring, managing, and optimizing database systems and the related ecosystem of software and hardware. Some responsibilities they may be involved with include architecture planning, configuration, schema and change management, migrations, replication and load balancing, sharding, security considerations, managing backup strategies, and more. Database administrators are typically expected to have expertise in database design and theory and be able to help organizations make decisions about database technology selection and implementation. In many modern organizations, the responsibilities traditionally held by DBAs are now distributed between various members of the development and operations teams or have been offloaded to external providers to simplify some of the infrastructure management portions of the job.

数据库引擎

¥Database engine

数据库引擎是数据库管理系统的一部分,负责定义数据的存储和检索方式,以及支持与系统和数据交互的操作。有些数据库管理系统支持提供不同功能和设计的多个数据库引擎,而其他系统仅支持单一数据库引擎,该引擎的设计与软件目标一致。

¥A database engine is the piece of a database management system responsible for defining how data is stored and retrieved, as well as the actions supported for interacting with the system and data. Some database management systems support multiple database engines that offer different features and designs, while other systems only support a single database engine that has been designed to align with the goals of the software.

数据库管理系统 (DBMS)

¥Database management system (DBMS)

数据库管理系统,通常称为 DBMS,甚至简称为 "database",是一种负责组织和管理数据的应用。DBMS 可以遵循许多不同的范例,并优先考虑某些目标。通常,它们至少负责持久化数据、组织和分类数据,以及提取、操作和查询数据。通常,DBMS 提供客户端/服务器模型,其中服务器负责控制和管理数据,而客户端、库或 API 可用于与服务器交互,以添加或查询数据、更改数据结构或管理系统的其他方面。

¥A database management system, often called a DBMS or even just a "database", is an application responsible for organizing and managing data. DBMSs can follow many different paradigms and prioritize certain goals. Generally, at the very least, they are responsible for persisting data, organizing and categorizing data, and ingesting, manipulating, and querying data. Most often, DBMSs offer a client / server model where the server is responsible for controlling and managing the data while clients, libraries, or APIs can be used to interact with the server to add or query data, change data structures, or manage other aspects of the system.

数据库模型

¥Database model

数据库模型是数据库管理系统用于存储、组织和提供数据访问的总体策略。有许多不同的数据库模型可用,但关系模型可能是最常见的类型,它使用高度结构化的表以特定格式存储数据。其他类型的数据库包括文档数据库、宽列数据库、层次结构数据库、键值存储等等。有些数据库系统设计为 "multi-model",这意味着它们支持在同一系统中运行具有不同类型模型的数据库。

¥A database model is the overall strategy used by a database management system for storing, organizing, and providing access to data. There are many different database models available, but the relational model, which uses highly structured tables to store data in a specific format, is perhaps the most common type. Other types of databases include document databases, wide-column databases, hierarchical databases, key-value stores, and more. Some database systems are designed to be "multi-model", meaning they support databases with different types of models running within the same system.

数据库代理

¥Database proxy

数据库代理是一个软件组件,负责管理数据库客户端和数据库服务器之间的连接。使用数据库代理的原因有很多,包括组织对有限数量的连接的访问​​、允许数据库层的透明扩展以及重定向部署和类似场景的流量。数据库代理通常设计为对应用透明,这意味着应用可以像直接连接到后端数据库一样连接到代理。

¥A database proxy is a software component responsible for managing connections between database clients and database servers. Database proxies are used for a number of reasons including organizing access to a limited number of connections, allowing transparent scaling of the database layer, and redirecting traffic for deployments and similar scenarios. Database proxies are usually designed to be transparent for applications, meaning that the applications can connect to the proxy as if they were connecting directly to the backend database.

数据集

¥Dataset

数据集,有时拼写为数据集,是单个数据的集合。通常,这代表适用于特定任务、应用或关注字段的相关数据块。通常,数据集是数据本身以及解释数据所需的结构和上下文的组合。它们通常由定量和定性值的组合组成,可以作为进一步分析和解释的原始数据。

¥A dataset, sometimes spelled data set, is a single collection of data. Typically, this represents a chunk of related data applicable to a certain task, application, or area of concern. Typically, datasets are a combination of the data itself as well as the structure and context necessary to interpret it. They often consist of a combination of quantitative and qualitative values that can act as the raw data for further analysis and interpretation.

非规范化

¥Denormalization

非规范化是将数据库中的数据和结构 "denormalized" 化或使其脱离规范化状态的过程。如果要规范化的数据结构定义错误或管理不当,则可能会意外发生这种情况。但是,在某些情况下,它通常也会被有意执行。非规范化倾向于通过将值冗余地存储在不同位置来更快地访问数据。这样做的缺点是写入性能会受到影响,并且由于使用多个位置来表示相同的数据,数据可能会不同步。

¥Denormalization is a process where the data and structure within a database is "denormalized" or taken out of a normalized state. This can happen accidentally if a data structure that is intended to be normalized is ill defined or mismanaged. However, it is often also performed intentionally in certain scenarios. Denormalization tends to allow faster access to data by storing values redundantly in different places. The drawback of this is that write performance suffers and there is a possibility that data can get out of sync since multiple locations are used to represent the same data.

脏读

¥Dirty read

脏读是一种特殊类型的异常,可能发生在一个事务读取另一个事务尚未提交的数据时。如果第二个事务回滚而不是提交,则第一个事务将使用不反映数据库实际状态的值。在某些事务隔离级别下,可能会发生脏读,这代表着在并行操作数据时可能导致不一致的风险。

¥A dirty read is a specific type of anomaly that can occur where one transaction can read data that hasn't been committed by another transaction. If the second transaction is rolled back instead of committed, the first transaction will be using a value that doesn't reflect the actual state of the database. Dirty reads are possible at certain isolation levels for transactions and represent a risk that can lead to inconsistency when manipulating data in parallel.

分布式数据库

¥Distributed database

分布式数据库是跨多个物理系统的数据库系统。为了提高性能或可用性,数据分布在多台机器上。虽然分布式系统可以帮助扩展数据库以处理更多负载,但它们也显著增加了复杂性,这可能导致一致性和分区挑战,以及某些负面的性能影响,例如在某些情况下数据写入次数的增加。

¥A distributed database is a database system that spans multiple physical systems. Data is spread across a number of machines for the sake of performance or availability. While distributed systems can help scale a database to handle more load, they also represent a significant increase in complexity that can lead to consistency and partition challenges as well as certain negative performance impacts like an increase in data writes in some cases.

文档

¥Document

在文档数据库字段,文档被视为信息的容器,代表包含相关描述性数据的单个记录或对象。文档可以具有灵活的结构,不必与系统上的其他文档匹配,并且通常可以嵌套。文档通常以 JSON 或 YAML 等数据序列化格式表示,这些格式可以使用标签和元数据来组织文档。

¥In the context of document databases, a document is considered a container for information representing a single record or object containing related descriptive data. Documents can have a flexible structure that does not have to match the other documents on the system and can often be nested. Documents are typically represented in a data serialization format like JSON or YAML that can organize the document with labels and metadata.

文档数据库

¥Document database

文档数据库是一种数据库模型,它将项目表示为单个对象(称为文档)。虽然文档可以分组组织,但它们不必共享相同的结构,并且可以设计为唯一地捕获描述相关项目所需的数据。文档数据库通常不支持强大的连接操作来将不同的文档链接在一起,但由于其在表示程序化数据结构方面的灵活性和易用性,其灵活性和快速的生产力常常受到称赞。

¥A document database is a database model that represents items in individual objects called documents. While documents can be grouped together for organization, they don't have to share the same structure and can be designed to uniquely capture the data required to describe the item in question. Document databases typically don't support robust join operations to link different documents together, but are often praised for their flexibility and quick time-to-productivity due to their flexibility and ease in representing programmatic data structures.

持久性

¥Durability

持久性是一种数据质量,表示数据已被捕获到持久存储中,即使程序崩溃也能保留。通常,这意味着将数据刷新到非易失性存储介质(例如硬盘),这种介质不需要电力来维持状态。

¥Durability is a quality of data that signifies that it has been captured on persistent storage that will survive in the event of a program crash. Typically, this means flushing the data to a non-volatile storage medium like a hard drive that doesn't require electricity to maintain state.

编码

¥Encoding

编码是一种在表示书面语言成分的字符系统和计算机可存储和操作的数字表示之间进行转换的系统。不同的编码系统已经开发出来,包含各种各样的字符范围。有些数据库系统针对特定语言或语系(例如 ASCII),而另一些则试图为适用于多种不同语言的更大字符集提供表示(例如 Unicode UTF 变体)。

¥Encoding is a system that translates between a character system that can represents the components used in written language and a digital representation that the computer can store and operate on. Different encoding systems have been developed with a wide variety of character ranges. Some are targeted at specific languages or language families (like ASCII) while others attempt to provide representation for much larger character sets appropriate for many different languages (like the unicode UTF varieties).

加密传输

¥Encrypted transport

加密传输是指在将消息发送给接收者之前对其进行加密的任何类型的通信过程。传输加密对于确保隐私(防止他人查看敏感信息)以及避免篡改(使数据操作显而易见)是必要的。部署数据库时可以使用许多不同的加密传输系统,包括 TLS/SSL 加密、VPN 和专用网络。

¥Encrypted transport is any type of communication process that encrypts its messages prior to sending them to the recipient. Transport encryption is necessary to ensure privacy (prevent others from seeing sensitive information) as well as avoid tampering (making manipulation of the data obvious). Many different encrypted transport systems can be used when deploying databases, including TLS/SSL encryption, VPNs, and private networks.

临时性

¥Ephemerality

临时性是一种特性,表示某段数据或情况并非永久存在。在许多方面,它与持久性相反。在数据库中,某些项目(例如你希望保留的数据)不应是短暂的。然而,其他组件,例如用于加密数据库和客户端之间连接的密钥,可以通过防止密钥泄漏影响未来或过去的会话而受益于短暂性。

¥Ephemerality is a characteristic that indicates that a piece of data or circumstance is not permanent. In many ways, it is the opposite of durability. In databases, certain items, like data you wish to persist, should not be ephemeral. However, other components, like a secret key used to encrypt a connection between a database and client, can benefit from being ephemeral by preventing key leakage from affecting future or past sessions.

临时存储

¥Ephemeral storage

临时存储,有时也称为易失性存储或非持久性存储,是指任何短时间存在的存储介质,通常与某些条件相关。例如,在应用中,存储在内存中的数据仅在进程运行时才会保留。同样,存储在临时目录中的数据仅在系统重启前可用。通常,临时存储适用于临时数据,或在数据存储到更永久的介质之前用作保存区域。

¥Ephemeral storage, also sometimes called volatile or non-durable storage, is any storage medium that persists for a short time, often associated with certain conditions. For instance, in applications, data being stored in memory will only survive while the process is running. Similarly, data stored to a temporary directory is only available until the system reboots. Often, ephemeral storage is useful for temporary data or as a holding area before data can be stored on a more permanent medium.

最终一致性

¥Eventual consistency

最终一致性是对某些分布式计算或数据库系统实现的一致性/可用性策略的描述。分布式系统的 CAP 定理指出,在网络分区的情况下,系统必须选择优先考虑可用性还是数据一致性。最终一致性系统选择通过继续处理请求来提高可用性,即使服务器的对等节点无法确认操作。最终,当分区问题解决后,将运行一致性例程来确定任何不一致数据的最正确状态,但有时不同服务器上的数据会不一致。

¥Eventual consistency is a description of a consistency / availability strategy implemented by certain distributed computing or database systems. The CAP theorem of distributed systems states that systems must choose whether prioritize availability or data consistency in the face of a network partition. Eventual consistent systems make the choice to favor availability by continuing to serve requests even if the server's peers are not available to confirm operations. Eventually, when the partition is resolved, a consistency routine will run to decide on the most correct state of any inconsistent data, but there will be a time where the data on different servers are not in agreement.

驱逐

¥Eviction

在缓存上下文中,逐出是指从缓存中删除一段数据的过程。发生这种情况的原因可能是当前值已被操作无效,或者由于旨在删除最旧或最少使用的数据的策略而自动发生这种情况。

¥In the context of caches, eviction is a process where a piece of data is removed from a cache. This can happen because the current value has been invalidated by an operation or it can occur automatically as a result of policies designed to remove the data that is the oldest or least used.

扩展和收缩模式

¥Expand and contract pattern

扩展和收缩模式是一种在不影响现有应用的情况下向数据库模式引入新更改的策略。它的工作原理是,首先在现有结构旁边添加新的或更改的结构,然后扩展应用逻辑以同时使用这两种结构,从而在精心控制的阶段引入更改。最终,经过测试后,应用可以停止写入原始结构并将其移除。

¥The expand and contract pattern is a strategy for introducing new changes to a database schema without affecting existing applications. It works by introducing changes in carefully controlled stages by first adding new or changed structures alongside existing structures and then expanding the application logic to use both structures simultaneously. Eventually, after testing, the application can stop writing to the original structure and it can be removed.

提取-转换-加载 (ETL)

¥Extract-transform-load (ETL)

提取、转换和加载(通常缩写为 ETL)是将数据从数据源复制到托管系统并进行处理的过程。首先,从当前系统中提取数据,以便目标系统可以访问。接下来,对数据进行操作和修改,以符合新系统的要求和格式。最后,将重建的数据加载到新系统中。

¥Extract, transform, and load, often abbreviated as ETL, is a process of copying and processing data from a data source to a managed system. First the data is extracted from its current system to make it accessible to the destination system. Next, the data is manipulated and modified to match the requirements and format of the new system. Finally, the reconstructed data is loaded into the new system.

功能标志

¥Feature flags

功能标志或功能切换是一种编程策略,涉及在外部开关或控件后面控制功能。通常首先设置开关以指示不应激活该功能。当组织准备就绪时,他们可以激活开关,程序将开始使用其新功能。这允许部署新功能而无需立即激活它们。它将新软件的部署与软件的发布分离,从而更好地控制变更的引入方式,并在生产环境中进行更全面的测试。

¥A feature flag, or a feature toggle, is a programming strategy that involves gating functionality behind an external switch or control. The switch is typically first set to indicate that the feature should not be active. When the organization is ready, they can activate the switch and the program will start using its new functionality. This allows new features to be deployed without immediately activating them. It decouples the deployment of new software from the release of the software, offering greater control over how a change is introduced and for greater testing in a production environment.

字段

¥Field

数据库列(或字段)是数据库表中特定类型数据的容器。关系数据库中的数据库字段是规则的,这意味着表中的每一行都包含相同数量且具有相同特性的字段。数据库字段可以包含的值可以通过分配给字段的数据类型以及进一步限制有效值的约束来控制。

¥A database column, or field, is a container for a specific type of data in a database table. Database fields in relational databases are regular, in the sense that each row in the table will contain the same number of fields with the same characteristics. The values that database fields can contain can be controlled by the data type assigned to the field as well as constraints that further limit the valid values.

扁平文件数据库

¥Flat-file database

扁平文件数据库是存储在文件中的数据库或类似数据库的结构。这些参数以统一的格式定义数据库的结构和数据。许多扁平文件数据库的示例,例如 CSV(逗号分隔值)文件,都是以纯文本编写的,但也存在二进制格式。扁平文件数据库与更复杂类型之间的一个区别是,存储格式本身通常负责描述数据之间的关系,而不是数据库系统。

¥A flat-file database is a database or database-like structure stored in a file. These define the structure and the data the database contains in a unified format. Many examples of flat-file databases, like CSV (comma-separated values) files are written in plain text, but binary formats exist too. One difference between flat-file databases and more complex types is that the storage format itself often is responsible for describing the relationships between data instead of the database system.

外键

¥Foreign key

外键是关系数据库中指定的列或列组,用于维护两个表之间的数据完整性。一个表中的外键引用另一个表中的候选键,通常是主键。由于引用了候选键,数据库中的每一行都是唯一的,并且两个表可以逐行链接在一起。这些指定列的值在两个表中应保持一致。外键约束允许数据库系统通过不允许值不同步来强制执行此要求。

¥A foreign key is a designated column or group of columns in a relational database that is used to maintain data integrity between two tables. A foreign key in one table refers to a candidate key, typically the primary key, in another table. Since a candidate key is referenced, each row in the database will be unique and the two tables can be linked together row for row. The values are of these designated columns is expected to remain identical across the two tables. The foreign key constraint allows the database system to enforce this requirement by not allowing the values to be out of sync.

全文检索

¥Full-text search

全文搜索描述了一系列技术和功能,允许你在数据库系统中搜索文档的全文。这与仅依赖元数据、部分文本源和其他不完整评估的搜索功能截然相反。全文搜索依赖于异步索引,使用自然语言感知解析器来分析和分类文档中的文本。

¥Full-text search describes a family of techniques and functionality that allow you to search the complete text of documents within a database system. This is in direct opposition to search functionality that relies only on metadata, partial text sources, and other incomplete assessments. Full-text search relies on asynchronous indexing using natural language-aware parsers to analyze and categorize text within documents.

图形数据库

¥Graph database

图形数据库是一种 NoSQL 数据库,它使用图形结构来存储和定义数据之间的关系。图数据库由节点构建,节点代表实体,可以包含属性或特性。节点之间通过边连接,边不仅负责链接节点,还定义关系的性质。例如,一个节点可能描述具有 "teacher" 属性的人员。它可能通过指定 "teaches" 的边连接到类节点,但也可能通过指定 "已连接" 的边连接到另一个人员节点。

¥A graph database is a NoSQL database that uses a graph structure to store and define relationships between pieces of data. Graph databases are constructed using nodes, which represent entities and can contain properties or attributes. Nodes are connected to one another using edges, which are responsible not only for linking nodes, but also defining the nature of the relationship. For example, a node might describe a person with a property of "teacher". It might be connected to a class node with an edge that specifies "teaches" but may be connected to another person node with an edge that specifies "married to".

GraphQL

GraphQL 是一种可用于查询和操作数据的语言,常用于构建 API。客户端可以指定所需的确切数据,服务器将按照提供的结构生成响应。GraphQL 的优势在于它能够使用自定义结构返回数据,将来自不同后端的数据拼接在一起,并在单个 API 调用中响应复杂的查询。

¥GraphQL is a language that can be used to query and manipulate data, commonly used for building APIs. Clients are able to specify the exact data required and the server crafts a response following the provided structure. GraphQL's strengths are its ability to return data using custom structures, stitch together data from various back ends, and answer complex queries in a single API call.

HTAP 数据库

¥HTAP database

HTAP 数据库,即混合事务/分析数据库,是一种兼具快速、可靠的事务处理能力和在同一台机器上并发处理繁重复杂分析工作负载能力的数据库。这些数据库产品并非事后分析数据,而是尝试进行实时分析,从而快速影响决策制定方式。

¥HTAP databases, or hybrid transactional/analytical databases, are a category of database that seeks to offer the advantages of both fast, reliable transactional processing and the ability to process heavy, complex analytical workloads concurrently on the same machine. Rather than analyzing data after the fact, these database offerings attempt to allow real time analysis that can impact the way decisions are made rapidly.

层次化数据库

¥Hierarchical database

层次化数据库是一种将自身组织成树状结构的数据库模型。每条新记录都附加到一条父记录。随着记录添加到数据库,随着记录从根记录向外扩展,树状结构逐渐显现。可以遍历记录之间的链接以获取其他记录。使用分层模型的系统示例包括 LDAP(轻量级目录访问协议)和 DNS(域名系统)。

¥A hierarchical database is a database model that organizes itself into a tree-like structure. Each new record is attached to a single parent record. As records are added to the database, a tree-like structure emerges as records fan out more and more from the root record. The links between records can be traversed to get to other records. Examples of systems that use a hierarchical model include LDAP (Lightweight Directory Access Protocol) and DNS (Domain Name System).

水平扩展

¥Horizontal scaling

水平扩展,也称为横向扩展,是一种扩展策略,涉及增加可执行给定任务的单元数量。这通常意味着增加工作池中可以响应请求的计算机数量。扩展具有许多优势,包括成本、灵活性和可处理的流量级别,但可能会增加协调和一致性方面的复杂性,尤其是在涉及数据时。

¥Horizontal scaling, also known as scaling out, is a scaling strategy that involves increasing the number of units that can perform a given task. This often means increasing the number of computers in a worker pool that can respond to requests. Scaling out has many advantages including cost, flexibility, and the level of traffic that can be handled, but may add complexity in terms of coordination and consistency, especially when data is involved.

热备份

¥Hot backup

热备份是指在数据库系统处于活动状态时对其进行备份。如果可能的话,它们通常是更可取的,因为它们不需要数据库系统离线即可执行操作。热备份并非总是可行,因为它们可能需要锁定数据库的某些部分,或者会降低正常数据库任务可用的 IOPS(每秒输入/输出操作数)。

¥A hot backup is a backup of a database system while it is actively in use. They are often preferable, if possible, because they do not require the database system to be taken offline to perform the operation. Hot backups are not always possible as they can require locking certain parts of the database or can reduce the IOPS (Input / Output Operations per Second) available for normal database tasks.

内存数据库

¥In-memory database

内存数据库是一种数据库系统,其中整个数据集都可以加载到计算机内存中并在其中进行处理。这种处理模型提供了巨大的性能优势,因为所有数据都已存储在主内存中,并且从速度较慢的存储中检索数据没有延迟。 === 这需要数据库客户端(用于与数据库交互的组件)和数据库服务器(存储、组织和提供数据访问的实际 PostgreSQL 实例)之间的协调。使用内存数据库时必须小心,制定在机器重启时持久化数据或重新填充内存信息的策略。

¥An in-memory database is a database system where the entire data set can all be loaded into and processed in the computer's memory. This processing model offers huge performance benefits as all of the data is already in main memory and there is no delay retrieving data from slower storage. Care must be taken when using in-memory databases to have a strategy for persisting the data or repopulating the in-memory information when the machines are restarted.

索引

¥Index

数据库索引是一种结构,用于在表中更快地查找记录。索引允许数据库系统通过为特定列的值保留单独的结构来高效地查找数据。针对索引列的查询可以通过使用比逐行检查每行更高效的查找策略来快速识别表中的适用行。索引列可以提升读取操作的性能,但由于表和索引都需要更新,因此会增加写入操作的开销。在设计表索引时,平衡这两个考虑因素非常重要。

¥A database index is a structure that is created to allow for faster record finding within a table. An index allows the database system to look up data efficiently by keeping a separate structure for the values of specific columns. Queries that target the indexed columns can identify applicable rows in the table quickly by using a more efficient lookup strategy than checking each row line by line. Indexed columns improve read operations but do add overhead to write operations since both the table and the index must be updated. It is important to balance these two considerations when designing table indexes.

数据采集

¥Ingesting

数据导入是指将新数据导入数据系统的操作。这可以是一次性的数据加载操作,也可以是持续使用其他系统生成的数据。数据提取是填充和更新分析数据库和大数据存储的常见阶段,因为它们通常涉及整合来自不同来源的数据。

¥Ingesting data is the act of importing new data into a data system. This can be a one-off data loading operation or a continuous consumption of data being generated by other systems. Data ingestion is a common stage of populating and updating analytic databases and big data stores as they often involve consolidating data from various sources.

内连接

¥Inner join

内连接是一种关系数据库操作,它通过仅返回连接列的值在两个表中都存在的行来连接两个表。使用内连接时,两个表中的连接列必须匹配。没有行使用 NULL 值来填充一个表或另一个表中缺失的行。

¥An inner join is a type of relational database operation that joins two tables by only returning rows where the joining column values exist in both tables. With an inner join, there must be a match on the join columns in both tables. There are no rows using NULL values to pad out rows missing from one table or the other.

互动事务

¥Interactive transactions

交互式事务是一种数据库事务功能,允许客户端以临时方式手动指定事务操作。事务并非封装一组可以连续执行的查询,而是交互式事务,它允许开发者在继续事务处理之前短暂暂停数据库操作以执行其他逻辑。这为事务处理提供了灵活性,但如果管理不善,可能会导致不必要的事务运行时间。

¥Interactive transactions are a database transaction feature that allows clients to manually specify transaction operations in an ad-hoc manner. Rather than a transaction being a wrapper around a group of queries that can all be executed sequentially with no pause, interactive transactions allow developers to briefly pause their database operations to execute other logic before continuing with the transaction processing. This gives flexibility in transaction processing but can lead to unwanted transaction running times if not carefully managed.

隔离性

¥Isolation

在数据库字段,隔离性是一种属性,用于描述数据和操作在事务内部和事务之间的可见性。隔离级别可以由数据库管理员或查询创建者设置,以定义隔离级别和性能之间的权衡。隔离性是 ACID 首字母缩略词所描述的关键保证之一。

¥In the context of databases, isolation is a property that describes how data and operations are visible within and between transactions. The level of isolation can be set by the database administrator or the query author to define the trade-offs between isolation levels and performance. Isolation is one of the key guarantees described by the ACID acronym.

隔离级别

¥Isolation levels

隔离级别描述了数据库在处理事务时在隔离性和性能之间做出的不同类型的权衡。隔离级别决定了事务之间可能发生哪些类型的数据泄漏或数据异常。通常,更高级别的隔离可以提供更多保障,但处理速度会更慢。

¥Isolation levels describe different types of trade-offs between isolation and performance that databases can make when processing transactions. Isolation levels determine what types of data leaking can occur between transactions or what data anomalies can occur. In general, greater levels of isolation provide more guarantees at the expense of slower processing.

连接

¥Join

在关系数据库中,连接是基于一个或多个共享的 "join" 列连接两个表的操作。连接列中的值在每个表中必须是唯一的。连接操作根据连接列的值匹配行,以创建由每个表中的列组成的扩展虚拟行。根据用户想要对另一个表中没有匹配对应项的行执行的操作,可以使用不同类型的连接。

¥In relational databases, a join is an operation that connects two tables based on a shared "join" column or columns. The values within the join columns must be unique within each table. The join operation matches rows based on the join column values to create an extended virtual row composed of the columns from each table. Different types of joins are available based on what the user wants to do with rows that do not have a matching counterpart in the other table.

¥Key

在数据库上下文中,键是指任何可用于唯一标识单个行的属性、列或属性或列的组。某些数据由于其天然的唯一性(自然键)可以用作键,而其他数据集可能需要生成一个键来标识每条记录(代理键)。每个表或数据集合可以有多个唯一标识一行的键(称为候选键),但通常有一个主键(称为主键)被指定为访问行的主要方式。

¥In the context of databases, a key is any attribute, column, or group of attributes or columns that can be used to uniquely identify individual rows. Some pieces of data can be used as a key because of their natural uniqueness (a natural key) while other data sets may need to generate a key to identify each record (a surrogate key). Each table or data collection can have multiple keys that uniquely identify a row (called candidate keys), but typically, there is a main key (called the primary key) designated as the main way to access rows.

键值数据库

¥Key-value database

键值数据库(或键值存储)是一种允许用户使用键以任意结构存储和检索数据的数据库模型。键用于标识和访问记录,记录可以由单个值或更复杂的数据结构组成。键值数据库中的每条记录都可以定义自己的结构,因此不像关系数据库那样具有统一的表结构。键值数据库非常有用,因为它们非常灵活,并且使用许多面向对象开发者熟悉的模型。

¥A key-value database, or key-value store, is a database model that allows users to store and retrieve data with an arbitrary structure using keys. The key is used to identify and access the record, which can consist of a single value or a structure of more complex data. Each record in a key-value database can define its own structure, so there is not a unified table structure as there is in relational databases. Key-value databases are useful because they are extremely flexible and use a model that feels familiar to many object-oriented developers.

左连接

¥Left join

左连接是关系数据库的一种连接操作,该操作返回指定的第一个表的所有行,无论第二个表是否找到匹配的行。连接操作通过匹配每个表中指定比较列中具有相同值的记录来构造虚拟行。左连接的结果将包含两个表中列值匹配的行,此外还将包含第一个表(或左表)中所有不匹配的行。对于这些行,与第二个表(即右侧表)关联的列将填充 NULL 值,以指示未找到匹配的行。

¥A left join is a join operation for relational databases where all of the rows of the first table specified are returned, regardless of whether a matching row in the second table is found. Join operations construct virtual rows by matching records that have identical values in specified comparison columns from each table. The results for a left join will contain the rows from both tables where the column values matched and will additionally contain all of the unmatched rows from the first, or left, table. For these rows, the columns associated with the second, or right, table will be padded with NULL values to indicate that no matching row was found.

词素

¥Lexeme

词素是语言级别的意义单位,与自然语言处理和全文搜索上下文相关。通常,在对文本进行索引时,会将其分解为单个标记,然后使用语言级资源(例如词典、同义词库和其他词汇表)将其作为词素进行分析,以了解如何进一步处理它们。

¥Lexemes are language-level units of meaning that are relevant in natural language processing and full-text search contexts. Typically, when text is indexed, it is broken down into individual tokens which are then analyzed as lexemes using language-level resources like dictionaries, thesauruses, and other word lists to understand how to process them further.

区域设置

¥Locale

在数据库和一般计算中,区域设置指定在执行操作和渲染结果时应使用的区域、语言、国家/地区和其他上下文数据。在数据库中,区域设置会影响列排序、值之间的比较、拼写、货币标识符、日期和时间格式等。在数据库服务器级别定义正确的区域设置或在数据库会话期间请求所需的区域设置对于确保执行的操作能够产生预期结果至关重要。

¥In databases and computing in general, a locale specifies the region, language, country, and other pieces of contextual data that should be used when performing operations and rendering results. In databases, locale settings can affect things like column orderings, comparisons between values, spelling, currency identifiers, date and time formatting, and more. Defining the correct locale at the database server level or requesting the locale you need during a database session are essential for ensuring that the operations are performed will yield the expected results.

¥Lock

在数据库中,锁是一种用于防止修改数据库记录或表的技术,以便在某些操作期间保持一致性。锁可以阻止对锁定资源的任何访问,或者仅阻止执行某些操作。它们可以针对特定记录或整个表发出。由于锁会阻止并发操作访问锁定的数据,因此锁定的数据可能会影响性能并导致资源争用。

¥In databases, a lock is a technique used to prevent modification of a database record or table in order to maintain consistency during certain operations. Locks can prevent any access to the locked resource or prevent only certain operations from being performed. They can be issued for a specific record or for an entire table. Because locks prevent concurrent operations from accessing the locked data, it is possible for locked data to impact performance and lead to resource contention.

玛丽亚数据库

¥MariaDB

MariaDB 是一个开源关系数据库系统,其开发目标是在 Oracle 收购 MySQL 后,为社区中的一些人提供 MySQL 的直接替代品,因为 Oracle 收购后,社区中一些人对该项目的未来方向感到不确定。自首次分叉以来,每个项目都增加了一些功能,从而扩大了两个数据库系统之间的差距。

¥MariaDB is an open-source relational database system developed with the goal of providing a drop-in replacement for MySQL after Oracle's acquisition left some within the community uncertain about the future direction of the project. Since its initial fork, each project has added features that widen the gap between the two database systems.

微服务架构

¥Microservice architecture

微服务架构是一种影响组件开发、部署和运行的应用和服务设计。微服务方法分解应用的功能,并将每个职责实现为离散服务。服务使用明确定义的接口通过网络进行通信,而非内部函数调用。微服务通常用于帮助加快开发速度,因为每个组件都可以独立编码和迭代。隔离级别还有助于提高可扩展性,因为每个服务都可以根据需要进行扩展,这通常借助服务编排软件来实现。

¥The microservices architecture is an application and service design that affects the development, deployment, and operation of the components. The microservices approach decomposes an application's functionality and implements each responsibility as a discrete service. Rather than internal function calls, the service communicates over the network using clearly defined interfaces. Microservices are often used to help speed up development as each component can be coded and iterated on independently. It also helps with scalability as each service can be scaled as needed, often with the help of service orchestration software.

迁移(数据库、模式)

¥Migration (database, schema)

数据库或模式迁移是用于将数据库结构转换为新设计的过程。这涉及修改数据库或表的现有模式,以及转换任何现有数据以适应新结构的操作。数据库迁移通常以彼此为基础构建,并以有序列表的形式存储在版本控制中,以便可以通过按顺序应用迁移文件,从任何先前版本构建当前数据库结构。通常,开发者必须决定如何最好地修改现有数据以适应新结构,这可能包括以前不存在的列或难以轻易撤销的数据更改。

¥Database or schema migrations are processes used to transform a database structure to a new design. This involves operations to modify the existing schema of a database or table as well as transforming any existing data to fit the new structure. Database migrations are often built upon one another and stored as an ordered list in version control so that the current database structure can be built from any previous version by sequentially applying the migration files. Often, developers must make decisions about how best to modify existing data to fit the new structure which might include columns that did not previously exist or changes to data that are difficult to easily reverse.

MongoDB

MongoDB 是当今最流行的面向文档的 NoSQL 数据库系统。它使用类似 JSON 的结构存储数据,这些结构可以在数据存储时指定。每个文档可以拥有自己的结构,并根据需要调整其复杂程度。MongoDB 提供非 SQL 方法和命令,以编程或交互方式管理和查询数据。MongoDB 以其快速的性能、可扩展性和快速的开发速度而闻名。

¥MongoDB is the most popular document-oriented NoSQL database system in use today. It stores data using JSON-like structures that can be specified at the time of data storage. Each document can have its own structure with as much or as little complexity as required. MongoDB provides non-SQL methods and commands to manage and query data programmatically or interactively. MongoDB is known for its fast performance, scalability, and for enabling a rapid development pace.

单体架构

¥Monolithic architecture

单片架构是指传统应用的术语。在单体应用中,尽管为了便于开发,不同的部分可能会在内部分解,但一旦构建完成,应用就是一个具有许多不同功能和职责的单一项目。单片架构可以通过多种方式与外部世界交互,但程序内部不同功能的通信和协调在内部进行。单片架构有时被认为更容易实现,但在扩展和可用性方面缺乏灵活性,因为整个应用必须作为一个单元进行扩展和缩减。

¥Monolithic architecture is a term used to refer to a traditional application. In monoliths, although different pieces may be broken down internally for ease of development, once built, the application is a single item that has many different functions and responsibilities. Monoliths can interface with the external world in any number of ways, but the communication and coordination of different functionality within the program happens internally. Monolithic architecture is sometimes considered to be easier to implement, but does suffer from inflexibility with scaling and availability as the entire application must be scaled up and down as a single unit.

多版本并发控制 (MVCC)

¥Multiversion concurrency control (MVCC)

多版本并发控制 (MVCC) 是一种允许并发访问数据库系统内数据的策略,可替代行锁定和表锁定。MVCC 的工作原理是采用 "snapshots" 值,该值表示每个访问数据集的用户的一致数据状态。MVCC 的目标是提供一个系统,其中读取查询永远不会阻塞写入查询,写入查询也不会阻塞读取查询。每个客户端都能够像唯一用户一样读取和使用数据,同时数据库系统会跟踪每个用户读取和更新的数据的多个版本。锁定或常规事务回滚和冲突管理策略用于解决因更新相同数据而引起的争议。

¥Multiversion concurrency control, or MVCC, is a strategy for allowing concurrent access to data within database systems as an alternative to row and table locking. MVCC works by taking "snapshots" that represent a consistent data state for each user accessing a set of data. The goal of MVCC is to offer a system where read queries never block write queries and where write queries never block read queries. Each client will be able to read and use the data as if they were the only user while the database system tracks multiple versions of the data being read and updated by each user. Locking or the normal transaction rollback and conflict management strategies are used to resolve disputes caused by updating the same data.

MySQL

MySQL 是当今最流行的关系数据库系统之一。MySQL 最初于 1995 年发布,并于 2010 年被 Oracle 收购,作为功能强大且易于使用的关系型数据库,它有着悠久的历史。它提供广泛的存储引擎,并拥有非常广泛的社区支持。它在许多流行的开源和商业项目中使用,多年来一直被认为是许多互联网服务的关键软件。

¥MySQL is one of the most popular relational database systems available today. Initially released in 1995 and acquired by Oracle in 2010, MySQL has a long history as powerful and easy to use relational system. It offers a wide array of storage engines and boasts very wide community support. It is used in many popular open-source and commercial projects and for many years was considered a key piece of software for many internet services.

Neo4j

Neo4j 是一个高性能的面向图的数据库系统。它使用图数据结构提供符合 ACID 的事务,并使用 Cypher 查询语言来管理和查询存储的数据。Neo4j 允许开发者轻松扩展面向图的数据工作负载,并提供多种语言的客户端。

¥Neo4j is a high performance graph-oriented database system. It offers ACID-compliant transactions with a graph data structure and uses the Cypher querying language to manage and query stored data. Neo4j allows developers to scale graph-oriented data workloads easily and offers clients in many different languages.

网络数据库

¥Network database

网状数据库是一种早期的数据库模型,它设想的数据对象之间的关系可能比层次化数据库更复杂。网络数据库允许你表示具有多个父节点的节点,而不是将节点关系限制为单个父节点和零个或多个子节点。这允许你表示更复杂的结构,但通常,该模型已被关系数据库的引入所取代。

¥A network database is an early database model that conceived of data objects that could have more complex relationships than that of hierarchical databases. Instead of limiting a node's relationships to a single parent and zero or more children, a network database allowed you to represent nodes with multiple parents. This allowed you to represent more complex structures, but generally, the model was superseded by the introduction of relational databases.

NewSQL

NewSQL 是指一类较新的关系数据库产品,旨在弥合关系数据库系统的结构和有序保证与 NoSQL 数据库的高性能和可扩展性之间的差距。虽然 NewSQL 是一个相当宽泛的分类,但它通常指允许 SQL 或类似 SQL 查询、事务保证以及灵活扩展和分布式处理的数据库。

¥NewSQL is a descriptor for a category of more recent relational database offerings that attempt to bridge the gap between the structure and well-ordered guarantees of a relational database system and the high performance and scalability associated with NoSQL databases. While NewSQL is a fairly loose categorization, it is generally used to refer to databases that allow SQL or SQL-like querying, transaction guarantees, and flexible scaling and distributed processing.

NoSQL

NoSQL 数据库,有时也称为非关系型或不仅仅是 SQL 数据库,是一个广泛的类别,涵盖任何偏离通用关系数据库模型的数据库系统类型。虽然非关系型数据库早已存在,但该类别通常用于指代使用替代模型(例如键值存储、面向文档、面向图形和列族存储)的新一代数据库。它们通常用于管理不适合关系模型的数据,并重点关注灵活性和可扩展性。

¥NoSQL databases, also sometimes called non-relational or not only SQL databases, are a broad category that covers any type of database systems that deviates from the common relational database model. While non-relational databases have long been available, the category generally is used to refer to newer generations of databases using alternative models like key-value, document-oriented, graph-oriented, and column family stores. They generally are used to manage data that is not suited for the relational model with a heavy focus on flexibility and scalability.

节点

¥Node

在数据库中,节点通常指数据库的单个实例。术语“节点”通常用于讨论分布式数据库的基础架构,其中可能涉及多个服务器来处理一个请求。

¥In databases, a node often refers to a single instance of a database. The term node is often used when talking about the infrastructure architecture of distributed databases where multiple servers may be involved in processing a request.

不可重复读

¥Nonrepeatable read

不可重复读是一种不必要的一致性问题,可能在某些事务隔离级别发生。当事务内的重复读取操作可能根据事务外的提交返回不同的数据时,就会发生不可重复读。这种违反隔离的行为是某些事务隔离级别旨在防止的行为类型之一。

¥A nonrepeatable read is a type of unwanted consistency problem that can occur at certain transaction isolation levels. A nonrepeatable read occurs when repeated read operations within a transaction can return different data based on commits outside of the transaction. This breach of isolation is one of the types of behavior that some transaction isolation levels are designed to prevent.

规范化

¥Normalization

数据库规范化是一个构建数据库的过程,旨在消除数据冗余并避免引入不一致的可能性。规范化通常以 "标准格式" 的形式讨论,其中每种形式都比之前的形式增加了额外的检查和保证。实际上,数据规范化通常是在数据完整性保证和性能之间进行权衡,因此数据结构通常不会达到尽可能高的规范化水平。

¥Database normalization is a process of structuring a database to remove data redundancy and eliminate opportunities for inconsistencies to be introduced. Normalization is often discussed in terms of "normal forms" where each form adds additional checks and guarantees over the previous forms. In practice, data normalization is often a trade-off between data integrity guarantees and performance, so structures often are not put into the highest level of normalization possible.

OLAP 数据库

¥OLAP database

OLAP 数据库,即联机分析处理数据库,是一种主要用于分析和洞察生成的数据库系统。用于 OLAP 的数据库不需要与实时事务处理(OLTP 数据库)相同的性能特性。相反,它们通常设计用于提取和处理大型数据集、执行复杂且长时间运行的查询,以及生成报告、图表和洞察以帮助做出业务决策。

¥An OLAP database, or Online Analytic Processing database, is a database system primarily designed to be used for analytics and insight generation. Databases used for OLAP do not require the same type of performance characteristics as those involved in real-time transaction processing (OLTP databases). Instead, they usually are designed for ingesting and working on large data sets, executing complex and long-running queries, and generating reports, graphs, and insights to help make business decisions.

OLTP 数据库

¥OLTP database

OLTP 数据库,即联机事务处理数据库,是一种主要用于快速、近乎实时地执行数据库任务的数据库系统。通常,OLTP 数据库用于多个客户端可能同时访问数据且需要快速响应时间的应用。OLTP 数据库针对可靠性和处理速度进行了优化。

¥An OLTP database, or Online Transaction Processing database, is a database system primarily designed to facilitate fast, near real time database tasks. Typically, OLTP databases are used with applications where multiple clients may be accessing the data at a single time and where quick response times are required. OLTP databases are optimized for reliability and processing speed.

ORM

ORM,即对象关系映射器,是一种数据库工具,旨在在许多数据库使用的关系模型和客户端应用中使用的面向对象数据模型之间进行转换。该工具提供了一种在代码中表示数据库对象的方法,并将编程对象转换为适合存储在数据库中的格式。虽然 ORM 可以作为有用的工具,但它们通常并非完美的抽象,并且可能导致不同模型在数据表示方式上发生冲突。

¥An ORM, or Object Relational Mapper, is a database tool designed to translate between the relational model used by many databases and the object-oriented data model used in client applications. The tool offers a way represent database objects in code and to transform programming objects into a format appropriate for storing in a database. While ORMs can be helpful tools, they are usually not a perfect abstraction and can lead to issues where the different models conflict on how to represent data.

对象关系阻抗不匹配

¥Object relational impedance mismatch

对象关系阻抗不匹配是一个术语,指的是许多数据库使用的关系数据模型与许多应用使用的面向对象数据视图之间存在的普遍矛盾。阻抗不匹配是指两种模型之间的差异,这种差异使得在两种表示形式之间进行准确的转换变得困难或不可能。它是一个广义的术语,用于指代该字段中可能出现的许多不同类型的问题,包括表示继承、封装、类型差异、不同一致性保证等的问题。

¥Object relational impedance mismatch is a term used for the general tension that exists between the relational model of data used by many databases and the object-oriented view of data used in many applications. The impedance mismatch refers to the differences between the two models that makes faithful translation between the representations difficult or impossible. It is a broad term used to refer to many different types of problems that can occur within the space including problems representing inheritance, encapsulation, type differences, different consistency guarantees, and more.

乐观并发控制 (OCC)

¥Optimistic concurrency control (OCC)

乐观并发控制(有时称为 OCC)是数据库系统用来处理冲突并发操作的一种策略。乐观并发控制假设并发事务不太可能相互干扰,并允许它们继续进行。如果事务尝试提交时发生冲突,则会立即回滚。如果你认为工作负载中的大多数事务不会相互冲突,那么 OCC 是一个很有吸引力的策略。只有确实存在冲突的事务才会遭受性能损失(它们将被回滚并必须重新启动),而所有非冲突事务都可以直接执行,而无需等待是否会发生冲突。

¥Optimistic concurrency control, sometimes referred to as OCC, is a strategy used by database systems to handle conflicting concurrent operations. Optimistic concurrency control assumes that concurrent transactions will likely not interfere with each other and allows them to proceed. If a conflict occurs when a transaction attempts to commit, it will be rolled back at that time. OCC is an attractive policy if you think that most transactions within your workloads will not be in conflict with one another. Only transactions that do in fact have a conflict will suffer a performance penalty (they'll be rolled back and will have to be restarted) while all non-conflicting transactions can execute without waiting to see if a conflict will arise.

外连接

¥Outer join

外连接是一种关系数据库操作,它通过返回每个成员表的所有行来连接两个表,即使在伴表中没有匹配的记录也是如此。连接操作通过匹配每个表中指定比较列中具有相同值的记录来构造虚拟行。外连接的结果将包含两个表中列值匹配的行,此外还将包含每个表中所有不匹配的行。对于这些行,另一个表中没有匹配项的列将用 NULL 值填充,以指示未找到匹配行。

¥An outer join is a type of relational database operation that joins two tables by returning all rows from each component table, even where there is not a matching record in the companion table. Join operations construct virtual rows by matching records that have identical values in specified comparison columns from each table. The results for an outer join will contain the rows from both tables where the column values matched and will additionally contain all of the unmatched rows from each table. For these rows, the columns without a match in the other table will be padded with NULL values to indicate that no matching row was found.

参数化查询

¥Parameterized query

参数化查询(也称为预处理语句)是一种数据库查询,它预先将用户输入作为参数,而不是将字符串与用户输入连接起来。参数化查询允许你指定查询,包括预先输入的未知输入,然后提供语句中应替换的值。这可以防止 SQL 注入漏洞,在 SQL 注入漏洞中,精心设计的输入可用于使数据库系统通过将值视为可执行 SQL 代码来误解查询。

¥A parameterized query, also known as a prepared statement, is a database query that has been prepared to take user input as parameters instead of by concatenating strings with user input. Parameterized queries allow you to specify the query, including the unknown inputs ahead of time and then later provide the values that should be substituted within the statement. This prevents SQL injection vulnerabilities where carefully crafted inputs can be used to make the database system misinterpret a query by viewing values as executable SQL code.

持久性

¥Persistence

持久性是数据的一种特性,它表明状态将比创建它的过程更持久。持久化是大多数数据库系统的关键部分,它允许在数据库进程或服务器本身重启后再次加载数据。应用和数据库可以具有不同级别的持久性,以防范不同类型的故障情况,例如单系统持久性、远程持久性和集群持久性。

¥Persistence is a quality of data that indicates that the state will outlive the process that created it. Persistence is a key part of most database systems and allows the data to be loaded once again after the database process or the server itself is restarted. Applications and databases can have various levels of persistence that guard against different types of failure conditions like single system persistence, remote persistence, and cluster persistence.

持久存储

¥Persistent storage

持久存储是指任何能够在系统断电或断开连接后仍能维护数据的存储介质。为了维护更持久的数据存储库,需要持久存储。通常,持久存储比临时存储(例如内存数据)速度慢,因此数据库系统会根据需要使用各种流程在两个存储系统之间传输数据,以利用并平衡两种存储类型的缺点。

¥Persistent storage refers to any storage medium that is able to maintain data after the system loses power or is disconnected. Persistent storage is required to maintain a more permanent repository of data. Often, persistent storage is slower than ephemeral storage like in-memory data, so database systems use a variety of processes to shuttle data between the two storage systems as needed to take advantage of and balance the disadvantages of both types.

悲观并发控制 (PCC)

¥Pessimistic concurrency control (PCC)

悲观并发控制 (PCC) 是数据库系统用来处理冲突的并发操作的一种策略。与乐观并发控制相比,悲观并发控制会在出现冲突的可能性时立即短路事务。此策略可最大限度地降低缓存崩溃时数据丢失的风险,同时确保读取操作能够访问所有新数据。相反,当可能发生冲突时,它会强制执行更序列化的执行方法,虽然速度较慢,但​​可以避免无效的处理。

¥Pessimistic concurrency control, or PCC, is a strategy used by database systems to handle conflicting concurrent operations. In contrast to optimistic concurrency control, pessimistic concurrency control short circuits transactions as soon as the possibility of a conflict arises. This strategy is useful if frequent conflicts occur because it ensures that the system does not waste time executing transactions that will be unable to commit due to conflict. Instead, it enforces a more serialized execution approach when conflicts might occur, which is slower, but avoids non-productive processing.

幻读

¥Phantom read

幻读是一种隔离异常,在某些隔离级别下,事务中可能会发生这种情况。幻读是指由于事务外部的更改,导致事务期间 SELECT 操作返回不同的行。例如,如果你尝试对表中的所有记录执行 SELECT 操作,第一次可能会返回 8 行,但如果另一个事务提交了额外的行,则重复原始查询将显示不同的结果。

¥A phantom read is a type of isolation anomaly that can occur within a transaction under certain types of isolation levels. A phantom read occurs when different rows are returned for a SELECT operation during a transaction due to changes made outside of the transaction. For example if you try to SELECT all records in a table, the first time it could return 8 rows, but if another transaction commits an additional row, a repeat of the original query would show a different result.

PostgreSQL

PostgreSQL 是一款流行的高性能关系数据库系统,以其符合各种 SQL 标准而闻名。PostgreSQL 专注于提供单一、灵活的数据库引擎,而不是为不同的用例提供多个引擎。它具有高度可扩展性,并拥有大量社区新增功能和客户端应用。

¥PostgreSQL is a popular, high performance relational database system known for its compliance to various SQL standards. PostgreSQL focuses on providing a single, flexible database engine instead of offering multiple engines for different use cases. It is highly extensible and has a great range of community additions and client applications.

精度(搜索)

¥Precision (searching)

在搜索性能字段,查准率衡量检索结果与给定查询的相关程度。具体来说,搜索精度定义为相关结果数与所有返回结果数之比。高精度查询不会检索大量与查询不相关的项。

¥In the context of search performance, precision is a measure of how relevant the retrieved results are to the given query. Specifically, search precision is defined as the ratio between the number of relevant results out of all of the results that were returned. A query with a high level of precision does not retrieve many items that are not applicable to the query.

首要的关键

¥Primary key

主键是一种数据库键,被指定为唯一寻址数据库行的主要方式。虽然其他键可能能够提取单个行,但主键是专门为此目的标记的,系统强制执行唯一性检查,而不是 NULL 一致性检查。主键可以是自然键(在记录之间自然唯一的键)或代理键(专门添加以用作主键的键),并且可以由单个或多个列组成。

¥A primary key is a type of database key that is designated as the main way to uniquely address a database row. While other keys may be able to pull individual rows, the primary key is specifically marked for this purpose with the system enforcing uniqueness and not NULL consistency checks. A primary key can be a natural key (a key that is naturally unique across records) or a surrogate key (a key added specifically to serve as a primary key) and can be formed from a single or multiple columns.

查询

¥Query

在数据库中,查询是一种格式化的命令,用于使用查询语言向数据库管理系统发出请求。数据库系统处理查询以了解要采取的操作以及要返回给客户端的数据。通常,查询用于请求与特定模式匹配的数据、将新数据插入现有结构或修改并保存对现有记录的更改。除了定位数据项之外,查询通常还可以操作表结构和服务器设置等项,使其成为系统的通用管理接口。SQL,即结构化查询语言,是关系数据库中最常用的数据库查询语言。

¥In databases, a query is a formatted command used to make a request to a database management system using a query language. The database system processes the query to understand what actions to take and what data to return to the client. Often, queries are used to request data matching specific patterns, insert new data into an existing structure, or modify and save changes to existing records. In addition to targeting data items, queries can often manipulate items like table structures and the server settings, making them the general administrative interface for the system. SQL, or Structured Query Language, is the most common database querying language used with relational databases.

查询构建器

¥Query builder

查询构建器是一种数据库抽象,用于应用开发,使数据库编程更容易。与 ORM 类似,查询构建器提供了一个在应用内部使用数据库系统的接口。但是,查询构建器并非尝试将应用对象直接映射到数据库记录,而是专注于提供与数据库操作紧密相关的原生函数和方法。这允许你以编程方式构建查询,比直接使用 SQL(或其他数据库语言)字符串更安全、更灵活。

¥A query builder is a database abstraction used in application development to make programming against databases easier. Similar to an ORM, a query builder provides an interface for working with a database system from within the application. However, instead of attempting to map application objects to database records directly, query builders focus on providing native functions and methods that translate closely to the database operations. This allows you to build queries programmatically in a safer and more flexible way than working with SQL (or other database language) strings directly.

查询语言

¥Query language

查询语言是一种编程语言,专门用于在数据库中搜索、检索和操作数据。SQL,即结构化查询语言,是世界上最常见的查询语言,主要用于管理关系数据库系统中的数据。根据过程的重点和目标,查询语言操作可分为:数据定义语言 (DDL)(用于定义数据结构)、数据控制语言 (DCL)(用于系统管理任务)和数据操作语言 (DML)(用于修改数据)。

¥A query language is a type of programming language that specializes in searching for, retrieving, and manipulating data in databases. SQL, or Structured Query Language, is the most common querying language in the world and is used primarily to manage data within relational database systems. Query language operations can be categorized based on the focus and target of the procedure into Data Definition Language (DDL) when they are used to define data structures, Data Control Language (DCL) when they are used for system management tasks, and Data Manipulation Language (DML) when they are used to modify data.

查询规划器

¥Query planner

查询规划器是数据库系统的内部组件,负责将客户端提供的查询转换为可用于实际搜索数据库并构建所需响应的步骤。精心设计的查询规划器可以考虑多种潜在的解决方案,并选择能够提供最佳结果的选项。有时,查询规划器不会选择最佳解决方案,数据库管理员必须手动调整选择标准。

¥A query planner is an internal component of a database system that is responsible for translating a client provided query into steps that can be used to actually search the database and construct the desired response. Well designed query planners can consider multiple potential solutions and select the option that will give the most optimized results. Sometimes, query planners do not select the best solution and database administrators must tweak the selection criteria manually.

Raft 共识算法

¥Raft consensus algorithm

Raft 共识算法是一种旨在协调集群节点间信息共享、管理职责和故障恢复的算法。该算法提供了一种确保每个成员就数据操作达成一致的方法,并包含在网络分区或节点中断情况下的领导者选举机制。通常认为它比 Paxos 等替代方案更容易实现。

¥The Raft consensus algorithm is an algorithm designed to coordinate information sharing, management responsibilities, and fault recovery across a cluster of nodes. The algorithm provides a method to ensure that each member agrees on data operations and includes mechanisms for leader election in cases of network partitions or node outages. It is generally considered a simpler algorithm to implement than alternatives like Paxos.

读取已提交隔离级别

¥Read committed isolation level

已提交读隔离级别是关系数据库系统的一种事务隔离级别,它提供最低限度的隔离保证。在读已提交级别,事务保证不会发生脏读(脏读是指事务可以从其他尚未提交的事务中读取数据的现象)。在此隔离级别下,仍然可能出现不可重复读、幻读和序列化异常。

¥The read committed isolation level is a transaction isolation level for relational database systems that offers a minimal amount of isolation guarantees. At the read committed level, transactions are guaranteed to be free of dirty reads, a phenomena where transactions can read data from other transactions that have not been committed yet. Nonrepeatable reads, phantom reads, and serialization anomalies are still possible at this isolation level.

读取操作

¥Read operation

读取操作通常定义为检索数据而不进行修改的任何操作。读取操作通常应表现得如同底层数据是不可变的一样。它们可以修改检索到的数据以更改其格式、对其进行过滤或进行其他修改,但存储在数据库系统中的底层数据不会改变。

¥A read operation is generally defined as any operation that retrieves data without modification. Read operations should generally behave as if the underlying data were immutable. They may modify the retrieved data to change its format, filter it, or make other modifications, but the underlying data stored in the database system is not changed.

读取缓存

¥Read-through caching

直读缓存是一种缓存策略,其中缓存部署在指向后端数据源的路径中。应用将所有读取查询直接发送到缓存。如果缓存包含请求的项目,则立即返回。如果缓存请求未命中,缓存将从后端数据库获取数据,以便将项目返回给客户端并将其添加到缓存中以供将来查询。在此架构中,应用会继续将所有写入查询直接发送到后端数据库。

¥Read-through caching is a caching strategy where the cache is deployed in the path to the backing data source. The application sends all read queries directly to the cache. If the cache contains the requested item, it is returned immediately. If the cache request misses, the cache fetches the data from the backing database in order to return the items to the client and add it to the cache for future queries. In this architecture, the application continues to send all write queries directly to the backing database.

读取未提交隔离级别

¥Read uncommitted isolation level

未提交读隔离级别是关系数据库系统的一种事务隔离级别,它从根本上不提供隔离。使用读取未提交隔离级别执行的事务可能会遭受脏读、不可重复读、幻读和序列化异常的影响。一般来说,读取未提交级别不是很有用,因为它不能满足大多数用户对隔离的期望。

¥The read uncommitted isolation level is a transaction isolation level for relational database systems that fundamentally offers no isolation. Transactions performed using the read uncommitted isolation level can suffer from dirty reads, nonrepeatable reads, phantom reads, and serialization anomalies. Generally speaking, the read uncommitted level is not very useful as it does not fulfill most users' expectations for isolation.

召回

¥Recall

在搜索性能字段,查全率衡量查询能够检索到多少个相关项。召回率的具体定义是查询返回的相关结果数量与数据集中相关条目总数的比率。高召回率查询会检索大量可能与搜索查询相关的项。

¥In the context of search performance, recall is a measure of how many of the relevant items a query was able to retrieve. Recall is specifically defined as the ratio of the number of relevant results returned by a query compared to the total number of relevant entries in the dataset. A query with high recall retrieves a large number of the items that would be potentially relevant to a search query.

记录

¥Record

在数据库中,记录是一组数据,通常代表单个实体。在关系数据库中,记录与表中的行同义。每条记录可能包含多个与其关联的数据或属性(这些将是关系表中的字段)。

¥In databases, a record is a group of data usually representing a single entity. In relational databases, a record is synonymous with a row in a table. Each record may have multiple pieces of data or attributes associated with it (these would be fields in a relational table).

Redis

Redis 是一种流行的高性能键值存储系统,经常被部署为缓存、消息队列或配置存储。Redis 主要是一个内存数据库,但也可以选择将数据持久化到非易失性存储中。它具有丰富的类型、灵活的部署选项和高可扩展性。

¥Redis is a popular high performance key-value store that is frequently deployed as a cache, message queue, or configuration store. Redis is primarily an in-memory database but can optionally persist data to nonvolatile storage. It features a wide variety of types, flexible deployment options, and high scalability.

关系型数据库

¥Relational database

关系数据库是一种数据库模型,它根据称为表的预定义数据结构来组织数据项。表定义了具有特定约束和类型的各种列,每条记录都作为一行添加到表中。使用高度规则的数据结构为关系数据库系统提供了多种方法来组合各个表中的数据以回答单个查询。关系数据库的名称来源于代数关系,它描述了可用于操作常规数据的不同操作。在大多数情况下,关系数据库使用 SQL(结构化查询语言)与数据库系统交互,因为它允许用户以临时方式表达复杂的查询。

¥A relational database is a database model that organizes data items according to predefined data structures known as tables. A table defines various columns with specific constraints and types and each record is added as a row in the table. The use of highly regular data structures provides relational database systems with many ways to combine the data held within various tables to answer individual queries. Relational databases take their name from algebraic relations which describe different operations that can be used to manipulate regular data. In most cases, relational databases use the SQL (Structured Query Language) to interact with the database system as it allows users to express complex queries in an ad-hoc manner.

关系数据库管理系统 (RDBMS)

¥Relational database management system (RDBMS)

关系数据库管理系统(RDBMS)是一种管理关系数据库的数据库软件。实际上,术语 RDBMS 通常与关系数据库互换使用,但从技术上讲,RDBMS 管理一个或多个关系数据库。

¥A relational database management system, also known as an RDBMS, is database software that manages relational databases. In practice, the term RDBMS is often used interchangeably with relational database, though technically speaking, an RDBMS manages one or more relational databases.

可重复读隔离级别

¥Repeatable read isolation level

可重复读隔离级别是关系数据库系统的一种事务隔离级别,它提供比已提交读隔离级别更好的隔离性,但不如可序列化读隔离级别那么好。在可重复读隔离级别,脏读和不可重复读都会被阻止。但是,幻读和序列化异常仍然可能发生。这意味着虽然单个记录的读取保证保持稳定,但范围查询(例如返回多行的 SELECT 语句)可能会因事务外部的提交而发生变化。

¥The repeatable read isolation level is a transaction isolation level for relational database systems that offers better isolation than read committed level, but not as much isolation of the serializable level. At the repeatable read isolation level, dirty reads and nonrepeatable reads are both prevented. However, phantom reads and serialization anomalies can still occur. This means that while reads of individual records are guaranteed to remain stable, range queries (like SELECT statements that return multiple rows) can change as a result of commits outside of the transaction.

复制

¥Replication

复制是将数据从一个系统持续复制并更新到另一个系统的过程。在数据库中,这通常涉及一个服务器共享更改日志,其他服务器可以读取该日志并将其应用于自己的数据副本。这允许更改在各个服务器之间传播,而无需每个服务器在执行时批准操作。存在许多类型的复制,它们在共享方法、系统从何处复制数据的架构以及控制复制过程的策略方面有所不同。复制是许多系统中维护数据可用性、分散负载以及为备份等离线过程提供数据副本的重要功能。

¥Replication is a process of continually copying and updating data from one system to another system. In databases, this typically involves a server sharing a log of changes that other servers can read and apply to their own copies of the data. This allows changes to propagate between various servers without requiring each server to approve operations at the time of execution. Many types of replication exists that differ in terms of method of sharing, the architecture of which systems copy data from where, and what policies are in place to control the replication process. Replication is an important feature in many systems for maintaining data availability, distributing load, and providing copies of data for offline procedures like backups.

右连接

¥Right join

右连接是关系数据库的一种连接操作,无论第一个表中是否找到匹配的行,都会返回第二个指定表的所有行。连接操作通过匹配每个表中指定比较列中具有相同值的记录来构造虚拟行。右连接的结果将包含两个表中列值匹配的行,此外还将包含第二个表(即右表)中所有不匹配的行。对于这些行,与第一个表(即左侧表)关联的列将填充 NULL 值,以指示未找到匹配的行。

¥A right join is a join operation for relational databases where all of the rows of the second table specified are returned, regardless of whether a matching row in the first table is found. Join operations construct virtual rows by matching records that have identical values in specified comparison columns from each table. The results for a right join will contain the rows from both tables where the column values matched and will additionally contain all of the unmatched rows from the second, or right, table. For these rows, the columns associated with the first, or left, table will be padded with NULL values to indicate that no matching row was found.

基于角色的访问控制 (RBAC)

¥Role-based access control (RBAC)

基于角色的访问控制(也称为 RBAC)是一种安全策略,它根据用户分配的角色限制允许的操作。对象权限和执行操作的特权被分配给角色和标签,以便于管理访问权限。为了保证每个值都是唯一的,你可以在列上进一步添加 约束。用户可以成为多个角色的成员,以获得每个角色提供的权限的联合。角色有助于标准化各种角色所需的权限,并简化用户访问权限的添加或删除。

¥Role-based access control, also known as RBAC, is a security strategy that restricts the operations permitted to a user based on their assigned roles. Permissions on object and privileges to execute actions are assigned to roles, labels that make managing access easier. To grant the capabilities associated with a role to a user, the user can be made a member of the role. Users can be made a member of multiple roles to gain a union of the permissions each role provides. Roles are helpful as a way of standardizing the privileges required for various roles and making it simple to add or remove access to users.

¥Row

在关系数据库中,行是数据库表中单个记录的表示。这些数据库中的行具有预定义的结构,该结构以列集合的形式出现,这些列指定了数据类型以及可接受值范围的任何约束。关系表中的每一行都具有相同的列或字段,从而形成非常规则的数据结构。

¥In relational databases, a row is a representation of a single record within a database table. Rows in these databases have a predefined structure in the form of a collection of columns that specify the data type and any constraints on the range of acceptable values. Each row in a relational table has the same columns or fields, leading to a very regular data structure.

串行扫描

¥Serial scanning

串行扫描是一种搜索技术,涉及在搜索时根据查询分析每个潜在项目。这与基于索引的搜索相反,在基于索引的搜索中,项目会提前进行核算和组织,以便更快地响应查询。

¥Serial scanning is a search technique that involves analyzing each potential item against the query at the time of the search. This is in opposition to index-based searching where items are accounted for and organized ahead of time to allow for faster query response.

SQL

SQL,即结构化查询语言,是当今使用最广泛的数据库查询语言。它主要用于处理关系数据,并允许用户创建查询来选择、过滤、定义和操作关系数据库中的数据。虽然 SQL 是一个通用标准,但实现细节差异很大,这使得它不像预期的那样与软件无关。

¥SQL, or Structured Query Language, is the most common database querying language in use today. It is primarily used to work with relational data and allows users to create queries to select, filter, define, and manipulate the data within relational databases. While SQL is a common standard, implementation details differ widely, making it less software agnostic than hoped.

SQL 注入

¥SQL injection

SQL 注入是一种可以针对易受攻击的 SQL 支持应用执行的攻击类型。它的工作原理是精心设计输入,使数据库系统将提交的值视为可执行的 SQL 代码,从而误解查询。SQL 注入主要是由于开发者尝试使用字符串连接将未经过滤的用户输入与查询字符串组合在一起而导致的。可以使用预处理语句(也称为参数化查询)来防止这种情况,其中带有占位符的查询与替换值分开提交到数据库,以便查询值的边界清晰明确。

¥SQL injection is a type of attack that can be performed against vulnerable SQL-backed applications. It works by carefully crafting inputs that can be used to make the database system misinterpret a query by treating submitted values as executable SQL code. SQL injection is primarily caused by developers attempting to combine unsanitized user input with a query string using string concatenation. It can be prevented using prepared statements, also called parameterized queries, where the query with placeholders is submitted to the database separately from the substitute values so that the boundaries of the query values are unambiguous.

SQLite

SQLite 是一个用 C 语言库编写的关系数据库管理系统。由于它是作为库实现的,因此它不符合传统的客户端/服务器分离模型,而是依赖于库或客户端程序同时执行这两个角色来写入本地文件。它的功能极其强大,体积小巧,尤其适合嵌入式使用。SQLite 已绑定到多种不同的语言中,并作为内部存储系统广泛应用于应用中。

¥SQLite is a relational database management system written as a C language library. Since it is implemented as a library, it does not conform to the traditional client / server separation model and instead relies on the library or client program to perform both roles to write to local files. It is extremely functional for its size and is especially suitable for embedded use. SQLite has bindings in many different languages and it is deployed widely in applications as an internal storage system.

过滤输入

¥Sanitizing input

输入清理(也称为输入验证)是用于确保用户输入的值安全以便进一步处理的过程。它用于防止恶意输入,这些恶意输入可能导致应用或数据库将数据值误解为有效的应用或查询代码。输入可以通过多种不同的方式进行过滤,例如限制有效字符列表、删除对当前系统具有特殊含义的字符以及对值进行转义。一般来说,与清理输入相比,使用准备好的语句被认为更安全。

¥Sanitizing input, also known as input validation, is a process used to render user-provided values safe for further processing. It is used to guard against malicious input that can cause an application or the database to misinterpret data values as valid application or query code. Inputs can be sanitized in a number of different ways like limiting the list of valid characters, removing characters that have special meaning for the systems in use, and escaping values. Generally speaking, instead of sanitizing input, it is considered much safer to use prepared statements.

扩展

¥Scaling

扩展是扩展分配给应用或工作负载的资源,以实现更佳性能或处理更多并发活动的过程。扩展策略通常分为两类:横向扩展(也称为水平扩展)和纵向扩展(也称为垂直扩展)。水平扩展是指向池中添加更多工作器来处理传入的工作。这通常意味着添加可以执行相同操作的额外服务器,从而分散负载。扩展涉及向已在处理请求的服务器添加额外的资源,例如处理器、RAM 或存储空间。扩展允许你处理更多并发操作,但它可能会增加应用架构的复杂性。

¥Scaling is the process of expanding the resources allocated to your application or workload to allow for better performance or to handle more concurrent activity. Scaling strategies generally fall into two categories: scaling out (also called horizontal scaling) and scaling up (also known as vertical scaling). Horizontal scaling involves adding additional workers to a pool that can handle the incoming work. This often means adding additional servers that can all perform the same operations, thus distributing the load. Scaling up involves adding additional resources like processors, RAM, or storage to the server already handling requests. Scaling allows you to handle more concurrent operations but it can potentially increase the complexity of your application architecture.

模式

¥Schema

数据库模式是一种描述数据在数据库系统中组织方式的结构。它定义了数据库中每个表、字段、索引、关系、函数以及任何其他结构的格式。模式是一种定义,它告诉数据库系统对象的外观以及哪些数据可以与对象关联,哪些数据不允许与对象关联。在 PostgreSQL 中,数据库模式的含义略有不同,因为它是作为数据库对象的子对象实现的,而该对象充当其他数据库对象的命名空间。

¥A database schema is a structure describing how data should be organized within a database system. It defines the format of each table, field, index, relation, function, and any other structures held within the database. The schema is the definition that tells the database system what the object looks like and what data is and is not allowed to be associated with the object. In PostgreSQL, the database schema has a slightly different connotation in that it is implemented as a child of a database object that acts as a namespace for other database objects.

可序列化隔离级别

¥Serializable isolation level

可序列化隔离级别是关系数据库系统中提供最严格隔离保证的事务隔离级别。在可序列化级别,脏读、不可重复读、幻读和序列化异常都会被阻止。数据库系统通过中止可能发生冲突的任何事务来实现这一点,从而确保并发事务可以像串行执行一样执行。可序列化隔离提供了强大的隔离性,但由于冲突的事务可能会被中止并必须重新提交,因此它可能会遭受严重的性能问题。

¥The serializable isolation level is a transaction isolation level for relational database systems that offers the strictest isolation guarantees. At the serializable level, dirty reads, nonrepeatable reads, phantom reads, and serialization anomalies are all prevented. The database system does this by aborting any transactions where conflicts may occur, which ensures that concurrent transactions can be applied as if they were serially applied. Serializable isolation provides strong isolation, but it can suffer from significant performance problems due to the fact that conflicting transactions may be aborted and have to be resubmitted.

序列化异常

¥Serialization anomaly

序列化异常是并发事务中可能出现的问题,其中并发事务的提交顺序可能会影响结果数据。序列化异常的发生是因为不同事务中的操作可能基于其他事务可能正在更新的数据进行计算。要发布新版本,流量路由机制将切换为将流量从当前基础架构引导至新版本的基础架构。

¥A serialization anomaly is a problem that can occur with concurrent transactions where the order that concurrent transactions are committed can impact the resulting data. Serialization anomalies occur because operations in different transactions can be making calculations based on data that other transactions may be updating. To prevent serialization anomalies, transactions must use the serializable isolation level, which prevents these conditions by rolling back one of the conflicting transactions.

分片

¥Shard

数据库分片是数据库对象存储的一段记录,出于性能原因,它会被分离出来并由不同的数据库节点管理。例如,一个包含 900 万条记录的数据库表可以分成三个独立的分片,每个分片管理 300 万条记录。数据通常根据 "分片键" 进行划分,"分片键" 是确定记录应由哪个分片管理的键。每个分片管理其记录子集,并且需要一个协调组件通过引用分片键将客户端查询定向到适当的分片。分片可以在非常大的数据集中提高某些类型的性能,但它通常需要做出权衡,这可能会降低其他类型的性能(例如,在需要在多个分片之间协调的操作上)。

¥A database shard is a segment of records stored by a database object that is separated out and managed by a different database node for performance reasons. For example, a database table with 9 million records could be divided into three separate shards, each managing 3 million records. The data is typically divided according to a "shard key" which is a key that determines which shard a record should be managed by. Each shard manages its subset of records and a coordinating component is required to direct client queries to the appropriate shard by referring to the shard key. Sharding can help some types of performance in very large datasets but it often requires making trade-offs that might degrade other types of performance (for instance, on operations that need to coordinate between multiple shards).

过时数据

¥Stale data

在数据存储方面,陈旧数据是指任何不能准确反映数据最新状态的数据。这通常主要在缓存时引起关注,因为数据片段可能会在被更改失效后很长时间内被保留和使用。

¥When working with data storage, stale data refers to any data that does not accurately reflect the most recent state of the data. This is often a concern primarily when caching, as pieces of data might potentially be preserved and used long after they been invalidated by changes.

标准列族

¥Standard column family

标准列族是一种列族数据库对象,它通过定义与类似于列的键值对关联的行键来存储数据。每行都可以定义并使用自己的列,因此生成的数据集不像关系数据库表那样规则。但是,行键与列标签和值的组合仍然有点像表。标准列族为基于键的数据检索提供了良好的性能,因为它们能够将与键相关的所有信息存储在同一位置,并且可以轻松修改该键的数据结构。

¥A standard column family is a type of column family database object that stores data by defining row keys that are associated with key value pairs akin to columns. Each row can define and use its own columns, so the resulting dataset is not regular as with relational database tables. However, the row keys combined with column labels and values still somewhat resembles a table. Standard column families offer good performance for key-based data retrieval as they are able to store all of the information associated with a key in the same place and can modify the data structure for that key easily.

词干提取

¥Stemming

词干提取是全文搜索索引中使用的一种技术,其中具有相同词干的单词会被折叠成一个条目。这会增加相关结果的数量,但精度会略有下降。例如,单词 "cook"、"cooked" 和 "cooks" 可能占用单个条目,而搜索其中任何一个词都会返回整个条目的结果。

¥Stemming is a technique used in full-text search indexing where words with the same stem are collapsed into a single entry. This increases the number of relevant results considered at the expense of a slight decrease in precision. For instance, the words "cook", "cooked", and "cooks" might occupy a single entry where a search for any of the terms would return results for the whole entry.

停用词

¥Stop words

在全文搜索环境中,停用词是指不适用于搜索查询的单词列表。这些通常是语言中最常用的词,它们本身缺乏太多含义,或者模棱两可到不相关的程度。英语中的例子包括 "the"、"it" 和 "a"。

¥In full-text search contexts, stop words are a list of words that are considered inapplicable to search queries. These are typically the most common words in a language that lack much meaning on their own or are ambiguous to the point of irrelevancy. Some examples in English are words like "the", "it", and "a".

存储引擎

¥Storage engine

存储引擎是数据库管理系统中负责在数据库中插入、删除、查询和更新数据的底层组件。许多数据库功能(例如执行事务的能力)实际上都是底层存储引擎的属性。有些数据库系统(例如 MySQL)具有许多不同的存储引擎,可根据用例需求使用。其他系统(例如 PostgreSQL)专注于提供适用于所有典型场景的单一存储引擎。

¥A storage engine is the underlying component in database management systems that is responsible for inserting, removing, querying, and updating data within the database. Many database features, like the ability to execute transactions, are actually properties of the underlying storage engine. Some database systems, like MySQL, have many different storage engines that can be used according to the requirements of your use case. Other systems, like PostgreSQL, focus on providing a single storage engine that is useful in all typical scenarios.

存储过程

¥Stored procedure

存储过程是一种在数据库中定义一组客户端可以轻松运行的操作的方法。由于它们存储在数据库中,因此有时可以提高性能并避免网络延迟。存储过程与用户定义函数的不同之处在于,存储过程必须使用特殊语句显式调用,而不是合并到其他查询中,并且不能在所有相同的场景中使用。

¥A stored procedure is a way to define a set of operations within the database that clients can easily run. Because they are stored within the database, they can sometimes offer performance improvements and avoid network latency. Stored procedures differ from user defined functions in that they must be explicitly invoked with a special statement rather than incorporated into other queries and cannot be used in all of the same scenarios.

超级列族

¥Super column family

超级列族是一种列族数据库对象,它通过定义与列族关联的行键来存储数据。每行可以包含多个列族,这是一种比标准列族更进一步细分数据的方式。

¥A super column family is a type of column family database object that stores data by defining row keys that are associated with column families. Each row can contain multiple column families as a way of segmenting data further than in standard column families.

超级键

¥Superkey

超键是关系数据库模型中可用于唯一标识一条记录的任何属性集。所有其他键类型(主键、候选键、复合键等)都是超键的示例。简单超键包含所有可用属性,而候选键是任何无法通过删除额外列来简化的超键。

¥A superkey is any set of attributes within the relational database model that can be used to uniquely identify a record. All other key types (primary keys, candidate keys, composite keys, etc.) are examples of super keys. A trivial superkey contains all available attributes, while a candidate key is any superkey that cannot be simplified by removing additional columns.

¥Table

在关系数据库中,表是一种数据库结构,它以列的形式定义不同的属性,并以行的形式存储记录及其关联的列值。表的列定义的约束和数据类型以及其他表级要求描述了可以存储在表中的数据类型。由于表是一种常规数据结构,因此数据库系统能够理解其中包含的数据结构,这在某些情况下有助于提高查询性能的可预测性。

¥In relational databases, a table is a database structure that defines different attributes in the form of columns and stores records with the associated column values in the form of rows. The constraints and data types defined by a table's columns as well as additional table-level requirements describe the type of data that can be stored within the table. Since tables are a regular data structure, the database system understands the shape of the data contained within, which can help make query performance more predictable in some cases.

表别名

¥Table aliases

表别名是在查询时为现有表、计算表或类似表的数据库对象指定的名称。如果原始名称很长或含义不明确,或者表由查询本身生成,并且需要标签才能在查询的其他部分或显示中引用它,则表别名非常有用。

¥A table alias is a name given at query time for an existing or calculated table or table-like database object. Table aliases can be useful if the original name is long or ambiguous or if the table is generated by the query itself and requires a label to refer back to it in other parts of the query or for display.

三层架构

¥Three tier architecture

三层应用架构是部署 Web 应用的通用基础架构。第一层由一个或多个 Web 服务器组成,这些服务器响应客户端请求、提供静态内容并生成对后续层的请求。第二层由应用服务器处理,负责通过执行代码为前端生成响应来生成动态内容。第三层由数据库系统处理,负责响应来自中间层的请求,获取用于生成内容的自定义值。

¥The three tier application architecture is a common infrastructure architecture for deploying web applications. The first layer is comprised of one or more web servers that respond to client requests, serve static content, and generate requests to the subsequent layers. The second layer is handled by application servers and is responsible for generating dynamic content by executing code to generate responses for the front end. The third layer is handled by the database system and is responsible for responding to requests from the middle layer for custom values used to generate content.

令牌

¥Token

在自然语言处理和全文搜索中,token 是一个系统能够识别的离散词,可以根据不同的特性进行分类。令牌可能存储了与其在文本中的相对位置、类型(数字、单词、短语等)以及任何可能有用的附加元数据相关的信息。

¥In natural language processing and full-text search, a token is a discrete word that is recognized to the system and can be categorized according to different features. A token might be stored with information including its relative position in a piece of text, its type (number, word, phrase, etc.), as well as any additional metadata that might be useful.

事务

¥Transaction

数据库事务是一组组合成单个单元的操作,可以由数据库系统原子执行。事务确保其中的所有操作都成功完成,或者所有操作都回滚以返回到起始状态。这有助于保持数据完整性,并允许隔离客户端在数据库中可能执行的不同不相关操作。数据库事务提供的保证可以用 ACID(原子性、一致性、隔离性和持久性)属性来概括。

¥A database transaction is a set of operations combined into a single unit that can be executed by a database system atomically. Transactions ensure that all of the operations within them are successfully completed or that they are all rolled back to return to the starting state. This helps preserve data integrity and allows for isolation between different unrelated actions that clients may make within a database. The guarantees provided by database transactions are summarized by the ACID (atomicity, consistency, isolation, and durability) properties.

两阶段提交

¥Two-phase commit

两阶段提交是一种用于在分布式系统中实现事务的算法。两阶段提交的工作原理是将提交过程分为两个阶段。在第一阶段,接收更改的服务器会将潜在的更改传达给协调组件。协调器请求所有相关服务器投票决定是否提交。如果投票成功,则第二阶段开始,每个成员实际提交事务。该算法允许分布式系统以协调投票过程的开销为代价,维护一致的数据集。

¥Two-phase commit is an algorithm used to implement transactions in distributed systems. Two-phase commits work by separating the commit process into two general stages. In the first stage, a potential change is communicated by the server that received it to a coordinating component. The coordinator requests a vote from all of the involved servers on whether to commit or not. If the vote succeeds, the second stage begins where the transaction is actually committed by each individual member. The algorithm allows distributed systems to maintain a consistent dataset at the expense of the overhead associated with coordinating the voting procedure.

两阶段锁定

¥Two-phase locking

两阶段锁定,有时缩写为 2PL,是一种并发控制策略,用于确保事务可序列化。这两个阶段分别指的是扩展事务持有的锁数量的操作和触发释放锁的操作。两阶段锁定通过使用排他锁和共享锁来协调读写操作。需要读取数据的事务可以请求共享读锁,该锁允许其他事务读取相同数据,但会阻止写入操作。由于这是一个共享锁,每个连续的读取操作都可以同时请求一个读锁,并且在所有锁都被释放之前,数据将保持不可修改。需要修改数据的事务会请求一个排他写锁,该锁可以阻止其他写锁和任何读锁的发出。

¥Two-phase locking, sometimes abbreviated as 2PL, is a strategy for concurrency control to ensure that transactions are serializable. The two phases refer to actions that expand the number of locks held by the transaction and the actions that trigger a release of locks. Two phase locking works by using exclusive and shared locks to coordinate read and write operations. A transaction that needs to read data can request a shared read lock that allows other transactions to read the same data but blocks write operations. Because this is a shared lock, each successive read operation can simultaneously request a read lock and the data will remain unmodifiable until they are all released. A transaction that needs to modify data requests an exclusive write lock which prevents other write locks and any read locks from being issued.

插入更新

¥Upsert

更新插入是一种数据库操作,它更新现有条目或在未找到当前条目时插入新条目。Upsert 操作包含一个查询组件,用于搜索要更新的匹配记录,以及一个突变组件,用于指定应更新的值。通常,需要为其他字段提供额外的值,以处理必须创建新记录的情况。

¥An upsert is a database operation that either updates an existing entry or inserts a new entry when no current entry is found. Upsert operations consists of a querying component that is used to search for matching records to update and a mutation component that specifies which values should be updated. Often, additional values need to be provided for other fields to handle the case where a new record must be created.

¥Value

在数据库中,值是指数据库系统存储在其数据结构中的任何数据。通过附加上下文(例如存储值的字段名称),可以为值赋予超出其固有含义的含义。特定的存储结构(例如列或表)可能定义了对其存储值类型的要求。

¥When talking about databases, a value is any piece of data that the database system stores within its data structures. With additional context like the name of the field where the value is stored, meaning can be assigned to the value beyond what is intrinsically there. The specific storage structure like the column or table may define requirements about what types of values it stores.

垂直扩展

¥Vertical scaling

垂直扩展(也称为向上扩展)是一种扩展策略,它涉及向服务器或组件分配额外的资源(例如 CPU、RAM 或存储空间),以提高其性能或负载能力。纵向扩展通常是扩展工作负载最简单的策略,因为它不会增加当前部署的架构复杂性。虽然垂直扩展在许多情况下都能很好地工作,但也存在一些缺点,包括依赖单点故障以及单台机器能够合理管理的资源量有限。

¥Vertical scaling, also known as scaling up, is a scaling strategy that involves allocating additional resources like CPUs, RAM, or storage to a server or component in order to increase its performance or load capacity. Scaling up is typically the simplest strategy for scaling workloads as it does not increase the architectural complexity of the current deployment. While vertical scaling can work well in many scenarios, some disadvantages include reliance on a single point of failure and limitations on the amount of resources that can reasonably be managed by a single machine.

顶点

¥Vertices

在图数据库中,顶点是可以保存属性并通过边连接到其他顶点的实体。顶点类似于其他数据库系统中的记录或文档,因为它们具有标签或名称来指示它们所代表的对象类型,并且它们具有提供特定附加信息的属性,以区分特定顶点与同类型的其他顶点。顶点通过定义它们之间关系的边连接到其他顶点。例如,"author" 顶点可以通过 "作者:" 边连接到 "book" 顶点。

¥In graph databases, vertices are entities that can hold properties and be connected to other vertices through edges. Vertices are similar to a record or a document in other database systems as they have a label or name to indicate the type of object they represent and they have attributes that provide specific additional information to differentiate a specific vertex from others of its type. Vertices are connected to other vertices through edges that define a relationship between them. For instance, an "author" vertex can be connected to a "book" vertex with a "written by" edge.

视图

¥View

在关系数据库中,视图是存储查询的表式表示。视图在许多情况下可以用作表,但它们不是底层数据结构的一部分,而是从查询结果中派生出来的。视图对于构建比底层模式更复杂的数据表示非常有用。例如,一个视图可以连接几个表并仅显示几个相关列,即使出于一致性或性能原因,存储结构可能有所不同,这也能提高数据的可用性。

¥In relational databases, a view is a table-like representation of a stored query. Views can be used as tables in many contexts, but instead of being part of the underlying data structure, they are derived from the results of their query. Views are useful for constructing more complex representations of data than exists in the underlying schema. For example, a view might join a few tables and display only a few relevant columns, which can help make the data more useable even if a different structure is preferable for storage due to consistency or performance reasons.

易失性存储

¥Volatile storage

易失性存储是指任何依赖持续供电来保存数据的存储类型。例如,存储在 RAM 中的数据通常被认为是易失性的,因为在断电的情况下,这些数据将丢失且无法恢复。

¥Volatile storage is any type of storage that is dependent on continual power to persist data. For example, data stored in RAM is typically considered to be volatile because it will be lost and unrecoverable in the event of a power outage.

宽列存储

¥Wide-column store

宽列存储是一种 NoSQL 数据库,它使用标准列族和超级列族将数据组织成行和列。行键用于检索所有关联的列和超级列。每行可以包含完全不同的列,因为列定义和值存储在行结构本身中。

¥A wide-column store is a type of NoSQL database that organizes its data into rows and columns using standard and super column families. A row key is used to retrieve all of the associated columns and super columns. Each row can contain entirely different columns as the column definitions and values are stored within the row structure itself.

预写式日志 (WAL)

¥Write-ahead logging (WAL)

预写式日志记录 (WAL) 是一种数据修订管理方法,可提高系统在崩溃和故障期间应对数据损坏的弹性。如果没有 WAL 之类的技术,如果在数据库更改仅部分完成时系统崩溃,则可能会发生损坏。在这种情况下,数据既不是初始状态,也不是预期状态。使用预写式日志记录功能,系统会在执行操作之前将其意图记录到持久预写式日志中。这将立即登录到 PostgreSQL 会话,而不是先进入 shell:

¥Write-ahead logging, or WAL, is an approach to data revision management that increases the resiliency of systems to data corruption during crashes and failures. Without a technique like WAL, corruption can occur if the system crashes when a change to a database is only partially completed. In this case, the data will be in neither the initial nor the intended state. With write-ahead logging, the system records its intentions to a durable write-ahead log before executing operations. This way, the database can recover a known-good state of the data by reviewing the log during recovery and redoing any operations that did not complete correctly initially.

权重(搜索)

¥Weight (search)

在搜索字段,搜索权重是分配给不同类别数据的任意值,旨在影响分析相关性时项的优先级。为特定类型的信息分配较高的权重,将导致查询引擎在编译相关结果列表时,赋予该类别比其他类别更高的权重。

¥In the context of searching, a search weight is an arbitrary value assigned to different categories of data designed to influence the priority of the item when analyzed for relevance. Assigning a heavy weight to a specific type of information will cause a query engine to assign greater significance to that category compared to other categories when compiling a list of relevant results.

绕写式缓存

¥Write-around caching

绕写式缓存是一种缓存模式,其中写入查询直接发送到后端数据库,而不是先写入缓存。由于缓存中与更新相关的任何项目现在都将过期,因此此方法需要一种方法来使这些项目的缓存结果在后续读取时失效。此类型的操作方式与 类型完全相同,但没有最大字段长度限制。这种方法最适合那些一旦写入或更新就很少读取的数据。

¥Write-around caching is a caching pattern where write queries are sent to the backing database directly rather than written to the cache first. Because any items in the cache related to the update will be now be stale, this method requires a way to invalidate the cache results for those items for subsequent reads. This technique is almost always combined with a policy for cache reads to control read behavior. This approach is best for data that is read infrequently once written or updated.

回写式缓存

¥Write-back caching

回写式缓存是一种缓存方法,其中写入查询被发送到缓存而不是后端数据库。然后,缓存会定期打包写入操作并将其发送到后端数据库进行持久化。这是对直写缓存方法的修改,旨在减少高吞吐量写入操作造成的压力,但代价是发生崩溃时持久性降低。这可确保所有最近写入的数据无需额外操作即可立即供应用使用,但如果缓存在能够将写入持久化到数据库之前崩溃,则可能导致数据丢失。

¥Write-back caching is a caching method where write queries are sent to the cache instead of the backing database. The cache then periodically bundles the write operations and sends them to the backing database for persistence. This is a modification of the write-through caching approach to reduce strain caused by high throughput write operations at the cost of less durability in the event of a crash. This ensures that all recently written data is immediately available to applications without additional operations, but can result in data loss if the cache crashes before it's able to persist writes to the database.

写入操作

¥Write operation

在数据库字段,写入操作是指任何修改存储数据的数据库操作。这包括插入新记录、删除记录以及将现有记录更新为新值。

¥In the context of databases, a write operation is any database action that modifies the stored data. This includes inserting new records, deleting records, and updating existing records to new values.

直写式缓存

¥Write-through caching

直写式缓存是一种缓存模式,其中应用将更改直接写入缓存而不是后端数据库。然后,缓存会立即将新数据转发到后端数据库进行持久化。此样式的输出符合 ISO 8601 的 格式(即上述第一个 ISO 8601 样式)。在高写入量场景下,转换到写回缓存可能有意义,以防止后端数据库压力过大。

¥Write-through caching is a caching pattern where the application writes changes directly to the cache instead of the backing database. The cache then immediately forwards the new data to the backing database for persistence. This strategy minimizes the risk of data loss in the event of a cache crash while ensuring that read operations have access to all new data. In high write scenarios, it may make sense to transition to write-back caching to prevent straining the backing database.