Instructor: Murali Mani

Slides:



Advertisements
Similar presentations
1 Introduction to Database Systems CSE444 Instructor: Scott Vandenberg University of Washington Winter 2000.
Advertisements

Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chapter 1 Instructor: Mirsad Hadzikadic.
Chapter 1 Instructor: Murali Mani Database Management Systems.
1 541: Database Systems S. Muthu Muthukrishnan. 2 Some Data Collections I Have Played With….  Wireless call detail records.  U. S. Patents.  AskJeeves.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Introduction to Database Systems Chapter 1 Instructor: Wang-Chien Lee
Database: A collection of related data [Elmasri]. A database represents some aspect of real world called “miniworld” [Elmasri] or “enterprise” [Ramakrishnan].
Mani-CS34311 CS3431 – Database Systems I Introduction Instructor: Murali Mani
Introduction to Database Systems Ch. 1, Ch. 2 Mr. John Ortiz Dept. of Computer Science University of Texas at San Antonio.
Rundensteiner-CS34311 CS3431 – Database Systems I Introduction Instructor: Elke A. Rundensteiner
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Instructor: Deborah Strahman
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Introduction to Database Systems Chapter 1 Instructor: Johannes Gehrke
Murali Mani CS3431 – Database Systems I Introduction.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 1 Database Systems I Introduction.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1.
1 Introduction to Database Systems Ref. Ramakrishnan & Gehrke Chapter 1.
1 CENG 302 Introduction to Database Management Systems Nihan Kesim Çiçekli URL:
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Instructor: Ethan Jackson
CSCD34 - Data Management Systems,- A. Vaisman1 CSC D34 - Data Management Systems Instructor: Alejandro Vaisman University of Toronto.
CSC343H – Introduction to Databases
Introduction. 
Database Management Systems 1 Introduction to Database Systems Instructor: Xintao Wu Ramakrishnan & Gehrke.
CS6530 Graduate-level Database Systems Prof. Feifei Li.
 DATABASE DATABASE  DATABASE ENVIRONMENT DATABASE ENVIRONMENT  WHY STUDY DATABASE WHY STUDY DATABASE  DBMS & ITS FUNCTIONS DBMS & ITS FUNCTIONS 
