Presentation is loading. Please wait.

Presentation is loading. Please wait.

11.1Database System Concepts. 11.2Database System Concepts Now Something Different 1st part of the course: Application Oriented 2nd part of the course:

Similar presentations


Presentation on theme: "11.1Database System Concepts. 11.2Database System Concepts Now Something Different 1st part of the course: Application Oriented 2nd part of the course:"— Presentation transcript:

1 11.1Database System Concepts

2 11.2Database System Concepts Now Something Different 1st part of the course: Application Oriented 2nd part of the course: Systems Oriented What is “Systems”? A: Not Programming Not programming big things.. Systems = Efficient and safe use of limited resources (e.g., disks) Efficient: resources should be shared, utilized as much as possible Safe: sharing should not corrupt work of individual jobs

3 11.3Database System Concepts General Overview  Relational model - SQL  Formal & commercial query languages  Functional Dependencies  Normalization  Physical Design  Indexing  Query evaluation  Query optimization  …. Application Oriented Systems Oriented

4 11.4Database System Concepts The systems side of Databases What will we talk about? 1. Data Organization: physical storage strategies to support efficient updates, retrieval 2. Data retrieval: auxiliary data structures to enable efficient retrieval. Techniques for processing queries to ensure efficient retrieval 3. Data Integrity: techniques for implementing Xactions, to ensure safe concurrent access to data. Ensuring data is safe in the presence of system crashes.

5 11.5Database System Concepts Data Organization Key points 1. Storage Media  “Memory hierarchy”  Efficient/reliable transfer of data between disks and main memory  Hardware techniques (RAID disks)  Software techniques (Buffer mgmt) 2. Storage strategies for relations-file organization  Representation of tuples on disks  Storage of tuples in pages, clustering.

6 11.6Database System Concepts CPU MC Typical Computer Secondary Storage...

7 11.7Database System Concepts Storage Media: Players  Cache – fastest and most costly form of storage; volatile; managed by the computer system hardware.  Main memory :  fast access (10s to 100s of nanoseconds; 1 nanosecond = 10 –9 seconds)  generally too small (or too expensive) to store the entire database  Volatile — contents of main memory are usually lost if a power failure or system crash occurs.  But… CPU operates only on data in main memory

8 11.8Database System Concepts Storage Media: Players  Disk  Primary medium for the long-term storage of data; typically stores entire database.  random-access – possible to read data on disk in any order, unlike magnetic tape  Non-volatile: data survive a power failure or a system crash, disk failure less likely than them  New technology: Solid State Disks and Flash disks

9 11.9Database System Concepts Storage Media: Players  Optical storage  non-volatile, data is read optically from a spinning disk using a laser  CD-ROM (640 MB) and DVD (4.7 to 17 GB) most popular forms  Write-one, read-many (WORM) optical disks used for archival storage (CD-R and DVD-R)  Multiple write versions also available (CD-RW, DVD-RW, and DVD- RAM)  Reads and writes are slower than with magnetic disk  Tapes  Sequential access (very slow)  Cheap, high capacity

10 11.10Database System Concepts Memory Hierarchy cache Main memory disk Optical storage Tapes Higher speed Lower price Traveling the hierarchy: 1. speed ( higher=faster) 2. cost (lower=cheaper) 3. volatility (between MM and Disk) 4. Data transfer (Main memory the “hub”) 5. Storage classes (P=primary, S=secondary, T=tertiary) V NV

11 11.11Database System Concepts Main memory  Disk Data Xfers Concerns: 1. Efficiency (speed) can be improved by... a. improving raw data transfer speed b. avoiding untimely data transfer c. avoiding unnecessary data transfer 2. Safety (reliability, availability) can be improved by... a. storing data redundantly

12 11.12Database System Concepts Hard Disk Mechanism

13 11.13Database System Concepts  Read-write head  Positioned very close to the platter surface (almost touching it)  Surface of platter divided into circular tracks  Each track is divided into sectors.  A sector is the smallest unit of data that can be read or written.  To read/write a sector  disk arm swings to position head on right track  platter spins continually; data is read/written as sector passes under head  Block: a sequence of sectors  Cylinder i consists of i th track of all the platters

14 11.14Database System Concepts “ Typical ” Values Diameter: 1 inch  15 inches Cylinders:100  2000 Surfaces:1 or 2 (Tracks/cyl) 2 (floppies)  30 Sector Size:512B  50K Capacity:360 KB (old floppy)  1.5 TB

15 11.15Database System Concepts Performance Measures of Disks Measuring Disk Speed  Access time – consists of:  Seek time – time it takes to reposition the arm over the correct track.  (Rotational) latency time – time it takes for the sector to be accessed to appear under the head.  Data-transfer rate – the rate at which data can be retrieved from or stored to the disk. Analogy to taking a bus: 1. Seek time: time to get to bus stop 2. Latency time; time spent waiting at bus stop 3. Data transfer time: time spent riding the bus


Download ppt "11.1Database System Concepts. 11.2Database System Concepts Now Something Different 1st part of the course: Application Oriented 2nd part of the course:"

Similar presentations


Ads by Google