BBM371- Data Management. Lecture 1: Course policies, Introduction to DBMS

Similar documents
Database Management Systems. Chapter 1

Introduction to Database Management Systems

Introduction to Database Systems. Chapter 1. Instructor: . Database Management Systems, R. Ramakrishnan and J. Gehrke 1

Introduction to Database Systems CS432. CS432/433: Introduction to Database Systems. CS432/433: Introduction to Database Systems

Database Management Systems Chapter 1 Instructor: Oliver Schulte Database Management Systems 3ed, R. Ramakrishnan and J.

Introduction and Overview

Introduction and Overview

Database Systems ( 資料庫系統 ) Practicum in Database Systems ( 資料庫系統實驗 ) 9/20 & 9/21, 2006 Lecture #1

Introduction to Data Management. Lecture #1 (Course Trailer )

Introduction to Data Management. Lecture #1 (The Course Trailer )

Introduction to Data Management. Lecture #1 (Course Trailer )

CMPUT 291 File and Database Management Systems

Database Management System

Introduction to Data Management. Lecture #1 (Course Trailer ) Instructor: Chen Li

Page 1. Goals for Today" What is a Database " Key Concept: Structured Data" CS162 Operating Systems and Systems Programming Lecture 13.

Week 1 Part 1: An Introduction to Database Systems

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Page 1. Quiz 18.1: Flow-Control" Goals for Today" Quiz 18.1: Flow-Control" CS162 Operating Systems and Systems Programming Lecture 18 Transactions"

CAS CS 460/660 Introduction to Database Systems. Fall

Fall Semester 2002 Prof. Michael Franklin

A Few Tips and Suggestions. Database System II Preliminaries. Applications (contd.) Applications

CS 443 Database Management Systems. Professor: Sina Meraji

Introduction to Database Systems

Database Applications (15-415)

CSE 303: Database. Teaching Staff. Lecture 01. Lectures: 1 st half - from a user s perspective. Lectures: 2 nd half - understanding how it works

A Few Tips and Suggestions. Database System II Preliminaries. Applications (contd.) Applications

Database Management Systems. Syllabus. Instructor: Vinnie Costa

Lecture 2 08/26/15. CMPSC431W: Database Management Systems. Instructor: Yu- San Lin

The Relational Model. Database Management Systems

A Few Tips and Suggestions. Database System I Preliminaries. Applications (contd.) Applications

Big Data Processing Technologies. Chentao Wu Associate Professor Dept. of Computer Science and Engineering

MIT Database Management Systems Lesson 01: Introduction

Chapter Two. DBMS Architecture How should DBS be organized?

Database Management Systems MIT Lesson 01 - Introduction By S. Sabraz Nawaz

Database Applications (15-415)

Introduction to Data Management. Lecture #4 (E-R Relational Translation)

CMPT 354: Database System I. Lecture 1. Course Introduction

Data Modeling. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

CS430/630 Database Management Systems Spring, Betty O Neil University of Massachusetts at Boston

Lecture 1: Introduction

Administration Naive DBMS CMPT 454 Topics. John Edgar 2

D.Hemavathi & R.Venkatalakshmi, Assistant Professor, SRM University, Kattankulathur

Before we talk about Big Data. Lets talk about not-so-big data

Introduction to Information Systems SSC, Semester 6

Database. Università degli Studi di Roma Tor Vergata. ICT and Internet Engineering. Instructor: Andrea Giglio

Introduction to Data Management. Lecture #2 Intro II & Data Models I

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

Database Management Systems. Chapter 3 Part 1

CMPT 354 Database Systems I. Spring 2012 Instructor: Hassan Khosravi

John Edgar 2

CMPSCI 645 Database Design & Implementation

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

COGS 121 HCI Programming Studio. Week 03 - Tech Lecture

Data! CS 133: Databases. Goals for Today. So, what is a database? What is a database anyway? From the textbook:

Introduction to Data Management. Lecture #4 E-R Model, Still Going

CS145: Intro to Databases. Lecture 1: Course Overview

Introduction to Data Management. Lecture #5 Relational Model (Cont.) & E-Rà Relational Mapping

CS564: Database Management Systems. Lecture 1: Course Overview. Acks: Chris Ré 1

9/8/2018. Prerequisites. Grading. People & Contact Information. Textbooks. Course Info. CS430/630 Database Management Systems Fall 2018

Database Applications (15-415)

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #1: Introduction

CompSci 516 Database Systems. Lecture 2 SQL. Instructor: Sudeepa Roy

Modern Database Systems CS-E4610

The Relational Model. Chapter 3. Database Management Systems, R. Ramakrishnan and J. Gehrke 1

EECS3421 Introduction to Database Management Systems. Thanks to John Mylopoulos and Ryan Johnson for material in these slides

Outline. Database Management Systems (DBMS) Database Management and Organization. IT420: Database Management and Organization

CSE 544 Principles of Database Management Systems

Specific Objectives Contents Teaching Hours 4 the basic concepts 1.1 Concepts of Relational Databases

Introduction to Database Systems CSE 444. Lecture #1 March 26, 2007

