Database Systems(资料库系统).ppt

上传人:da****u 文档编号:1110879 上传时间:2018-12-07 格式:PPT 页数:46 大小:383.50KB
下载 相关 举报
Database Systems(资料库系统).ppt_第1页
第1页 / 共46页
Database Systems(资料库系统).ppt_第2页
第2页 / 共46页
Database Systems(资料库系统).ppt_第3页
第3页 / 共46页
Database Systems(资料库系统).ppt_第4页
第4页 / 共46页
Database Systems(资料库系统).ppt_第5页
第5页 / 共46页
点击查看更多>>
资源描述

1、Database Systems(資料庫系統 ) November 7, 2005Lecture #7By Hao-hua Chu (朱浩華 )1Announcement Assignment #2 solution will be posted on the course homepage. Assignment #3 is due on Thur (11/10) outside TAs office. Do not accept late assignments. Assignment solution will be posted on the course homepage on Fr

2、iday (11/11). Practicum assignment #1 is available on course homepage. Midterm next Monday Chapters 1,2 (except 2.7),3, 4.14.2, 5,8,92Storing Data: Disks and FilesChapter 93Disks and Files DBMS stores information on (“hard”) disks. This has major performance implications for DB system design! READ:

3、transfer data from disk to main memory (RAM). WRITE: transfer data from RAM to disk. Both are high-cost operations, relative to in-memory operations, so must be planned carefully!4Why Not Store Everything in Main Memory? Costs too much. $100 for 1G of SDRAM $100 for 250 GB of HD (cost x250) $40 for

4、50 GB of tapes. (cost same as HD) - “Is Tape for backup dead?” Main memory is volatile. We want data to be saved between runs. Typical storage hierarchy: Main memory (RAM) for currently used data. Disk for the main database (secondary storage). Tapes for archiving older versions of the data (backup

5、storage) or just disk-to-disk backup.5Disks Secondary storage device of choice. Main advantage over tapes: random access vs. sequential. Tapes are for data backup, not for operational data. Access the last byte in a tape requires winding through the entire tape. Data is stored and retrieved in units

6、 called disk blocks or pages. Unlike RAM, time to retrieve a disk page varies depending upon location on disk. Therefore, relative placement of pages on disk has major impact on DBMS performance!6Components of a Disk The platters spin. The arm assembly is moved in or out to position a head on a desi

7、red track. Tracks under heads make a cylinder. Only one head reads/writes at any one time. Block size is a multiple of sector size (which is fixed).PlattersSpindleDisk headArm movementArm assemblyTracksSector78Accessing a Disk Page Time to access (read/write) a disk block, called access time, is a s

8、um of: seek time (moving arm to position disk head on right track) rotational delay (waiting for block to rotate under head) transfer time (actually moving data to/from disk surface) Seek time and rotational delay (mechanical parts) dominate the access time Seek time varies from about 1 to 20msec (avg 10msec) Rotational delay varies from 0 to 8msec (avg. 4msec) Transfer rate is about 100MBps (0.025msec per 4KB page) Key to lower I/O cost: reduce seek/rotation delays! If two pages of records are accessed together frequently, put them close together on disk. 910

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育教学资料库 > 课件讲义

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。