1.1 CAS CS 460/660 Introduction to Database Systems Fall 2015.

Slides:



Advertisements
Similar presentations
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Lecture-1 Database system,CSE-313, P.B. Dr. M. A. Kashem Associate. Professor. CSE, DUET,
Advertisements

Adapted from: ©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Fly-over Introduction Purpose of Database Systems View of Data Data.
CAS CS 460 Introduction to Database Systems Thanks to Prof. George Kollios, Boston University and Prof. Mitch Cherniack Brandeis University for lecture.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
BD05/06 Chapter 1: Introduction  Purpose of database systems  Data abstraction levels  Data models  SQL :Data Definition Language and Data Manipulation.
CS157A Lecture 2 DB Mangement Systems Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Database Management System (DBMS)
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Data Definition Language (DDL) Specification notation for defining the database schema –E.g. create table account ( account-number char(10), balance integer)
DATABASE SYSTEM CONCEPTS
On Database Systems.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
1 CENG 302 Introduction to Database Management Systems Nihan Kesim Çiçekli URL:
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction n Why Database Systems? n Data Models n Data Definition Language.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Database Management Systems Purpose of Database Systems View of Data.
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
Introduction to DBMS Purpose of Database Systems View of Data
CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 1: Introduction.
1.1 CAS CS 460 Introduction to Database Systems. 1.2 About the course – Administrivia Instructor:  George Kollios,
Temple University – CIS Dept. CIS616– Principles of Database Systems V. Megalooikonomou Introduction (based on notes by Silberchatz,Korth, and Sudarshan)
ICOM 5016 – Introduction to Database Systems
ADVANCED DATABASES WITH ORACLE 11g FOR ADDB7311 LEARNING UNIT 1 of 7.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Lecture 6: Introduction to Database Management Systems Lecturer: Prof. Kazimierz Subieta.
1 Introduction to databases concepts CCIS – IS department Level 4.
Introduction to Databases
Introduction. 
Chapter 2 CIS Sungchul Hong
1 Databases & SQL By: Julia Tartakovsky CS 340, Fall 2004 Acknowledgement (for help with the J# code connecting to an Oracle DB): Yosef Lifshits.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
 DATABASE DATABASE  DATABASE ENVIRONMENT DATABASE ENVIRONMENT  WHY STUDY DATABASE WHY STUDY DATABASE  DBMS & ITS FUNCTIONS DBMS & ITS FUNCTIONS 
Database Management Systems
Database Organization and Design
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
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
1 CS3431 – Database Systems I Introduction Instructor: Mohamed Eltabakh
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
Mr.Prasad Sawant, MIT Pune India Introduction to DBMS.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
C HAPTER 1: I NTRODUCTION Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction Management.
Chapter 1: Introduction
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
CS3431: C-Term CS3431 – Database Systems I Introduction Instructor: Mohamed Eltabakh
Lecture on Database Management System
Database System Concepts Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction.
Databases Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1.
RELATIONAL DATABASE MANAGEMENT SYSTEM - I Subject code : BCA-12 and PGDCA 1.
©Silberschatz, Korth and Sudarshan 1.1 Database System Concepts قواعد البيانات Data Base قواعد البيانات CCS 402 Mr. Nedal hayajneh E- mail
CHAPTER 1: INTRODUCTION Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Storage Management Database.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 1: Introduction.
CS 325 Spring ‘09 Chapter 1 Goals:
DATABASE MANAGEMENT SYSTEMS
Introduction to DBMS Purpose of Database Systems View of Data
DATABASE MANAGEMENT SYSTEMS
Chapter 1: Introduction
Unit 1: INTRODUCTION Database system, Characteristics Database Users
Chapter 1: Introduction
Introduction to Database Systems
Chapter 1: Introduction
Introduction to Database Systems
Chapter 1: Introduction
Chapter 1: Introduction
Introduction to DBMS Purpose of Database Systems View of Data
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Presentation transcript:

1.1 CAS CS 460/660 Introduction to Database Systems Fall 2015

1.2 About the course – Administrivia Instructor:  George Kollios, MCS 283, Mon 2:30-4:00 and Tue 1:00-2:30 Teaching Fellow:  Haohan Zhu, EMA 309, Wed 12:00-1:00 and Fri 3:00-4:00 Home Page:  Check frequently! Syllabus, schedule, assignments, announcements…  Piazza site (created soon)

1.3 Textbook Textbook Raghu Ramakrishnan and Johannes Gehrke, "Database Management Systems", McGraw-Hill, Third Edition

1.4 Grading CS460 Homeworks: 25% Midterm: 20% Final: 25% Programming Assignments: 30% examples:  Implement a Web application using a DBMS  Modify/improve an existing database system (PostgreSQL)  Use a NoSQL system to analyze large datasets  (tentative) Use Amazon Cloud Services to perform data analysis on a large dataset

1.5 Grading CS660 Homeworks: 20% Midterm: 15% Final: 25% Programming Assignments: 30% Extra Assignments: 10%

1.6 What is a Database? Database: A very large collection (of files) of related data Examples: Accounts in a bank, BU’s students database, Airline reservations… also, facebook pictures and comments, web logs, etc… Models a real world enterprise:  Entities (e.g., teams, games / students, courses)  Relationships (e.g., student takes CS460)  Even active components (e.g. “business logic”)

1.7 What is a Data Base Management System? Data Base Management System (DBMS): A software package/system that can be used to store, manage and retrieve data from databases that persist for long periods of time! Examples: Oracle, IBM DB2, MS SQLServer, MySQL, PostgreSQL, SQLite,… Database System: DBMS+data (+ applications)

1.8 Why Study Databases?? Shift from computation to data (information)  Always true for corporate computing  More and more true in the scientific world  and of course, Web  New trend: social media generate ever increasing amount of data, sensor devices generate also huge datasets DBMS encompasses much of CS in a practical discipline  OS, languages, theory, AI, logic

1.9 Why Databases?? Why not store everything on flat files: use the file system of the OS, cheap/simple… Name, Course, Grade John Smith, CS112, B Mike Stonebraker, CS234, A Jim Gray, CS560, A John Smith, CS560, B+ ………………… Yes, but has many problems…

1.10 Problem 1 Data Organization  redundancy and inconsistency  Multiple file formats, duplication of information in different files Name, Course, , Grade John Smith, CS112, Mike Stonebraker, CS234, Jim Gray, CS560, John Smith, CS560, Why this is a problem?  Wasted space  Potential inconsistencies (multiple formats, John Smith vs Smith J.)

1.11 Problem 2 Data retrieval:  Find the students registered for CS460  Find the students with GPA > 3.5 For every query we need to write a program! We need the retrieval to be:  Easy to write  Execute efficiently

1.12 Problem 3 Data Integrity  No support for sharing:  Prevent simultaneous modifications  No coping mechanisms for system crashes  No means of Preventing Data Entry Errors (checks must be hard-coded in the programs)  Security problems Database systems offer solutions to all the above problems

1.13 Data Organization Two levels of data modeling Conceptual or Logical level: describes data stored in database, and the relationships among the data. type customer = record name : string; street : string; city : integer; end; Physical level: describes how a record (e.g., customer) is stored. Also, External (View) level: application programs hide details of data types. Views can also hide information (e.g., salary) for security purposes.

1.14 View of Data A logical architecture for a database system

1.15 Database Schema Schema – the structure of the database  e.g., the database consists of information about a set of customers and accounts and the relationship between them  Analogous to type information of a variable in a program  Physical schema: database design at the physical level  Logical schema: database design at the logical level

1.16 Data Organization Data Models : a framework for describing  data  data relationships  data semantics  data constraints Entity-Relationship model We will concentrate on Relational model Other models:  object-oriented model  semi-structured data models, XML

1.17 Relational Model Example of tabular data in the relational model customer- name Customer-id customer- street customer- city account- number Johnson Smith Johnson Jones Smith Alma North Alma Main North Palo Alto Rye Palo Alto Harrison Rye A-101 A-215 A-201 A-217 A-201 Attributes

1.18 Data Organization Data Storage Where can data be stored?  Main memory  Secondary memory (hard disks)  Optical storage (DVDs)  Tertiary store (tapes) Move data? Determined by buffer manager Mapping data to files? Determined by file manager

1.19 Data retrieval Queries Query = Declarative data retrieval describes what data, not how to retrieve it Ex. Give me the students with GPA > 3.5 vs Scan the student file and retrieve the records with gpa>3.5 Why? 1.Easier to write 2.Efficient to execute (why?)

1.20 SQL SQL: widely used (declarative) non-procedural language  E.g. find the name of the customer with customer-id select customer.customer-name from customer where customer.customer-id = ‘ ’  E.g. find the balances of all accounts held by the customer with customer-id select account.balance from depositor, account where depositor.customer-id = ‘ ’ and depositor.account-number = account.account-number Procedural languages: C++, Java, relational algebra

1.21 Data retrieval: Indexing How to answer fast the query: “Find the student with SID = 101”? One approach is to scan the student table, check every student, retrurn the one with id=101… very slow for large databases Any better idea? 1 st keep student record over the SID. Do a binary search…. Updates… 2 nd Use a dynamic search tree!! Allow insertions, deletions, updates and at the same time keep the records sorted! In databases we use the B+-tree (multiway search tree) 3 rd Use a hash table. Much faster for exact match queries… but cannot support Range queries. (Also, special hashing schemes are needed for dynamic data)

1.22 Root B+Tree ExampleB=

1.23 Data Integrity Transaction processing Why Concurrent Access to Data must be Managed? John and Jane withdraw $50 and $100 from a common account… Initial balance $300. Final balance=? It depends… John: 1. get balance 2. if balance > $50 3. balance = balance - $50 4. update balance Jane: 1. get balance 2. if balance > $ balance = balance - $ update balance

1.24 Data Integrity Recovery Transfer $50 from account A ($100) to account B ($200) 1. get balance for A 2. If balanceA > $50 3. balance A = balance A – 50 4.Update balance A in database 5. Get balance for B 6. balance B = balance B Update balance B in database System crashes…. Recovery management

1.25 Database Architecture DB Programmer User DBA DML Precompiler Query Optimizer DDL Interpreter Query Evaluator Buffer Manager File Manager Data Statistics Indices Schema DDL Commands Query Code w/ embedded queries Transaction Manager Recovery Manager Metadata Integrity Constraints Secondary Storage Storage Manager Query Processor

1.26 Big Data and NoSQL Large amount of data are collected and stored everyday  Can come from different sources, huge amounts, large update rates Examples: facebook needs to handle: 2.7 billion “likes”, 400 million images, 500+ TB per day!!, Google receives more than 1 billion queries per day! Question: How to utilize these datasets in order to help us on our goals:  Data Analytics: Try to analyze the data in order to find useful, unknown and actionable information in the data Cluster based data analytics:  Map-Reduce, shared nothing DBs NoSQL: trade something for improved performance  (usually: ACID properties, flexibility, functionality)

1.27 Outline 1 st half of the course: application-oriented  How to develop database applications: User + DBA 2 nd part of the course: system-oriented  Learn the internals of a relational DBMS (developer for Oracle..)