DBMS 中使用的数据结构

发布于 2024-07-13 10:36:49 字数 58 浏览 4 评论 0原文

Oracle、MySQL 等 DBMS 中使用的数据结构是什么? Sqlite 用于存储和检索记录。

What are the datastructure used in DBMS like Oracle,MySQL & Sqlite for storing and retrieving records.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

治碍 2024-07-20 10:36:49

通常是 B-Trees 的巧妙实现

来自上面链接的维基百科文章:

m阶B树(每个节点的子节点的最大数量)是满足以下属性的树:

  1. 每个节点最多有 m 个子节点。
  2. 每个节点(根和叶除外)至少有 m⁄2 个子节点。
  3. 如果根不是叶节点,则它至少有两个子节点。
  4. 所有叶子都出现在同一级别,并携带信息。
  5. 具有 k 个子节点的非叶节点包含 k–1 个键

其优点是可以在对数时间内访问数据,就像大多数搜索树(例如标准二叉树)一样,但在平均情况下时序属性更好。

Usually a clever implementation of B-Trees

From the above linked wikipedia article:

A B-tree of order m (the maximum number of children for each node) is a tree which satisfies the following properties:

  1. Every node has at most m children.
  2. Every node (except root and leaves) has at least m⁄2 children.
  3. The root has at least two children if it is not a leaf node.
  4. All leaves appear in the same level, and carry information.
  5. A non-leaf node with k children contains k–1 keys

The advantages of which are that data can be accessed in logarithmic time, as with most search trees (such as standard binary trees), but the timing properties are better in the average case.

笑咖 2024-07-20 10:36:49

MySQL具有可插拔存储系统。 这意味着引擎可以使用不同的存储。
目前有 5-6 个可供您使用。 由于它是开源的,您可以看到它是如何完成的。

SQLite 使用它自己的带有日志功能的 B-Tree 实现。 开源——你可以看看。

FirebirdInterbase 使用带有多记录版本控制系统的 B 树进行存储。 火鸟是开源的。 值得一看。

无法辨别 OracleMS SQL Server 或其他专有数据库系统,因为它们对存储信息保密。

MySQL has pluggable storage systems. That means that engine can use different storages.
It currently has 5-6 of them that you can use. And since it's open source, you can see how it is done.

SQLite uses it's own B-Tree implementation with journaling. Open source - you can look at it.

Firebird and Interbase are using B-Trees with multi-record versioning systems for storage. Firebird is open source. Worth looking.

Can't tell for Oracle, MS SQL Server or other proprietary database systems, since they keep storage information secret.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文