Outline. Databases and DBMS s. Recent Database Applications. Earlier Database Applications. CMPSCI445: Information Systems.

CSE 344 JANUARY 3 RD - INTRODUCTION

Review. The Relational Model. Glossary. Review. Data Models. Why Study the Relational Model? Why use a DBMS? OS provides RAM and disk

EECS 647: Introduction to Database Systems

Chapter 1: Introduction

Introduction to Data Management. Lecture #4 (E-R à Relational Design)

CS 525 Advanced Database Organization - Spring 2017 Mon + Wed 1:50-3:05 PM, Room: Stuart Building 111

The Relational Model. Relational Data Model Relational Query Language (DDL + DML) Integrity Constraints (IC)

Lecture 2 SQL. Announcements. Recap: Lecture 1. Today s topic. Semi-structured Data and XML. XML: an overview 8/30/17. Instructor: Sudeepa Roy

Database Systems. Lecture2:E-R model. Juan Huo( 霍娟 )

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

Introduction to Data Management. Lecture #2 (Big Picture, Cont.)

IST 210: Organization of Data

Introduction to Database S ystems Systems CSE 444 Lecture 1 Introduction CSE Summer

Announcements. PS 3 is out (see the usual place on the course web) Be sure to read my notes carefully Also read. Take a break around 10:15am

Today. Database Systems. cs5530/6530 Spring Our Objectives in this Course. Course Administrativia. This course is. Practice vs.

Course Book Academic Year

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

Who, where, when. Database Management Systems (LIX022B05) Literature. Evaluation. Lab Sessions. About this course. After this course...

Course Web Site. 445 Staff and Mailing Lists. Textbook. Databases and DBMS s. Outline. CMPSCI445: Information Systems. Yanlei Diao and Haopeng Zhang

COMP-421: Database Systems. Joseph D silva McConnel Engg. 102

Can you name one application that does not need any data? Can you name one application that does not need organized data?

The Relational Data Model. Data Model

COMP Instructor: Dimitris Papadias WWW page:

CMPSCI445: Information Systems

COMP-421: Database Systems. Joseph D silva McConnel Engg. 102

The Relational Model. Chapter 3

Overview of the Class and Introduction to DB schemas and queries. Lois Delcambre

Introduction. Example Databases

CS 245: Database System Principles

Transcription:

BBM371- Data Management Lecture 1: Course policies, Introduction to DBMS 26.09.2017

Today Introduction About the class Organization of this course Introduction to Database Management Systems (DBMS)

About the class

Reference Book - 1 Database Management Systems, Raghu Ramakrishnan, McGraw-Hill Education

Reference Book - 2 Database System Implementation, Hector Garcia-Molina, Jeffrey D. Ullman, Jenniver Widom

Communication The course web page will be updated regularly throughout the semester with lecture notes, announcements and important dates. http://web.cs.hacettepe.edu.tr/~bbm371

Course Work and Grading 1 midterm exam (25 points) Closed book and notes Pop quizes (25 points) Closed book and notes Final exam (50 points)

Course Overview (Tentative) Week Date Title 1 26-Sept Course policies and outline Introduction to DBMS 2 3-Oct Storage Devices 3 10-Oct Basic File Concepts 4 17-Oct Basic File Concepts cont. 5 24-Oct Index Types 6 31-Oct Hash based file organization 7 7-Nov Hash based file organization 8 14-Nov Midterm Exam 9 21-Nov Tree based indexing 10 28-Dec Tree based indexing 11 5-Dec External sorting 12 12-Dec External sorting (cont.) 13 19-Dec Spatial Indexes 14 26-Dec Overview

Introduction to Database Management Systems

What is a DBMS? A very large, integrated collection of data. Models real-world enterprise A Database Management System (DBMS) is a software package designed to store and manage databases Information about: Entities: such as students, faculty, courses Relationships: between entities for example a student is enrolled to a course Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

Data-Centric Applications Applications in which data plays an important role Airline reservation systems Data: aircrafts, flights, flight attendants, passengers, etc. Banking applications Data: clients, deposits, withdraws, etc. Hospital systems Data: patients, physicians, diagnosis, prescriptions, etc. University systems Data: students, teaching staff, courses, enrollments, etc. Taken from the slides of Mohamed S. Hassan Purdue University

History of DBMS Even from the early days of computers data must be stored for applications Late 1960 IBM s Information Management System (IMS) for airline reservations. 1970s Edgar Codd proposed a relational data model 1980s database query language SQL was standardized 1990s Data warehouses, consolidating data from multiple data stores for analysis 2000s Web applications Now Even larger volumes of data NoSQL databases

Files vs. DBMS Imagine writing a program for a bank Customers, Accounts, MoneyTransfers More than 500 GB (does not fit in memory) Application must stage large datasets between main memory and secondary storage (500GB RAM is not still cheap!) Must protect data from inconsistency (update in ATM should be consistent with bank branch) Crash recovery Security and access control Concurrency (Transaction management) Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

Why Use a DBMS? Data independence and efficient access Reduced application and development time Data integrity and security Uniform data administration Concurrent access Recovery from crashes Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

