数据库评书—数据库恢复ARIES算法-1
在接下来的时间,我还是想分享一下我对ARIES算法的见解,在CSDN,关于这部分的内容还是比较缺少,那么我想从另外一个方向来讲解ARIES算法。
在接触ARIES算法之前,我们需要知道第一个知识点:
1.我们是如何从事务将数据存储到数据库也就是磁盘中?
数据从数据库(磁盘)到内存我们可以通过表索引,进行提取,那么对于从内存存储到磁盘,我们所接触的大部分数据库所使用的是STEAL + NO-FORCE Policy(翻译过来就是偷和不强制政策)
1.1 我们拆分来看首先是STEAL
Whether the DBMS allows buffer pool frames with uncommitted updates to be replaced (i.e., the corresponding dirty pages flushed to non-volatile storage)
简短的来说就是当没有遇到commit的时候,其实数据已经从内存(buffer)改变到磁盘(disk)里面了。
1.2 其次我们来看Force
Whether the DBMS requires that all updates made by a txn are reflected on non-volatile storage before the txn is allowed to commit
简短的来说,就是遇到commit的时候,事务才会提交,并且才会将b