CSE 303: Database. Lecture 01

Similar documents
Database Management Systems. Chapter 1

ECS 165A: Introduction to Database Systems

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Winter 2009 Lecture 1 - Class Introduction

Overview. Introduction to Database Systems. Motivation... Motivation: how do we store lots of data?

Topics. Introduction to Database Management System. What Is a DBMS? DBMS Types

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Fall 2007 Lecture 1 - Class Introduction

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Spring 2006 Lecture 1 - Class Introduction

Database Systems. Lecture 1: Introduction

Introduction to Databases

Scope of this Course. Database System Environment. CSC 440 Database Management Systems Section 1

Week 1 Part 1: An Introduction to Database Systems. Databases and DBMSs. Why Use a DBMS? Why Study Databases??

Logistics. Database Management Systems. Chapter 1. Project. Goals for This Course. Any Questions So Far? What This Course Cannot Do.

Introduction to Database Systems CS4320. Instructor: Christoph Koch CS

CSE 132A. Database Systems Principles

CSE 562 Database Systems

Introduction to Database Systems. Module 1, Lecture 1. Instructor: Raghu Ramakrishnan UW-Madison

CS 525 Advanced Database Organization - Spring 2013 Mon + Wed 3:15-4:30 PM, Room: Wishnick Hall 113

1 File Processing Systems

CSE 233. Database System Overview

Instructor: Michael J. May Semester 1 of The course meets 9:00am 11:00am on Sundays. The Targil for the course is 12:00pm 2:00pm on Sundays.

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

CS 4604: Introduc0on to Database Management Systems

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

Transactions and the Internet

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

Introduction: Database management system

Databases. DSIC. Academic Year

The Relational Model. Why Study the Relational Model?

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

Chapter 9 Java and SQL. Wang Yang wyang@njnet.edu.cn

INTRODUCTION DATABASE MANAGEMENT SYSTEMS

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

Introduction to database management systems

1.264 Lecture 15. SQL transactions, security, indexes

CIS Information and Database Systems I. Course Syllabus Spring 2015

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

Basic Concepts of Database Systems

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

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

Course: CSC 222 Database Design and Management I (3 credits Compulsory)

Chapter 1: Introduction

In This Lecture. Security and Integrity. Database Security. DBMS Security Support. Privileges in SQL. Permissions and Privilege.

Database Design and Programming

CSE 530A Database Management Systems. Introduction. Washington University Fall 2013

INTRODUCTION TO DATABASE SYSTEMS

Database System Concepts

Principles of Database. Management: Summary

Geography 676 Web Spatial Database Development and Programming

Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute

In This Lecture. SQL Data Definition SQL SQL. Notes. Non-Procedural Programming. Database Systems Lecture 5 Natasha Alechina

Intro to Databases. ACM Webmonkeys 2011

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

Relational Database Basics Review

Fundamentals of Database Design

City University of Hong Kong. Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015

3. Relational Model and Relational Algebra

DB2 Application Development and Migration Tools

Computer Science Course Descriptions Page 1

AWS Schema Conversion Tool. User Guide Version 1.0

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

Foundations of Information Management

COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries

Database Systems Introduction Dr P Sreenivasa Kumar

Database Internals (Overview)

Database Concurrency Control and Recovery. Simple database model

Oracle USF

CSE 412/598 Database Management Spring 2012 Semester Syllabus

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

Θεµελίωση Βάσεων εδοµένων

Relational Database Systems 2 1. System Architecture

IS 631 Enterprise Database Management

Driver for JDBC Implementation Guide

CS 564: DATABASE MANAGEMENT SYSTEMS

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 5 - DBMS Architecture

Objectives of Lecture 1. Class and Office Hours. Labs and TAs. CMPUT 391: Introduction. Introduction

EECS 647: Introduction to Database Systems

Databases in Engineering / Lab-1 (MS-Access/SQL)

