Storage and File Structure

Similar documents
Storing Data: Disks and Files. Storing and Retrieving Data. Why Not Store Everything in Main Memory? Chapter 7

Storage and File Structure

Storing and Retrieving Data. Storing Data: Disks and Files. Solution 1: Techniques for making disks faster. Disks. Why Not Store Everything in Tapes?

Storing Data: Disks and Files. Storing and Retrieving Data. Why Not Store Everything in Main Memory? Database Management Systems need to:

Storing and Retrieving Data. Storing Data: Disks and Files. Solution 1: Techniques for making disks faster. Disks. Why Not Store Everything in Tapes?

Classifying Physical Storage Media. Chapter 11: Storage and File Structure. Storage Hierarchy (Cont.) Storage Hierarchy. Magnetic Hard Disk Mechanism

Classifying Physical Storage Media. Chapter 11: Storage and File Structure. Storage Hierarchy. Storage Hierarchy (Cont.) Speed

Chapter 11: Storage and File Structure. Silberschatz, Korth and Sudarshan Updated by Bird and Tanin

Outlines. Chapter 2 Storage Structure. Structure of a DBMS (with some simplification) Structure of a DBMS (with some simplification)

Storing Data: Disks and Files

Disks, Memories & Buffer Management

Storing Data: Disks and Files

Chapter 13 Disk Storage, Basic File Structures, and Hashing.

Chapter 10 Storage and File Structure

Database Systems. November 2, 2011 Lecture #7. topobo (mit)

Chapter 1 Disk Storage, Basic File Structures, and Hashing.

Ch 11: Storage and File Structure

Storing Data: Disks and Files

Storage and File Structure. Classification of Physical Storage Media. Physical Storage Media. Physical Storage Media

L9: Storage Manager Physical Data Organization

CMSC 424 Database design Lecture 12 Storage. Mihai Pop

Lecture 15 - Chapter 10 Storage and File Structure

File Structures and Indexing

Principles of Data Management. Lecture #2 (Storing Data: Disks and Files)

Disks and Files. Storage Structures Introduction Chapter 8 (3 rd edition) Why Not Store Everything in Main Memory?

Advanced Database Systems

CSE380 - Operating Systems

C13: Files and Directories: System s Perspective

Storage and File Structure

CS143: Disks and Files

OS and Hardware Tuning

Advanced Database Systems

Chapter 14: Mass-Storage Systems. Disk Structure

OS and HW Tuning Considerations!

Database Applications (15-415)

Chapter 10: Storage and File Structure

CPSC 421 Database Management Systems. Lecture 11: Storage and File Organization

Database Applications (15-415)

Storing Data: Disks and Files

High Performance Computing Course Notes High Performance Storage

Parser. Select R.text from Report R, Weather W where W.image.rain() and W.city = R.city and W.date = R.date and R.text.

CSE 190D Database System Implementation

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

Database Architecture 2 & Storage. Instructor: Matei Zaharia cs245.stanford.edu

STORING DATA: DISK AND FILES

Today: Secondary Storage! Typical Disk Parameters!

Module 13: Secondary-Storage Structure

Disks and Files. Jim Gray s Storage Latency Analogy: How Far Away is the Data? Components of a Disk. Disks

Review 1-- Storing Data: Disks and Files

Administração e Optimização Bases de Dados DEI-IST 2010/2011

Rajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10

Lecture 18: Reliable Storage

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

V. Mass Storage Systems

Chapter 6 - External Memory

Disks & Files. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

CS 554: Advanced Database System

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage

Chapter 11: File System Implementation. Objectives

BBM371- Data Management. Lecture 2: Storage Devices

Indexing. Jan Chomicki University at Buffalo. Jan Chomicki () Indexing 1 / 25

Database Systems II. Secondary Storage

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

CSE 232A Graduate Database Systems

Chapter 9: Peripheral Devices: Magnetic Disks

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

Chapter 10: Mass-Storage Systems

Mass-Storage Structure

Overview of Storage & Indexing (i)

Storage Devices for Database Systems

Da-Wei Chang CSIE.NCKU. Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University

QUIZ: Is either set of attributes a superkey? A candidate key? Source:

The Berkeley File System. The Original File System. Background. Why is the bandwidth low?

CS 537 Fall 2017 Review Session

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College

A track on a magnetic disk is a concentric rings where data is stored.

Operating Systems. Operating Systems Professor Sina Meraji U of T

Storage System COSC UCB

CS3600 SYSTEMS AND NETWORKS

COS 318: Operating Systems. Storage Devices. Kai Li Computer Science Department Princeton University

Components of the Virtual Memory System

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Data Storage and Disk Structure

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File

CS 405G: Introduction to Database Systems. Storage

Database Technology Database Architectures. Heiko Paulheim

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism

Chapter 13: Mass-Storage Systems. Disk Structure

Chapter 14: Mass-Storage Systems

Part IV I/O System. Chapter 12: Mass Storage Structure

CS3600 SYSTEMS AND NETWORKS

