第五课(二)|学习笔记

简介: 快速学习第五课(二)

开发者学堂课程【高校精品课-西安交通大学-数据库理论与技术:第五课】学习笔记,与课程紧密联系,让用户快速学习知识。

课程地址:https://developer.aliyun.com/learning/course/12/detail/15861


第五课(二)

 

内容介绍

一、Data Guides

二、Existence of Multiple DataGuides

三、Annotations

四、Strong Data Guides

五、Mapping Long Records to Pages

六、Allocation and Free-Space Management

七、文件组织

八、文件中的记录组织

四、Strong Data Guides

We define a class of DataGuides that supports annotations as described in the previous subsection.

Intuitively , we are interested in DataGuides where each set of label paths that share the same ( singleton ) target set in the DataGuide is exactly the set of label paths that share the same target set in the source. 

Definition 7.:Consider OEM objects s and d where d is a DataGuide for a sources.Given a label path l of slet Ts(l) be the target set of l in s, and let Td(l) be the ( singleton ) target set of l in d. Let Ls(l) = { m | Ts(m) =Ts(l)}. That is, Ls(l) is the set of all label paths in s that share the same target set as l.Similarly,let Ld(l)={ m | Td(m)=Td(l) }. That is, Ld(l) is the set of all label paths in d that share the same target set as l. If, for all label paths l of s, Ls(l) = Ld(l), then d is a strong DataGuide for s. 

For example , Figure 3(c) is not a strong DataGuide for Figure 3(a). The source target set Ts(B.C)is {6,7},and the DataGuide target set Td(B.C) is {20}.

In the source, Ls(B.C) is {B.C}, since no other source label paths have the same target set. 

In the DataGuide(c),however,Ld(B.C)is{B.C,A.C}. SinceLs(B.C)# Ld(B.C), the DataGuide is not strong.The reader may verify that Figure 3(b)is in fact a strong DateGuide 

Next, we prove that a strong DataGuide is sufficient for storage of annotations.

Theorem 1:Suppose d is a strong DataGuide for a source s. lf an annotation p of some label path l is stored on the object o reachable via l in d,then p describes the target set in s of each label path that reaches o.

We also prove that a strong DataGuide induces a straightforward one-to-one correspondence between source target sets and DataGuide objects.This property is useful for incremental maintenance and query processing.

Theorem 2:Suppose d is a strong DataGuide for a source s.Given any target sett of s,t is by definition the target set of some label path l.Compute Td(l),the target set of l in d,which has a single element o.Let F describe this procedure, which takes a source target set as input and yields a DataGuide object as output. In a strong DataGuide,F induces a one-to-one correspondence between source target sets and DataGuide objects.

 

五、Mapping Long Records to Page

1.Long Pages

(1)Allows long pages (up to 64K bytes).

(2)Internally, long records are managed just as short ones.

(3)Simple solution, but inadequate for very large records.

(4)Used in DB2 and Oracle.

2.Separate Pages for Long Fields

(1)Instead of keeping entire long field in a record.

(2)maintains only a pointer to the long field stored in another page.

(3)The main record is then treated as a short tuple.

(4)Good results if long attributes are accessed infrequently.

(5)Unfortunately, performance suffers in situations when ong attributes are accessed frequently.

 图片254.png

 

六、Allocation and Free-Space Management

1.Free-Space Information Pages

Advantages:

(1)FSIPs need not always be updated during allocation and deallocation.

(2)Deallocations are relatively fast and simple

(3)Provides good storage utilization and reclamation(回收) of free and unused space.

Disadvantages:

Allocations may require several disk accesses.

部分习题如下:

图片255.png

图片256.png

相关文章
|
存储 数据库 开发者
第五课(三)|学习笔记
快速学习第五课(三)
111 0
第五课(三)|学习笔记
|
搜索推荐 网络协议 Java
第四课(二)|学习笔记
快速学习第四课(二)
80 0
第四课(二)|学习笔记
|
存储 缓存 移动开发
第四课(三)|学习笔记
快速学习第四课(三)
84 0
第四课(三)|学习笔记
|
算法 架构师 数据管理
第四课(一)|学习笔记
快速学习第四课(一)
68 0
第四课(一)|学习笔记
|
存储 机器学习/深度学习 人工智能
第一课(三)|学习笔记
快速学习第一课(三)
124 0
第一课(三)|学习笔记
|
存储 SQL 算法
第一课(二)|学习笔记
快速学习第一课(二)
101 0
第一课(二)|学习笔记
|
运维 算法 Cloud Native
第三课(三)|学习笔记
快速学习第三课(三)
148 0
第三课(三)|学习笔记
|
缓存 NoSQL 搜索推荐
第三课(二)|学习笔记
快速学习第三课(二)
103 0
第三课(二)|学习笔记
|
存储 数据库 开发者
第七课(二)|学习笔记
快速学习第七课(二)
127 0
第七课(二)|学习笔记
|
存储 数据采集 人工智能
第七课(三)|学习笔记
快速学习第七课(三)
114 0
第七课(三)|学习笔记