- 1、本文档共3页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Database System Implementation第三章答案
Database System Implementation
Solutions for Chapter 3
Solutions for Section 3.2
Solutions for Section 3.3
Solutions for Section 3.4
Solutions for Section 3.5
Solutions for Section 3.2
Exercise 3.2.1
First, note that SQL2 dates require 10 bytes, and SQL2 times require 8 bytes if there is no decimal
point; this material is in Section 3.1.3.
a) The bytes requirsed by each of the fields is 15 + 2 + 10 + 8 = 35.
b) Round each of the four field lengths up to a multiple of 4, to get 16 + 4 + 12 + 8 = 40.
c) Round up again, to a multiple of 8, to get 16 + 8 + 16 + 8 = 48.
Exercise 3.2.3
The elements in the header also require rounding upward in (b) and (c). Thus, the lengths including
header fields and adding the lengths for the bodies as calculated in Exercise 3.2.1 are:
a) 4 + 4 + 1 + 35 = 44.
b) 4 + 4 + 4 + 40 = 52.
c) 8 + 8 + 8 + 48 = 72.
Exercise 3.2.5
For parts (a) and (b), the header takes 40 bytes, while for (c) it takes 80 bytes. The calculations are
thus:
a) (4096-40)/44 = 92.
b) (4096-40)/52 = 78.
c) (4096-80)/72 = 55.
Return to Top
Solutions for Section 3.3
Exercise 3.3.1
The Megatron 747 has 8192 cylinders, so we require 2 bytes for the cylinder. There are 8 surfaces, or
8 tracks per cylinder, so 1 byte suffices for the track. The average number of sectors per track is 256,
and we have chosen to use 8 sectors per block (which is not a property of the disk itself).
If we used blocks consisting of a single sector, and the track with the greatest number of sectors had
more than 256, then we would need 2 bytes for the sector. However, at 8 sectors/block, we could
have wildly differing numbers of sectors per track, and still not get close to 256 blocks/track. Since
256 integers can be represented in 1 byte, we think that 1 byte is sufficient for the block within a
track, and we think the correct answer is 4 bytes for the block address on a Megatron 747.
Exercise 3.3.3(a)
Assuming 4096-byte blocks,
文档评论(0)