Textbook and References

Introduction to Triggers using SQL

Using Oracle Real Application Clusters (RAC)

B561 Advanced Database Concepts. 0 Introduction. Qin Zhang 1-1

Data Integration and Exchange. L. Libkin 1 Data Integration and Exchange

COMP5138 Relational Database Management Systems. Databases are Everywhere!

Lecture 6. SQL, Logical DB Design

Overview of Database Management Systems

David M. Kroenke and David J. Auer Database Processing 11 th Edition Fundamentals, Design, and Implementation. Chapter Objectives

COURSE SYLLABUS EDG 6931: Designing Integrated Media Environments 2 Educational Technology Program University of Florida

Database Management Systems

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

Core Syllabus. Version 2.6 B BUILD KNOWLEDGE AREA: DEVELOPMENT AND IMPLEMENTATION OF INFORMATION SYSTEMS. June 2006

Oracle Database: SQL and PL/SQL Fundamentals

Syllabus CIS 64B - Summer Description

Foundations of Information Management

IS 631 Enterprise Database Management

Demystified CONTENTS Acknowledgments xvii Introduction xix CHAPTER 1 Database Fundamentals CHAPTER 2 Exploring Relational Database Components

SQL DATABASE PROGRAMMING (PL/SQL AND T-SQL)

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: ) Information Technology

Overview of Data Management

Java EE 7: Back-End Server Application Development

Transcription:

CSE 303: Database Lecture 01 2016 Introductory Lecture 1

Teaching Staff Instructors: Ashikur Rahman Prof. ASM Latiful Hoque Office: CSE 117 Office: CSE 118 2

Lectures: 1 st half - from a user s perspective 1. Foundations: Relational data models & SQL Weeks 1-3 How to manipulate data with SQL, a declarative language reduced expressive power but the system can do more for you 2. Database Design: Design theory and constraints Weeks 4-5 Designing relational schema to keep your data from getting corrupted 3. E-R diagram & Relational Algebra: Syntax & supporting systems Week 6-7 A programmer s first step to data abstraction 3

Lectures: 2 nd half - understanding how it works 4. Inside to database systems Indexing External Memory Algorithms (IO model) for sorting, joins, etc. Basics of query optimization (Cost Estimates) 5. Transactions: Syntax & supporting systems A programmer s abstraction for data consistency 6. Data Recovery 4

Communications Web site: http://teacher.buet.ac.bd/ashikur/cse303 Lectures available here (usually the morning before class) Useful links to possibly useful reading materials Class test marks and important announcements are posted! Email: {ashikur, asmlatifulhoque}@cse DOT buet DOT ac DOT bd 5

Textbook(s) Main textbook: Database Systems: The Complete Book, Hector Garcia-Molina, Jeffrey Ullman, Jennifer Widom Most chapters are good. Some are not as great (functional dependencies). available at the Poroma Prokashoni A free PDF version is available (linked from the course website) COME TO THE CLASS! ASK QUESTIONS! READ SLIDES! 6

Other Texts Database System Concepts, by Avi Silberschatz, Henry F. Korth, S. Sudarshan 7

Today s Outline Overview of DBMS DBMS vs other alternatives DBMS through an example The Course outline 8

Data is the Future - Quotation by somebody on the earth What is a database? A large, integrated collection of data Give examples of databases Accounts database; payroll database; BIIS students database 9

Increasingly many companies see themselves as data driven. 10

Millennia of Knowledge in Libraries 11

The world s scientific knowledge is accessible. 12

But we re still human 13

The world s scientific knowledge is accessible, but not readable. Could we build a machine to read for us? Building database is the first step towards machine readable data 14

Database Management System What is a DBMS? A big C/C++ program written by someone else that allows us to manage efficiently a large database and allows it to persist over long periods of time 15

Database Management System What is a DBMS(formal definition)? A Database Management System (DBMS) is a piece of software designed to store and manage databases 16

