知识卡片
文件版本如何识别
新版本数据库经常还要读取旧数据,必须在解释新旧布局之前识别磁盘格式。可查看文件名约定或外部版本文件,也可让文件的固定头部携带版本信息,随后分派到对应的解码器。头部方案必须为识别版本保留跨代稳定的字节位置,否则读者需要先知道格式才能确定格式号。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 3. File Formats Versioning · 查看原书依据
The version can also be stored directly in the index file header. In this case, a part of the header (or an entire header) has to be encoded in a format that does not change between versions.
参考来源
- 位置:《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#idm46104533052456,段 129)
- 结论依据:原文讨论稳定头部的必要性与按版本选择读取器,并举两种外部版本标识。
- 原始内容:The version can also be stored directly in the index file header. In this case, a part of the header (or an entire header) has to be encoded in a format that does not change between versions.