CMU SCS 15-826: Multimedia Databases and Data Mining Lecture#1: Introduction Christos Faloutsos CMU www.cs.cmu.edu/~christos.

Slides:



Advertisements
Similar presentations
CMU SCS : Multimedia Databases and Data Mining Lecture #7: Spatial Access Methods - IV Grid files, dim. curse C. Faloutsos.
Advertisements

CMU SCS : Multimedia Databases and Data Mining Lecture #4: Multi-key and Spatial Access Methods - I C. Faloutsos.
CMU SCS : Multimedia Databases and Data Mining Lecture#1: Introduction Christos Faloutsos CMU
CMU SCS : Multimedia Databases and Data Mining Lecture#5: Multi-key and Spatial Access Methods - II C. Faloutsos.
CMU SCS : Multimedia Databases and Data Mining Lecture#2: Primary key indexing – B-trees Christos Faloutsos - CMU
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos & A. Pavlo Lecture#6: Rel. model - SQL part1 (R&G, chapter.
CMU SCS : Multimedia Databases and Data Mining Lecture#3: Primary key indexing – hashing C. Faloutsos.
Database: A collection of related data [Elmasri]. A database represents some aspect of real world called “miniworld” [Elmasri] or “enterprise” [Ramakrishnan].
IiWAS2002, Bandung, Indonesia Teaching and Learning Databases Dr. Stéphane Bressan National University of Singapore.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos – A. Pavlo Lecture#1: Introduction.
CMU SCS /615Faloutsos/Pavlo1 Carnegie Mellon Univ. Dept. of Computer Science /615 – DB Applications C. Faloutsos & A. Pavlo Lecture #13: Query.
Introduction to Relational Databases Obtained from Portland State University.
MIS DATABASE SYSTEMS, DATA WAREHOUSES, AND DATA MARTS MBNA
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Lecture#7 (cont’d): Rel. model - SQL part3.
Informatiesystemen in de Bouw 7M711 Joran Jessurun en Jos van Leeuwen Week 3.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction n Why Database Systems? n Data Models n Data Definition Language.
WFM-6103: Hydrologic Information System (HIS) Akm Saiful Islam Lecture-5: Database Management System April-October, 2006 Institute of Water and Flood Management.
Databases and Database Management System. 2 Goals comprehensive introduction to –the design of databases –database transaction processing –the use of.
Oracle SQL*plus John Ortiz. Lecture 10SQL: Overview2 Overview  SQL: Structured Query Language, pronounced S. Q. L. or sequel.  A standard language for.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos – A. Pavlo How to Scale a Database System.
CMU SCS : Multimedia Databases and Data Mining Lecture#1: Introduction Christos Faloutsos CMU
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos & A. Pavlo Lecture#7 : Rel. model - SQL part2 (R&G, chapters.
Database Management System Lecture 2 Introduction to Database management.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Rel. model - SQL part1.
Temple University – CIS Dept. CIS331– Principles of Database Systems V. Megalooikonomou Relational Model – SQL Part I (based on notes by Silberchatz,Korth,
Computing for Bioinformatics Introduction to databases What is a database? Database system components Data types DBMS architectures DBMS systems available.
CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Course Introduction Introduction to Databases Instructor: Joe Bockhorst University of Wisconsin - Milwaukee.
 DATABASE DATABASE  DATABASE ENVIRONMENT DATABASE ENVIRONMENT  WHY STUDY DATABASE WHY STUDY DATABASE  DBMS & ITS FUNCTIONS DBMS & ITS FUNCTIONS 
311: Management Information Systems Database Systems Chapter 3.
MET280: Computing for Bioinformatics Introduction to databases What is a database? Not a spreadsheet. Data types and uses DBMS (DataBase Management System)
Temple University – CIS Dept. CIS331– Principles of Database Systems V. Megalooikonomou Relational Model – SQL Part II (based on notes by Silberchatz,Korth,
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
10/16/2015 1Yan Huang - Introduction Chapter 1: Introduction What is a DBMS? What is a DBMS? A little history of DB A little history of DB Major Components.
Lecturer: Gareth Jones. How does a relational database organise data? What are the principles of a database management system? What are the principal.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Introduction.
“INTRODUCTION TO DATABASE AND SQL”. Outlines 2  Introduction To Database  Database Concepts  Database Properties  What is Database Management System.
Intro – Part 2 Introduction to Database Management: Ch 1 & 2.
CHAPTER 3 DATABASES AND DATA WAREHOUSES. 2 OPENING CASE STUDY Chrysler Spins a Competitive Advantage with Supply Chain Management Software Chapter 2 –
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Database Systems I Content: –How to build a database application –Principles of database-system implementation Instructor: John Sieg Required Text:
Relational Database vs. Data Files By Willa Zhu JISAO/UW - PMEL/NOAA March 25, 2005.
Data resource management
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Rel. model - SQL part3.
Database Management COP4540, SCS, FIU Physical Database Design (2) (ch. 16 & ch. 6)
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton.
University of Sunderland COM 220 Lecture Ten Slide 1 Database Performance.
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Rel. model - SQL part2.
Mining real world data RDBMS and SQL. Index RDBMS introduction SQL (Structured Query language)
Instructor: Pavlos Pavlikas1 How Data is Stored Chapter 8.
Class 4 Agenda Database Management Systems Database Management Systems Chapter 4: Moore’s Law Chapter 4: Moore’s Law Midterm Case Midterm Case.
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
Relational Database Systems Bartosz Zagorowicz. Flat Databases  Originally databases were flat.  All information was stored in a long text file, called.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
INTRODUCTION TO INFORMATION SYSTEMS LECTURE 9: DATABASE FEATURES, FUNCTIONS AND ARCHITECTURES PART (2) أ/ غدير عاشور 1.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Web Systems & Technologies
Database Management Systems
15-826: Multimedia Databases and Data Mining
Introduction to Relational Databases
Lecture #4: Relational Algebra
15-826: Multimedia Databases and Data Mining
15-826: Multimedia Databases and Data Mining
Presentation transcript:

CMU SCS : Multimedia Databases and Data Mining Lecture#1: Introduction Christos Faloutsos CMU

CMU SCS Copyright: C. Faloutsos (2013)2 Outline Goal: ‘Find similar / interesting things’ Intro to DB Indexing - similarity search Data Mining

CMU SCS Copyright: C. Faloutsos (2013)3 Problem Given a large collection of (multimedia) records, or graphs, find similar/interesting things, ie: Allow fast, approximate queries, and Find rules/patterns

CMU SCS Copyright: C. Faloutsos (2013)4 Sample queries Similarity search –Find pairs of branches with similar sales patterns –find medical cases similar to Smith's –Find pairs of sensor series that move in sync –Find shapes like a spark-plug –(nn: ‘case based reasoning’)

CMU SCS Copyright: C. Faloutsos (2013)5 Sample queries –cont’d Rule discovery –Clusters (of branches; of sensor data;...) –Forecasting (total sales for next year?) –Outliers (eg., unexpected part failures; fraud detection)

CMU SCS Copyright: C. Faloutsos (2013)6 Outline Goal: ‘Find similar / interesting things’ Intro to DB Indexing - similarity search Data Mining

CMU SCS Copyright: C. Faloutsos (2013)7 Detailed Outline Intro to DB Relational DBMS - what and why? –inserting, retrieving and summarizing data –views; security/privacy –(concurrency control and recovery)

CMU SCS Copyright: C. Faloutsos (2013)8 What is the goal of rel. DBMSs

CMU SCS Copyright: C. Faloutsos (2013)9 What is the goal of rel. DBMSs Electronic record-keeping: Fast and convenient access to information. Eg.: students, taking classes, obtaining grades; find my gpa

CMU SCS Copyright: C. Faloutsos (2013)10 Why Databases?

CMU SCS Copyright: C. Faloutsos (2013)11 Why Databases? Flexibility data independence (can add new tables; new attributes) data sharing/concurrency control recovery

CMU SCS Copyright: C. Faloutsos (2013)12 Why NOT Databases?

CMU SCS Copyright: C. Faloutsos (2013)13 Why NOT Databases? Price additional expertise (SQL/DBA) over-kill for small data sets

CMU SCS Copyright: C. Faloutsos (2013)14 Main vendors/products CommercialOpen source

CMU SCS Copyright: C. Faloutsos (2013)15 Main vendors/products Commercial Oracle IBM/DB2 MS SQL-server Sybase (MS Access,...) Open source Postgres (UCB) mySQL, sqlite, miniBase (Wisc) (

CMU SCS Copyright: C. Faloutsos (2013)16 Detailed Outline Intro to DB Relational DBMS - what and why? –inserting, retrieving and summarizing data –views; security/privacy –(concurrency control and recovery)

CMU SCS Copyright: C. Faloutsos (2013)17 How do DBs work? We use sqlite3 as an example, from

CMU SCS Copyright: C. Faloutsos (2013)18 How do DBs work? %sqlite3 mydb # mydb: file sql>create table student ( ssn fixed; name char(20) );

CMU SCS Copyright: C. Faloutsos (2013)19 How do DBs work? sql>insert into student values (123, “Smith”); sql>select * from student;

CMU SCS Copyright: C. Faloutsos (2013)20 How do DBs work? sql>create table takes ( ssn fixed, c_id char(5), grade fixed));

CMU SCS Copyright: C. Faloutsos (2013)21 How do DBs work - cont’d More than one tables - joins Eg., roster (names only) for

CMU SCS Copyright: C. Faloutsos (2013)22 How do DBs work - cont’d sql> select name from student, takes where student.ssn = takes.ssn and takes.c_id = “15826”

CMU SCS Copyright: C. Faloutsos (2013)23 SQL-DML General form: select a1, a2, … an from r1, r2, … rm where P [order by ….] [group by …] [having …]

CMU SCS Copyright: C. Faloutsos (2013)24 Aggregation Find ssn and GPA for each student

CMU SCS Copyright: C. Faloutsos (2013)25 Aggregation sql> select ssn, avg(grade) from takes group by ssn; DM!

CMU SCS Copyright: C. Faloutsos (2013)26 Detailed Outline Intro to DB Relational DBMS - what and why? –inserting, retrieving and summarizing data –views; security/privacy –(concurrency control and recovery)

CMU SCS Copyright: C. Faloutsos (2013)27 Views - what and why? suppose you ONLY want to see ssn and GPA (eg., in your data-warehouse) suppose secy is only allowed to see GPAs, but not individual grades (or, suppose you want to create a short-hand for a query you ask again and again) -> VIEWS!

CMU SCS Copyright: C. Faloutsos (2013)28 Views sql> create view fellowship as ( select ssn, avg(grade) from takes group by ssn);

CMU SCS Copyright: C. Faloutsos (2013)29 Views sql> create view fellowship as ( select ssn, avg(grade) from takes group by ssn);

CMU SCS Copyright: C. Faloutsos (2013)30 Views Views = ‘virtual tables’

CMU SCS Copyright: C. Faloutsos (2013)31 Views sql> select * from fellowship;

CMU SCS Copyright: C. Faloutsos (2013)32 Views sql> grant select on fellowship to secy;

CMU SCS Copyright: C. Faloutsos (2013)33 Detailed Outline Intro to DB Relational DBMS - what and why? –inserting, retrieving and summarizing data –views; security/privacy –(concurrency control and recovery) What if slow? Conclusions

CMU SCS What if slow? sqlite> select * from irs_table where ssn=‘123’; Q: What to do, if it takes 2hours? Copyright: C. Faloutsos (2013)34

CMU SCS What if slow? sqlite> select * from irs_table where ssn=‘123’; Q: What to do, if it takes 2hours? A: build an index Q’: on what attribute? Q’’: what syntax? Copyright: C. Faloutsos (2013)35 DM!

CMU SCS What if slow - #2? sqlite> create table friends (p1, p2); Facebook-style: find the 2-step-away people Copyright: C. Faloutsos (2013)36

CMU SCS What if slow - #2? sqlite> create table friends (p1, p2); sqlite> select f1.p1, f2.p2 from friends f1, friends f2 where f1.p2 = f2.p1; Q: too slow – now what? Copyright: C. Faloutsos (2013)37

CMU SCS What if slow - #2? sqlite> create table friends (p1, p2); sqlite> select f1.p1, f2.p2 from friends f1, friends f2 where f1.p2 = f2.p1; Q: too slow – now what? A: ‘explain’: sqlite> explain select … Copyright: C. Faloutsos (2013)38 DM!

CMU SCS Long term answer: Check the query optimizer (see, say, Ramakrishnan + Gehrke 3 rd edition, chapter15) Copyright: C. Faloutsos (2013)39

CMU SCS Copyright: C. Faloutsos (2013)40 Conclusions (relational) DBMSs: electronic record keepers customize them with create table commands ask SQL queries to retrieve info

CMU SCS Copyright: C. Faloutsos (2013)41 Conclusions cont’d main advantages over flat files & scripts: logical + physical data independence (ie., flexibility of adding new attributes, new tables and indices) ( concurrency control and recovery for free )

CMU SCS Copyright: C. Faloutsos (2013)42 Conclusions cont’d D.M. practitioner’s guide Data mining: group by + aggregates If a query runs slow: –explain select – to see what happens –create index – often speeds up queries

CMU SCS Copyright: C. Faloutsos (2013)43 For more info: Sqlite3: linux.andrew postgres: Microsoft Access: available on andrew clusters (PC) Ramakrishnan + Gehrke, 3rd edition web page, eg, –