Example of a Traditional Database Application Suppose we are building a system to store the information about: students courses professors who takes what, who teaches what 15

Can we do it without a DBMS? Sure we can! Start by storing the data in files: students.txt courses.txt professors.txt Now write C or Java programs to implement specific tasks 16

Doing it without a DBMS... Enroll Mary Johnson in CSE444 : Write a C/Java program to do the following: Read students.txt Read courses.txt Find&update the record Mary Johnson Find&update the record CSE444 Write students.txt Write courses.txt 17

Problems without an DBMS... System crashes: Read students.txt Read courses.txt Find&update the record Mary Johnson Find&update the record CSE444 Write students.txt Write courses.txt CRASH! What is the problem? Large data sets (say 50GB) Why is this a problem? Simultaneous access by many users Lock students.txt what is the problem? 18

DBMS Client-server connection Data files Database server (someone else s C program) Applications 19

Why Study Databases? Shift from computation to information Low-end users: Web Applications needs to organize information (a mess will not be effective) High-end users: Scientific applications now have data management problems! Datasets increasing in diversity and volume Digital libraries, interactive video, Human Genome project etc. DBMS encompasses most of CS OS, languages, AI, multimedia etc. Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

Data Models A data model is a collection of concepts for describing data. (highlevel) A schema is a description of a particular collection of data, using the given data model The relational model of data is 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. Schema is defined by: name of schema, the name of each field (or attribute or column) and type of each field e.g. Students(sid: string, name: string, login: string, age: integer, gpa:real) Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

Entity: Student Students( sid: string, name: string, login: string, age: integer, gpa: real ) Sid name login age gpa 53666 Jones jones@cs 18 3.4 53688 Smith smith@ee 18 3.2 53650 Smith smith@math 19 3.8 Record Using age as a field is not a good idea, why? Attribute (field or column) Integrity Constraints: We can define the field sid to be unique or age to be larger than 0. Rules for records to satisfy

Levels of Abstraction Unlike programmers of early systems, programmer of relational system does not need to implement lower level details Many views, single conceptual (logical) schema and physical schema. Views describe how users see the data. Conceptual schema defines logical structure Physical schema describes the files and indexes used Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

View View View External Layer Conceptual Layer Base Tables Physical Layer Stored Tables...

Physical View The DBMS must know exact physical location precise physical structure database Employee record A.B.C. De Silva 222, Galle Road, Colombo Name (20 characters) Address (40 characters) 650370690V Senior Lecturer NID (10 char) Designation (15 char)

Conceptual Layer Table Table The conceptual model is a logical representation of the entire contents of the database. The conceptual model is made up of base tables. Base tables are real in that they contain physical records.

External View The user/application see authorised data own format database Lecturer Name A.B.C. De Silva Department Dept. of Computer Science Designation Senior Lecturer Age 35

External View cont. External views allow to hide unauthorised data e.g. salary, dob provide user view e.g. view employee name, designation, department data taken from employee and department files derive new attributes e.g. age derived from dob or nid

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)

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!

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 the CPU humming by working on several user programs concurrently. Interleaving actions of different user programs can lead to inconsistency DBMS ensures such problems don t arise. Users can pretend they are using a single-user system. Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

Transaction Example 1 User 1 User 2 Read balance as 1500 Read balance as 1500 Increment 200 and write 1700 Decrement 500 and write 1000 Account initially 1500 Credits Two users performing operations on a joint account at the same time. If one reads before the other writes back, the first to write will be cancelled It will work ok if read and insert is atomic (not interrupted) To make sure, we can lock the account

Transaction Example 2 Add 10 credit to User 2, U2 = 15 Remove 10 credit from User 1 Initially: U1 = 9 Credits U2 = 5 Credits A prepaid mobile phone user will transfer 10 credit to User 2. This operation needs two steps Operation fails If trying to remove 10 credits from User 1 fails for some reason, we have added 10 credits to U2 out of the blue If we perform the operation in a transaction, we can roll-back the changes.

Structure of a DBMS A typical DBMS has a layered architecture. The figure does not show the concurrency control and recovery components. This is one of several possible architectures; each system has its own variations. Query Optimization and Execution Relational Operators Files and Access Methods Buffer Management Disk Space Management These layers must consider concurrency control and recovery DB Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

An overview of Database Concepts Querrying Database Design Transaction Management Physical Storage Relational Algebra/Calculus Structured Query Language (SQL) Entity Relationship (ER) Diagrams Normalization / Functional Dependencies Data Definition Language (DDL) Locking Mechanisms (Avoiding Deadlocks) Crash Recovery Utilizing the Memory Hierarchy (Buffering) How to Store Data in Files Finding data fast; Indexing Structures External Sorting Covered in BBM 471 Covered in this Course

Databases make these folks happy End users and DBMS vendors DP application programmers E.g. smart webmasters Database administrator Design logical / physical schemas Handles security and authorization Data availability, crash recovery Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke

End of the first lecture Database Management Systems 3ed, R. Ramakrıishnan and J. Gehrke