Database Management System Give examples of DBMS The big commercial database vendors: Oracle IBM (with DB2) bought Informix recently Microsoft (SQL Server) Some open source (free) database systems: Postgresql Mysql Predator 17

DBMS Market Shares In 2006, www.gartner.com Oracle: 47% market share, $7.2BN in sales IBM: 21% market share with $3.2BN in sales Microsoft: 17% market with $2.6BN in sales 18

DBMS Latest ranking http://db-engines.com/ 19

An Example The Internet Movie Database http://www.imdb.com Entities: Actors (800k), Movies (400k), Directors, Relationships: who played where, who directed what, 20

Tables Directors: Movie_Directors: id fname lname id mid 15901 Francis Ford Coppola 15901 130128...... Movies: mid Title Year 130128 The Godfather 1972... 21

A Motivating, Running Example Consider building a course management system (CMS): Students Courses Professors Who takes what Who teaches what Entities Relationships 22

Modeling the CMS using DBMS Logical Schema Students(sid: string, name: string, gpa: float) Courses(cid: string, cname: string, credits: int) Enrolled(sid: string, cid: string, grade: string). sid Name Gpa cid cname credits 101 Jalil 3.2 101 C 3 Relations 123 Karim 3.8 303 Dbase 3 Students sid cid Grade 123 303 A Enrolled Courses 23

Can we do it without a DBMS? Sure we can! Start by storing the data in files: students.txt courses.txt professors.txt You can store data using text editors, OR You can write C or Java programs to implement specific tasks 24

Can we do it without a DBMS? Another way: store the data in EXCEL files: students.xls courses.xls professors.xls 25

Possible Organizations Files Spreadsheets DBMS 26

1. Create/store Large Datasets Files Yes, but Spreadsheets DBMS Not really Yes 27

2. Search/Query/Update Files Simple queries (grep); Updates are difficult Spreadsheets DBMS Simple queries; Simple updates All 28

3. Change the Structure Add Address to each Actor Files Very hard Spreadsheets Yes DBMS Yes 29

4. Concurrent Access Multiple users access/update the data concurrently What can go wrong? Lost updates; inconsistent reads, You and your project partner are editing the same file. You both save it at the same time. Whose changes survive? How do we protect against that in OS? locks 30

5. Recover from crashes Transfer $100 from account #4662 to #7199: X = Read(Account, #4662); X.amount = X.amount - 100; Write(Account, #4662, X); Y = Read(Account, #7199); Y.amount = Y.amount + 100; Write(Account, #7199, Y); CRASH! What is the problem? 31

6. Security Files File-level access control Spreadsheets Same [?] DBMS Table/attributelevel access control 32

How DMBS does all those things Two tier system or client-server connection (ODBC, JDBC) Data files Database server (someone else s C program) Applications 33

Data Independence Logical view Directors: Movie_Directors: id fname lname id mid 15901 Francis Ford Coppola 15901 130128...... Movies: mid Title Year 130128 The Godfather 1972... Directors_file Moviews_title_index_file Directors_fname_index_file Movies_file Physical view 34

What the Database Systems Does 1. Create/store large datasets 2. Search/query/update 3. Change the structure 4. Concurrent access to many user 5. Recover from crashes 6. Security SQL DDL SQL DML SQL DDL Transactions ACID Grant, Revoke, Roles 35

Course Outline (first half) - TENTATIVE!! 1. Introduction (chapter 1) 2. Relational model (chapter 2) 3. SQL (chapter 6) 4. Constraints (chapter 7) 5. Design theory (chapter 3) 6. E-R diagram (chapter 4) 7. Relational Algebra (chapter 2) 36

Until Next Time Go to the course website Install Oracle Xpress Edition 11/12 Start using sqlplus, and sql developer Read the guideline on the course website to use sqlplus Find a partner for the project in the lab Start reading about SQL online and in the book 37