A memory is what is left when something happens and does not completely unhappen.

File-System Structure. Allocation Methods. Free-Space Management. Directory Implementation. Efficiency and Performance. Recovery

Lecture 25: Interconnection Networks, Disks. Topics: flow control, router microarchitecture, RAID

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011

CSE 380 Computer Operating Systems

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

COS 318: Operating Systems. Storage Devices. Jaswinder Pal Singh Computer Science Department Princeton University

The term "physical drive" refers to a single hard disk module. Figure 1. Physical Drive

Transcription:

CSL 451 Introduction to Database Systems Storage and File Structure Department of Computer Science and Engineering Indian Institute of Technology Ropar Narayanan (CK) Chatapuram Krishnan!

Summary Physical Storage Media cache - main memory - flash storage - magnetic disk - optical storage - tapes Performance measures of disks access time seek time average seek time rotational latency time average latency data transfer rate mean time to failure Disk-Block access block sequential access random access buffering, read-ahead, scheduling, file organization. Flash Storage RAID mirroring mean time to repair mean time to data loss striping bit-level striping block-level striping RAID levels 0, 1, 2, 3, 4 and 5 2!

RAID Levels 3!

Summary Physical Storage Media cache - main memory - flash storage - magnetic disk - optical storage - tapes Performance measures of disks access time seek time average seek time rotational latency time average latency data transfer rate mean time to failure Disk-Block access block sequential access random access buffering, read-ahead, scheduling, file organization. Flash Storage RAID mirroring mean time to repair mean time to data loss striping bit-level striping block-level striping RAID levels 0, 1, 2, 3, 4 and 5 scrubbing File Organization blocks fixed length records free list variable length records slotted page structure 4!

Slotted Page Structure Block Header Records Size Location # Entries Free Space End of Free Space 5!

Summary Physical Storage Media cache - main memory - flash storage - magnetic disk - optical storage - tapes Performance measures of disks access time seek time average seek time rotational latency time average latency data transfer rate mean time to failure Disk-Block access block sequential access random access buffering, read-ahead, scheduling, file organization. Flash Storage RAID mirroring mean time to repair mean time to data loss striping bit-level striping block-level striping RAID levels 0, 1, 2, 3, 4 and 5 scrubbing File Organization blocks fixed length records free list variable length records slotted page structure record organization heap, sequential, hashing Database Buffer buffer manager 6!

List the advantages and disadvantages of RAID-3 over RAID-1 7!

Comment on the performance of RAID-4 8!

10.1 Consider the data and parity-block arrangement on four disks. The B i s represent data blocks; the P i s represent parity blocks. Parity block P i is the parity block for data blocks B 4i-3 to B 4i. What, if any problem might this arrangement present? 9!

10.3 A power failure that occurs while a disk block is being written could result in the block being only partially written. Assume that partially written blocks can be detected. An atomic block write is one where either the disk block is fully written or nothing is written (i.e., there are not partial writes). Suggest schemes for getting the effect of atomic block writes for RAID level 1 (mirroring). Your schemes should involve work on recovery from failure. 10!

10.2.a Flash Storage: How is the flash translation table, which is used to map logical page numbers to physical numbers, created in memory? 11!

10.2.b Flash Storage: Suppose you have a 64GB flash storage system, with a 4096 byte page size. How big would the flash translation table be, assuming each page has a 32 bit address, and the table is stored as an array. 12!

10.2.c Flash Storage: Suggest how to reduce the size of the translation table if very often long ranges of consecutive logical page numbers are mapped to consecutive physical page numbers 13!

10.11 How does the remapping of bad sectors by disk controllers affect the data retrieval rates? 14!

10.20 If you have data that should not be lost on disk failure, and the data are write intensive, how would you store the data? 15!

10.4 Consider the deletion of record 5 from the following file. Compare the relative merits of the following techniques for implementing the deletion a. Move record 6 to the space occupied by record 5, and move record 7 to the space occupied by record 6. b. Move record 7 to the space occupied by record 5. c. Mark record 5 as deleted, and move no records. 16!

10.5 Show the structure of the file after each of the following steps a. Insert(24556, Turnamian, Finance, 98000) b. Delete record 2 c. Insert(34556, Thompson, Music, 67000) 17!

10.7 Consider the following bitmap technique for tracking free space in a file. For each block in the file, two bits are maintained in the bitmap. If the block is between 0 and 30 percent full the bits are 00, between 30 and 60 percent the bits are 01, between 60 and 90 percent the bits are 10, and above 90 percent the bits are 11. Such bitmaps can be kept in main memory even for quite large files. a. Describe how to keep the bitmap up to date on record insertions and deletions. b. Outline the benefit of the bitmap technique over free lists in searching for free space and in updating free space information. 18!

10.13 What is scrubbing, in the context of RAID systems, and why is scrubbing important? 19!

10.15 Explain why the allocation of related records to blocks affects database-system performance significantly? 20!

10.9 Give an example of a relational-algebra expression and a query-processing strategy where MRU is preferable to LRU 21!