← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 10295.a.1.a.4 · 生成模型:未记录

页与记录的分层布局

理解等级:中级

先决定页的定位方式,再决定如何在页内根据固定字段位置或显式偏移找到记录。文件头或尾适合放版本、区段入口等可快速获取的导航信息,固定模式可用字段位置代替每条记录重复字段名。简单拼接固定条目易解码,却会让在中部插入的操作搬动数据;变长条目更需要偏移层。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Database Internals》Chapter 3. File Formats(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch03.html#idm46104533200968,段 49) - 结论依据:原文从固定头尾和页布局出发,随后给出模式位置、区段表和定长条目局限。 - 原始内容:The file usually starts with a fixed-size header and may end with a fixed-size trailer, which hold auxiliary information that should be accessed quickly or is required for decoding the rest of the file.