Database Fundamentals



Similar documents
Introduction to Databases and Data Mining

Main Memory & Backing Store. Main memory backing storage devices

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Outline. Principles of Database Management Systems. Memory Hierarchy: Capacities and access times. CPU vs. Disk Speed

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Mass Storage Structure

Chapter 8 Memory Units

Computer Logic (2.2.3)

COMPUTER BASICS. Seema Sirpal Delhi University Computer Centre

Determining Your Computer Resources

Database 2 Lecture I. Alessandro Artale

lesson 1 An Overview of the Computer System

File-System Implementation

Large Scale Storage Solutions for Bioinformatics and Genomics Projects

File Management Using Microsoft Windows

PC Boot Considerations for Devices >8GB

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Storing Data: Disks and Files

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

Definition of Computers. INTRODUCTION to COMPUTERS. Historical Development ENIAC

The Classical Architecture. Storage 1 / 36

ICOM 6005 Database Management Systems Design. Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001

Outline. mass storage hash functions. logical key values nested tables. storing information between executions using DBM files

A computer running Windows Vista or Mac OS X

Chapter 1 File Organization 1.0 OBJECTIVES 1.1 INTRODUCTION 1.2 STORAGE DEVICES CHARACTERISTICS

Capturing Network Traffic With Wireshark

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

FAWN - a Fast Array of Wimpy Nodes

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

A White Paper. Archiving Implementation. Five Costly Mistakes to Avoid. By Bob Spurzem. May Mimosa Systems, Inc.

416 Agriculture Hall Michigan State University

Barracuda Backup Server. Introduction

Unit 5.1 The Database Concept

File Management Windows XP Word What is File Management?

The Google File System

1 File Processing Systems

How To Store Data On A Computer (For A Computer)

Chapter 3. Database Environment - Objectives. Multi-user DBMS Architectures. Teleprocessing. File-Server

Discovering Computers Living in a Digital World

Writing Assignment #2 due Today (5:00pm) - Post on your CSC101 webpage - Ask if you have questions! Lab #2 Today. Quiz #1 Tomorrow (Lectures 1-7)

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

Introduction To Computers: Hardware and Software

This talk is mostly about Data Center Replication, but along the way we'll have to talk about why you'd want transactionality arnd the Low-Level API.

File System Management

OPERATING SYSTEM - MEMORY MANAGEMENT

Physical Data Organization

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

RAID Overview: Identifying What RAID Levels Best Meet Customer Needs. Diamond Series RAID Storage Array

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

Recommended Backup Strategy for FileMaker Pro Server 7/8 for Macintosh & Windows Updated March 2006

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

Performance Monitor for AutoCAD

MySQL Storage Engines

Counting in base 10, 2 and 16

Principles of Database Management Systems. Overview. Principles of Data Layout. Topic for today. "Executive Summary": here.

Outline: Operating Systems

Unit Storage Structures 1. Storage Structures. Unit 4.3

Putting Genomes in the Cloud with WOS TM. ddn.com. DDN Whitepaper. Making data sharing faster, easier and more scalable

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction

Data Storage - II: Efficient Usage & Errors

MFR IT Technical Guides

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

MapReduce. MapReduce and SQL Injections. CS 3200 Final Lecture. Introduction. MapReduce. Programming Model. Example

sql server best practice

Backup architectures in the modern data center. Author: Edmond van As Competa IT b.v.

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

RAID Technology Overview

WINSCRIBE HARDWARE SPECIFICATIONS

GenBank: A Database of Genetic Sequence Data

How In-Memory Data Grids Can Analyze Fast-Changing Data in Real Time

Lecture 5: GFS & HDFS! Claudia Hauff (Web Information Systems)! ti2736b-ewi@tudelft.nl

CHAPTER 17: File Management

Algorithms and Methods for Distributed Storage Networks 7 File Systems Christian Schindelhauer

Sawmill Log Analyzer Best Practices!! Page 1 of 6. Sawmill Log Analyzer Best Practices

Sistemas Operativos: Input/Output Disks

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

RAID. RAID 0 No redundancy ( AID?) Just stripe data over multiple disks But it does improve performance. Chapter 6 Storage and Other I/O Topics 29

6. Storage and File Structures

CS3600 SYSTEMS AND NETWORKS

Data Storage - I: Memory Hierarchies & Disks

CC414 Database Management Systems

Tutorial 3 Maintaining and Querying a Database

Recommended Backup Strategy for FileMaker Server 7, 8, 9 and 10 for Macintosh & Windows Updated February 2009

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Q1. What are the differences between Data Backup, System Restore, Disk Image, System Recovery Disc and System Repair Disk?

Windows Azure Storage Essential Cloud Storage Services

Database Management. Technology Briefing. Modern organizations are said to be drowning in data but starving for information p.

Cloud storage Megas, Gigas and Teras

Access Tutorial 3 Maintaining and Querying a Database. Microsoft Office 2013 Enhanced

The Hexadecimal Number System and Memory Addressing

Transcription:

Database Fundamentals Computer Science 105 Boston University David G. Sullivan, Ph.D. Bit = 0 or 1 Measuring Data: Bits and Bytes One byte is 8 bits. example: 01101100 Other common units: name approximate size exact size kilobyte (KB) 1000 bytes 2 10 = 1024 bytes megabyte (MB) 1 million bytes 2 20 bytes gigabyte (GB) 1 billion bytes 2 30 bytes Scientists are starting to generate data collections measured in: terabytes: 2 40 or approx. 10 12 bytes petabytes: 2 50 or approx. 10 15 bytes equivalent to the text in one billion books!

Storing Data: Memory Used to store programs and other data that are currently in use. Values stored in memory are read into the CPU to be operated on. The results of operations performed by the CPU can be written back to memory. CPU memory Advantage of memory: short access times can read from/write to memory in nanoseconds (10-9 sec) Disadvantages: relatively expensive contents are lost when the power is turned off Storing Data: Secondary Storage Used to store programs and other data for later use. examples: hard disks, floppy disks, CD/DVD drives, tape drives Advantages of hard disks: relatively inexpensive contents are retained when the power goes off Disadvantage: long access times roughly 10 ms (10-3 sec) in that time, a modern CPU can perform millions of operations! it's important to minimize the number of times that the disk is accessed CPU memory hard disk

What is a Database? A collection of data it does not need to be on a computer. example: the paper card catalogs that libraries maintained A given database may be divided into subcollections (tables) should be related in some way example: a university database possible subcollections? Database vs. Database Management System (from Figure 1-15 of Kroenke) A database is a collection of data. It is not a piece of software. A database management system (DBMS) is the software that manages one or more databases.

Key Functions of a DBMS 1. efficient storage 2. providing a logical view of data 3. query processing 4. transaction management Let's look at each of them in turn. 1. Efficient Storage Recall: accessing the disk is very inefficient. A DBMS organizes the data on disk in ways that allow it to reduce the number of disk accesses. Example: a database with 100,000 records a given record is between 64-256 bytes long An inefficient approach: give each record 256 bytes, even though it may not need it scan through the database to find a record may require thousands of disk reads! one block of records

1. Efficient Storage (cont.) A more efficient approach: give each record only as much space as it needs use a special index structure allows the DBMS to locate a particular record without looking at every record can dramatically reduce the number of disk accesses as few as 1-3! A DBMS can also spread a database over multiple disks. allows for larger collections of data the disks can be accessed in parallel, which speeds things up another advantage of using multiple disks? 2. Providing a Logical Representation of Data logical representation (tables, fields, etc.) id name address class dob 12345678 id Jill namejones Warren addresstowers 100 2007 class3/10/85 dob 25252525 12345678 Alan Jill Turing Jones Student Warren Village Towers 100 A210 2010 2007 2/7/88... 25252525... Alan Turing... Student Village A210... 2010... 2/7/88............... physical representation disks (bytes on disk blocks, index structures, etc.) The DBMS takes care of translating between the representations. makes the user's job much easier! This is an example of abstraction. hide low-level details behind a simpler representation an important concept in computer science

3. Query Processing A DBMS has some type of query language. example: SQL includes commands for: adding new records modifying or deleting existing records retrieving data according to some criteria The DBMS determines the best way to execute a query-language command. which index structures to use if multiple operations are needed, the order in which they should be carried out 4. Transaction Management A transaction is a sequence of operations that is treated as a single logical operation. Example: balance transfer of $50 from blue to pink remove $50 from blue add $50 to pink $450 $300

4. Transaction Management A transaction is a sequence of operations that is treated as a single logical operation. Example: balance transfer of $50 from blue to pink remove $50 from blue add $50 to pink Without a transaction, bad things could happen! $450 $250 begin transaction remove $50 from blue *** CRASH *** Money is lost! 4. Transaction Management A transaction is a sequence of operations that is treated as a single logical operation. Example: balance transfer of $50 from blue to pink remove $50 from blue add $50 to pink Without a transaction, bad things could happen! $500 $250 By using a transaction for the balance transfer, we ensure that all of the steps happen, or none do. all or nothing! remove $50 from blue *** CRASH *** restore original state

4. Transaction Management (cont.) Other examples: making a flight reservation select flight, reserve seat, make payment making an online purchase making an ATM withdrawal Ensure that operations by different users don t overlap in problematic ways. example: what s wrong with the following? user's balance transfer remove 500 from blue bank's check for clients below minimum balance read blue balance read pink balance if (blue + pink < minimum) charge the user a fee add 500 to pink Database Applications (Figure 1-15 of Kroenke) Users often use a database application. a separate piece of software that interacts with the DBMS Provide easier access the database. don't need to know the query language Examples: the software that runs on ATMs for a bank a web interface to a library database

Desktop Database System (Figure 1-23 of Kroenke) Combines the functions of a database application and a DBMS. examples: Microsoft Access, Filemaker Pro Includes tools/wizards for building the databases, forms, etc. Less flexible and less powerful than a full-fledged DBMS. doesn't support all possible operations doesn't support multi-user applications doesn't scale well to very large databases Looking Ahead The logical representation that a DBMS uses is based on some type of data model. There are a number of different models that can be used for this purpose. The most prevalent one is the relational model. We'll look next at the key features of this model. Reminder: complete Lab 0 by the first lab