Intro to Database Lecture 1: Course Overview 1. 2 Data analysis in the fight against human trafficking. All of society is online. New York DA use MEMEX.

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
Mani-CS34311 CS3431 – Database Systems I Introduction Instructor: Murali Mani
Transaction Processing Lecture ACID 2 phase commit.
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
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:
COMP 5138 Relational Database Management Systems Semester 2, 2007 Lecture 8A Transaction Concept.
CS145: Intro to Database Management Systems
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.
Transaction Management: Concurrency Control CS634 Class 16, Apr 2, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
1 CS862 - Advanced Database Systems Sang H. Son
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Xintao Wu.
CS145: Intro to Database Management Systems Lecture 1: Course Overview 1.
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Weichao Wang.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Overview of Database Systems.
Database Organization and Design
CS 162 Discussion Section Week 9 11/11 – 11/15. Today’s Section ●Project discussion (5 min) ●Quiz (10 min) ●Lecture Review (20 min) ●Worksheet and Discussion.
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 CS3431 – Database Systems I Introduction Instructor: Mohamed Eltabakh
1 What Is a DBMS?  A very large, integrated collection of data.  Models real-world enterprise.  Entities (e.g., students, courses)  Relationships (e.g.,
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 21 November 2, 2004.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
-ebru a.s ATTRIBUTE: Description of entities For employee entity number, name, deptno, age, adr, salary..etc are attributes. RECORD: Stores whole.
ICS 321 Spring 2011 Introduction to Database Systems Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/12/20111Lipyeow.
Fall CSE330/CIS550: Introduction to Database Management Systems Prof. Susan Davidson Office: 278 Moore Office hours: TTh
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.  Instructor: Yrd. Doç. Dr. Cengiz Örencik   Course material.
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
Lecture 1: Course Overview
Introduction to Database Systems Chapter 1
Introduction to Database Systems
Instructor: Elke Rundensteiner
Database Management Systems Chapter 1
Introduction to Database Systems
Overview of Database Systems Chpt 1
Instructor: Murali Mani
Database Management Systems Chapter 1
Database Management Systems
Lecture 1: Course Overview
CS564: Database Management Systems
Database Management Systems CSE594
CSCI 305: Introduction to Database Systems
Lecture 20: Intro to Transactions & Logging II
Sang H. Son CS6750: Database Systems The slides for this text are organized into chapters. This lecture covers Chapter 1. Chapter 1: Introduction.
Transaction Management Overview
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.
Introduction to Database Systems Chpt 1
Presentation transcript:

Intro to Database Lecture 1: Course Overview 1

2 Data analysis in the fight against human trafficking. All of society is online. New York DA use MEMEX Data for all trafficking investigations this year.

3 Increasingly many companies see themselves as data driven.

The world is increasingly driven by data… 4 This class teaches the basics of how to use & manage data.

1. Introduction 5 Section 1

What you will learn about in this section 1.Motivation for studying DBs 2.Administrative structure 3.Course logistics 4.Overview of lecture coverage 5.ACTIVITY: IPython “Hello World!” 6 Section 1

Big Data Landscape… Infrastructure is Changing 7 New tech. Same Principles. Section 1 > Introduction

Why should you study databases? Mercenary- make more $$$: Startups need DB talent right away = low employee # Massive industry… Intellectual: Science: data poor to data rich No idea how to handle the data! Fundamental ideas to/from all of CS: Systems, theory, AI, logic, stats, analysis…. 8 Many great computer systems ideas started in DB. Section 1 > Introduction

What this course is (and is not) Discuss fundamentals of data management How to design databases, query databases, build applications with them. How to debug them when they go wrong! Not how to be a DBA or how to tune Oracle 12g. We’ll cover how database management systems work But not the principles of how to build them  see 245, 345, and Section 1 > Introduction

2. Overview of the relational data model 10 Section 2

What you will learn about in this section 1.Definition of DBMS 2.Data models & the relational data model 3.Schemas & data independence 4.ACTIVITY: IPython + SQL 11 Section 2

What is a DBMS? A large, integrated collection of data Models a real-world enterprise Entities (e.g., Students, Courses) Relationships (e.g., Alice is enrolled in 145) A Database Management System (DBMS) is a piece of software designed to store and manage databases 12 Section 2 > DBMS

13 A Motivating, Running Example Consider building a course management system (CMS): Students Courses Professors Who takes what Who teaches what Entities Relationships Section 2 > Data models

Data models A data model is a collection of concepts for describing data The relational model of data is the most widely used model today Main Concept: the relation- essentially, a table A schema is a description of a particular collection of data, using the given data model E.g. every relation in a relational data model has a schema describing types, etc. 14 Section 2 > Data models

“Relational databases form the bedrock of western civilization” - Bruce Lindsay, IBM Research 15 Section 2 > Data models

Modeling the CMS Logical Schema Students (sid: string, name: string, gpa: float) Courses (cid: string, cname: string, credits: int) Enrolled (sid: string, cid: string, grade: string) sidNameGpa 101Bob Mary3.8 Students cidcnamecredits Courses sidcidGrade A Enrolled Relations 16 Section 2 > Data models

Modeling the CMS Logical Schema Students (sid: string, name: string, gpa: float) Courses (cid: string, cname: string, credits: int) Enrolled (sid: string, cid: string, grade: string) sidNameGpa 101Bob Mary3.8 Students cidcnamecredits Courses sidcidGrade A Enrolled 17 Corresponding keys Section 2 > Data models

Other Schemata… Physical Schema: describes data layout Relations as unordered files Some data in sorted order (index) Logical Schema: Previous slide External Schema: (Views) Course_info (cid: string, enrollment: integer) Derived from other tables Applications Administrators 18 Section 2 > Schemata

Data independence Concept: Applications do not need to worry about how the data is structured and stored Logical data independence: protection from changes in the logical structure of the data Physical data independence: protection from physical layout changes One of the most important reasons to use a DBMS 19 Section 2 > Schemata I.e. should not need to ask: can we add a new entity or attribute without rewriting the application? I.e. should not need to ask: which disks are the data stored on? Is the data indexed?

3. Overview of DBMS topics Key concepts & challenges 20 Section 3

What you will learn about in this section 1.Transactions 2.Concurrency & locking 3.Atomicity & logging 4.Summary 21 Section 3

Challenges with Many Users Suppose that our CMS application serves 1000’s of users or more- what are some challenges? DBMS allows user to write programs as if they were the only user Disk/SSD access is slow, DBMS hide the latency by doing more CPU work concurrently 22 Section 3 > DBMS Challenges Security: Different users, different roles Performance: Need to provide concurrent access Consistency: Concurrency can lead to update problems We won’t look at too much in this course, but is extremely important

Transactions A key concept is the transaction (TXN): an atomic sequence of db actions (reads/writes) If a user cancels a TXN, it should be as if nothing happened! Transactions leave the DB in a consistent state Users may write integrity constraints, e.g., ‘each course is assigned to exactly one room’ Atomicity: An action either completes entirely or not at all 23 Section 3 > DBMS Challenges Consistency: An action results in a state which conforms to all integrity constraints However, note that the DBMS does not understand the real meaning of the constraints– consistency burden is still on the user!

Scheduling Concurrent Transactions The DBMS ensures that the execution of {T 1,…,T n } is equivalent to some serial execution One way to accomplish this: Locking Before reading or writing, transaction requires a lock from DBMS, holds until the end Key Idea: If T i wants to write to an item x and T j wants to read x, then T i, T j conflict. Solution via locking: only one winner gets the lock loser is blocked (waits) until winner finishes A set of TXNs is isolated if their effect is as if all were executed serially 24 Section 3 > DBMS Challenges What if T i and T j need X and Y, and T i asks for X before T j, and T j asks for Y before T i ? -> Deadlock! One is aborted… What if T i and T j need X and Y, and T i asks for X before T j, and T j asks for Y before T i ? -> Deadlock! One is aborted… All concurrency issues handled by the DBMS…

Ensuring Atomicity & Durability DBMS ensures atomicity even if a TXN crashes! One way to accomplish this: Write-ahead logging (WAL) Key Idea: Keep a log of all the writes done. After a crash, the partially executed TXNs are undone using the log Write-ahead Logging (WAL): Before any action is finalized, a corresponding log entry is forced to disk 25 Section 3 > DBMS Challenges We assume that the log is on “stable” storage All atomicity issues also handled by the DBMS…

A Well-Designed DBMS makes many people happy! End users and DBMS vendors Reduces cost and makes money DB application programmers Can handle more users, faster, for cheaper, and with better reliability / security guarantees! Database administrators (DBA) Easier time of designing logical/physical schema, handling security/authorization, tuning, crash recovery, and more… Must still understand DB internals Must still understand DB internals 26 Section 3 > Summary

Summary of DBMS DBMS are used to maintain, query, and manage large datasets. Provide concurrency, recovery from crashes, quick application development, integrity, and security Key abstractions give data independence DBMS R&D is one of the broadest, most exciting fields in CS. Fact! 27 Section 3 > Summary

Summary of DBMS DBMS are used to maintain, query, and manage large datasets. Provide concurrency, recovery from crashes, quick application development, integrity, and security Key abstractions give data independence DBMS R&D is one of the broadest, most exciting fields in CS. Fact! 28 Section 3 > Summary