1 CS862 - Advanced Database Systems Sang H. Son
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Xintao Wu.
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Weichao Wang.
Database Management Systems
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Overview of Database Systems.
DATABASE MANAGEMENT SYSTEMS TERM B. Tech II/IT II Semester UNIT-I PPT SLIDES Text Books: (1) DBMS by Raghu Ramakrishnan (2) DBMS by Sudarshan and.
INFS614, Dr. Brodsky, GMU1 Database Management Systems INFS 614 Instructor: Professor Alex Brodsky
ICS 321 Fall 2009 Introduction to Database Systems Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
Introduction to Database Systems1. 2 Basic Definitions Mini-world Some part of the real world about which data is stored in a database. Data Known facts.
1 What Is a DBMS?  A very large, integrated collection of data.  Models real-world enterprise.  Entities (e.g., students, courses)  Relationships (e.g.,
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Introduction to Database Systems Chapter 1 Instructor: Johannes Gehrke
-ebru a.s ATTRIBUTE: Description of entities For employee entity number, name, deptno, age, adr, salary..etc are attributes. RECORD: Stores whole.
CpSc 8620: DBMS Design Introduction. 2 Attribution Materials and lecture notes in this course are adapted from various sources, including the authors.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Professor: Iluju Kiringa
1 Geog 357: Data models and DBMS. Geographic Decision Making.
1 CS462- Database Systems Sang H. Son
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Why do you learn database?? Chapter 0.
CS3431: C-Term CS3431 – Database Systems I Introduction Instructor: Mohamed Eltabakh
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1.
BBM 371 – Data Management Lecture 3: Basic Concepts of DBMS Prepared by: Ebru Akçapınar Sezer, Gönenç Ercan.
1 CENG 351 CENG 351 Introduction to Data Management and File Structures Department of Computer Engineering METU.
1 Introduction to Data Management Lecture #1 (Course “Trailer”) Instructor: Chen Li.
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Xin Zhang.
1 Database Management Systems Introduction Instructor: Oliver Schulte
CS522 Advanced database Systems Huiping Guo Department of Computer Science California State University, Los Angeles Course administration.
COP Introduction to Database Structures
DATABASE MANAGEMENT SYSTEMS
Introduction to Database Systems Chapter 1
DATABASE MANAGEMENT SYSTEMS
Database Management Systems Chapter 1
Introduction Instructor: Elke A. Rundensteiner
Introduction to Database Systems
Instructor: Elke Rundensteiner
Database Management Systems Chapter 1
Database Management Systems Introduction
Introduction to Database Systems
Database Management Systems Introduction
Overview of Database Systems Chpt 1
Database Management Systems Chapter 1
Database Management Systems
Database Management Systems CSE594
Sang H. Son CS6750: Database Systems The slides for this text are organized into chapters. This lecture covers Chapter 1. Chapter 1: Introduction.
Introduction to Database Systems
Database Management Systems Chapter 1
Data Independence Applications insulated from how data is structured and stored. Logical data independence: Protection from changes in logical structure.
Is the WWW a DBMS? = Fairly sophisticated search available
Introduction to Database Systems Chpt 1
Presentation transcript:

Instructor: Murali Mani mmani@cs.wpi.edu Database Management Systems Chapter 1 Instructor: Murali Mani mmani@cs.wpi.edu

What is a database? A very large, integrated collection of data. Models real-world application : Entities (e.g., students, courses) Relationships (e.g., Madonna is taking CS564) Usually data is too large to fit into main memory, and often used by many users

Database applications ? E-commerce : Amazon.com, etc. Airlines and travel services Scientific data such as biology, oceanography, etc. Spatial data such as maps, travel networks, World Wide Web Digital libraries of artifacts of any kind

What is a DBMS ? DBMS stands for Database Management System software package designed to store, manage and provide access to databases.

Why Study Databases?? ? Shift from computation to information Datasets increasing in diversity and volume. Digital libraries, interactive video, Human Genome project, EOS project ... need for DBMS exploding DBMS encompasses most of CS : OS, languages, theory, AI, multimedia, logic

Terminology : Data Models A data model : is a collection of concepts for describing data. A schema : is a description of a particular collection of data, using the given data model. The relational model of data The most widely used model today. Main concept: relation, basically a table with rows and columns. Every relation has a schema, which describes the columns, or fields. 5

Levels of Abstraction Many views: Single conceptual (logical) schema Views describe how users see the data. Single conceptual (logical) schema Conceptual schema defines logical structure Single physical schema: Physical schema describes the files and indexes used. View 1 View 2 View 3 Conceptual Schema Physical Schema Schemas are defined using DDL; data is modified/queried using DML. 6

Example: University Database Conceptual schema: Students(sid: string, name: string, login: string, age: integer, gpa:real) Courses(cid: string, cname:string, credits:integer) Enrolled(sid:string, cid:string, grade:string) Physical schema: Relations stored as unordered files. Index on first column of Students. External Schema (View): Course_info(cid:string, enrollment:integer) CS542Students(sid: string, grade:string) 7

Data Independence * Applications insulated from how data is structured and stored. Logical data independence: Protection from changes in logical structure of data. Physical data independence: Protection from changes in physical structure of data. One of the most important benefits of using a DBMS!

Files vs. DBMS If we were to use files, we would have to : Stage large datasets between main memory and secondary storage (buffering, page-oriented access) Must write special code for different queries Must protect data from inconsistency due to multiple concurrent users Must manage crash recovery in some special-purpose manner Must provide good methods for access control

Why Use a DBMS? Reduced application development time. Data independence Efficient data access. Data integrity under updates. Concurrent access Recovery from crashes. Security Uniform data administration. 3

Concurrency Control Concurrent execution of user programs is essential for good DBMS performance. Because disk accesses are frequent, and relatively slow, it is important to keep CPU humming by working on several user programs concurrently. Interleaving actions of different user programs can lead to inconsistency: e.g., check is cleared while account balance is being computed. DBMS ensures such data inconsistency problems don’t arise: E.g., users can pretend they are using a single-user system

Key Concepts of CC Key concept is transaction, which is an atomic sequence of multiple database actions (reads/writes) Each transaction, executed completely, must leave the DB in a consistent state Utilize locking of resources and other protocols for guaranteeing consistency.

System Crash : Ensuring Atomicity If system crashes in the middle of a Xact, then DBMS ensures atomicity Idea: Keep a log (history) of all actions carried out by the DBMS while executing a set of Xacts: Before a change is made to database, corresponding log entry is forced to a safe location (commit of transaction) After a crash, the effects of partially executed transactions are undone using the log (rollback of transaction)

Databases make these folks happy ... End users and DBMS vendors DB application programmers E.g., smart webmasters Database administrator (DBA) Designs logical /physical schemas Handles security and authorization Data availability, crash recovery Database tuning as needs evolve Must understand how a DBMS works! 21

Files and Access Methods Structure of a DBMS These layers must consider concurrency control and recovery A typical DBMS has a layered architecture. Concurrency control and recovery components not shown. Query Optimization and Execution Relational Operators Files and Access Methods Buffer Management Disk Space Management DB 22

Summary DBMS used to maintain & query large datasets. Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security. Levels of abstraction give data independence. A DBMS typically has a layered architecture. DBAs hold rewarding jobs.  DBMS R&D is one of the broadest, most exciting areas in CS.

Introductory Material Sets, Relations and Functions

Sets Unordered collection of objects Characteristics No duplicates (no object appears more than once in a set) Eg: Set of passengers, set of flights Recall the main set operations Union, intersection, complement Check subset

Relations Given multiple sets A1, A2, …, An, a relation is a set of n-tuples of the form (a11, a12, …, a1n), where a11 is an element of A1, a12 is an element of A2, and so on. Eg: suppose the set of course = {DB1, DB2}, the set of TAs = {Hong, Song}, then a relation between these two sets could be {(DB1, Hong), (DB1, Song), (DB2, Hong)}

Functions Given two sets A, B, a function f from A to B is denoted as f: A  B. This maps any value of A to one value of B. Eg: consider function from faculty members to depts {(Mike Gennert  CS), (Peter Hansen  Humanities)} Characteristics A is called domain B is called range No value of A can map to multiple B’s.

Functions Injection (one to one): Surjections (onto) Bijections No 2 values in A map to the same B Eg: set of Husbands  set of wives Surjections (onto) Every value in B has at least 1 value in A that maps to it Bijections One to one and onto