Announcements Today –RAID –Begin Indexes Program 1 due Friday –Office Hours today 2-3 pm –I’ll have limited email contact over the weekend –later today.

Slides:



Advertisements
Similar presentations
Disk Storage, Basic File Structures, and Hashing
Advertisements

RAID Redundant Array of Independent Disks
File Organizations and Indexing Lecture 4 R&G Chapter 8 "If you don't find it in the index, look very carefully through the entire catalogue." -- Sears,
Chapter 7 Indexing Structures for Files Copyright © 2004 Ramez Elmasri and Shamkant Navathe.
Hashing and Indexing John Ortiz.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
2P13 Week 11. A+ Guide to Managing and Maintaining your PC, 6e2 RAID Controllers Redundant Array of Independent (or Inexpensive) Disks Level 0 -- Striped.
Lecture 36: Chapter 6 Today’s topic –RAID 1. RAID Redundant Array of Inexpensive (Independent) Disks –Use multiple smaller disks (c.f. one large disk)
1 Lecture 8: Data structures for databases II Jose M. Peña
Copyright © 2004 Pearson Education, Inc.. Chapter 14 Indexing Structures for Files.
Chapter 8 File organization and Indices.
1 File Organizations and Indexing Module 4, Lecture 2 “How index-learning turns no student pale Yet holds the eel of science by the tail.” -- Alexander.
1 Advanced Database Technology Anna Östlin Pagh and Rasmus Pagh IT University of Copenhagen Spring 2004 February 19, 2004 INDEXING I Lecture based on [GUW,
Data Indexing Herbert A. Evans. Purposes of Data Indexing What is Data Indexing? Why is it important?
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Part A Part A:  Index Definition in SQL  Ordered Indices  Index Sequential.
1 Overview of Storage and Indexing Yanlei Diao UMass Amherst Feb 13, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
File Organizations and Indexing R&G Chapter 8 "If you don't find it in the index, look very carefully through the entire catalogue." -- Sears, Roebuck,
File Organizations and Indexes ISYS 464. Disk Devices Disk drive: Read/write head and access arm. Single-sided, double-sided, disk pack Track, sector,
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Part B Part A:  Index Definition in SQL  Ordered Indices  Index Sequential.
File Organizations and Indexing Lecture 4 R&G Chapter 8 "If you don't find it in the index, look very carefully through the entire catalogue." -- Sears,
Homework #3 Due Thursday, April 17 Problems: –Chapter 11: 11.6, –Chapter 12: 12.1, 12.2, 12.3, 12.4, 12.5, 12.7.
I/O Systems and Storage Systems May 22, 2000 Instructor: Gary Kimura.
DBMS Internals: Storage February 27th, Representing Data Elements Relational database elements: A tuple is represented as a record CREATE TABLE.
DISK STORAGE INDEX STRUCTURES FOR FILES Lecture 12.
Storage and Indexing February 26 th, 2003 Lecture 19.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 File Organizations and Indexing Chapter 8.
Chapter 61 Chapter 6 Index Structures for Files. Chapter 62 Indexes Indexes are additional auxiliary access structures with typically provide either faster.
Indexing structures for files D ƯƠ NG ANH KHOA-QLU13082.
Data Management for Decision Support Session-5 Prof. Bharat Bhasker.
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
Index Structures for Files Indexes speed up the retrieval of records under certain search conditions Indexes called secondary access paths do not affect.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Storage and File Structure. Architecture of a DBMS.
Disk Storage, Basic File Structures, and Hashing
File Organizations and Indexing Lecture 4 R&G Chapter 8 "If you don't find it in the index, look very carefully through the entire catalogue." -- Sears,
Chapter 9 Disk Storage and Indexing Structures for Files Copyright © 2004 Pearson Education, Inc.
Indexing Structures for Files
12.1 Chapter 12: Indexing and Hashing Spring 2009 Sections , , Problems , 12.7, 12.8, 12.13, 12.15,
Chapter- 14- Index structures for files
File Structures. 2 Chapter - Objectives Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files Hashed Files Dynamic and.
RAID Disk Arrays Hank Levy. 212/5/2015 Basic Problems Disks are improving, but much less fast than CPUs We can use multiple disks for improving performance.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 13 Disk Storage, Basic File Structures, and Hashing.
Marwan Al-Namari Hassan Al-Mathami. Indexing What is Indexing? Indexing is a mechanisms. Why we need to use Indexing? We used indexing to speed up access.
B+ Trees: An IO-Aware Index Structure Lecture 13.
File Organizations and Indexing
Storage and Indexing. How do we store efficiently large amounts of data? The appropriate storage depends on what kind of accesses we expect to have to.
1 Chapter 12: Indexing and Hashing Indexing Indexing Basic Concepts Basic Concepts Ordered Indices Ordered Indices B+-Tree Index Files B+-Tree Index Files.
CS4432: Database Systems II
Database Management Systems, R. Ramakrishnan and J. Gehrke1 File Organizations and Indexing Chapter 8 Jianping Fan Dept of Computer Science UNC-Charlotte.
1 Ullman et al. : Database System Principles Notes 4: Indexing.
Chapter 11 Indexing And Hashing (1) Yonsei University 1 st Semester, 2016 Sanghyun Park.
Record Storage, File Organization, and Indexes
Indexing Goals: Store large files Support multiple search keys
Oracle SQL*Loader
RAID Disk Arrays Hank Levy 1.
File organization and Indexing
Chapter 11: Indexing and Hashing
Lecture 12 Lecture 12: Indexing.
RAID Disk Arrays Hank Levy 1.
CSE 451: Operating Systems Spring 2005 Module 17 Redundant Arrays of Inexpensive Disks (RAID) Ed Lazowska Allen Center 570.
Indexing and Hashing Basic Concepts Ordered Indices
Operations to Consider
Indexing and Hashing B.Ramamurthy Chapter 11 2/5/2019 B.Ramamurthy.
Chapter 11 Indexing And Hashing (1)
INDEXING.
Storage and Indexing.
RAID Disk Arrays Hank Levy 1.
General External Merge Sort
Chapter 11: Indexing and Hashing
Advance Database System
Presentation transcript:

Announcements Today –RAID –Begin Indexes Program 1 due Friday –Office Hours today 2-3 pm –I’ll have limited contact over the weekend –later today I’ll give info for turning in the program

RAID Redundant Arrays of Inexpensive Disks Goal of RAID is to even out rates of disk improvements (small) w/ those in RAM and CPU RAID use multiple physical disks to behave as a single logical disk

Data Striping Data striping stores data across multiple disks There are different granularities bit level granularity block level granularity

Naïve Striping Reduces Reliability Likelihood of failure increases w/ # of disks –Mirroring, error correcting codes are used to increase reliability at the expense of speed But is this statement correct? –(from Section ) “For an array of n disks, the likelihood of failure is n times as much as that for one disk. Hence, if the MTTF of a disk drive is 200,000 hours (22.8 years), that of a bank of 100 disk drives becomes only 2000 hours (83 days)”

RAID Organizations balance speed and reliability

Indexing Structures for Files Chapter 14

“If you don’t find it in the index, look very carefully through the whole catalog” - Sears, Roebuck and Co. consumers’ Guide, 1897

Indexes provide alternative access paths Query: Find record for student “Troy Allen” Index on “name” Step 1: query the index for the RID for the record (hopefully a few IOs) Step 2: query the buffer manager for the appropriate block (1 IO) RID = (3438, 9)“Troy Allen”

An index Is a collection of data entries Is associated with a specific file Is associated with a specific field called the indexing field (sometimes called the search or key field) Contains data so that BlkIDs (or RIDs) whose indexing fields match a given value can be found quickly

Some Considerations What is the organization of the underlying file –Eg, is it ordered on the search key? Are the values of the indexing field unique (ie, is the indexing field a key field)? How are the data entries of the index organized? –Example: make index a hashed file on index field where each record contains (value, RID) pairs

Some Definitions primary index: an index on the ordering key field of a ordered file secondary index: an index on any non-ordering field of the file clustered index: an index whose data entries are ordered in the same way as the underlying file dense index: has an index entry for every search key value (and hence every record) in the data file. sparse index: has index entries for only some of the search values

Primary Index A primary index is an ordered file of pairs A record is stored for each block in the file. The records for Blk B contains the value of the first record on that block

Cost of Maintaining a Clustered Primary Index Inserting of record in the ordered file (already expensive) may require significant updates to the index –Why is this?

Clustering Indexes Recall a clustering index is an index on a non-key ordering field of an ordered file What do we need to store in the index? –as with pri idx, pairs –but now we need a record in the index for every unique value of the indexing key –the blk field of the index gives the first block that a record for value appears on

one way to handle the “insert” problem of ordered files

Secondary Indexes An index on field that is not the ordering field of the underlying file The indexing field may or may not be a key field for the file What is the format for records in a secondary index on a key field? How many records are needed?

More Secondary Indexes What if the indexing field is not a key field? –Option 1: Keep index entry for each record, so we will have multiple index entries for each value –Option 2: Have one record / value and store a “RID list” for each value. Thus the index records are variable length records –Option 3: Mixed type of index records (next slide)

Properties of Index Types

SQL to Create an Index CREATE INDEX idxAge ON Students WITH STRUCTURE = BTREE KEY = (age)

Next time: Multilevel indexes