Models & Intro to DB Architectures

Size: px
Start display at page:

Download "Models & Intro to DB Architectures"

Transcription

1 class 3 Models & Intro to DB Architectures prof. Stratos Idreos

2 welcome brave cs165 students! Stratos Idreos 2 /49

3 NO LAPTOP/PHONE POLICY class is based on participation! we will bring a copy of the slides for every one in each time class so you can follow and keep notes + there is enough evidence that laptops and phones slow you down (check syllabus for more info) Stratos Idreos 3 /49

4 applications sql database kernel algorithms/operators cpu memory data data data disk Stratos Idreos 4 /49

5 a simple example assume an array of N integers: find all positions where value>x qualifying positions select operator exists in all systems: sql, nosql, newsql data even the simplest tasks are actually far from trivial no obvious solutions; just a taste of what to come Stratos Idreos 5 /49

6 what we will do design data structures and algorithms = access methods study design tradeoffs with respect to modern hardware application requirements & complete system design next couple of weeks very basics of data models and languages (today) basics of db architectures (today next couple of classes) column-stores and hardware-conscious designs Stratos Idreos 6 /49

7 Stratos Idreos 7 /49

8 for project: install MonetDB & PostgreSQL/MySQL and play with SQL explain + SQL query to see query plans in MonetDB (use read-only mode) repeat throughout the semester compare with your system in terms of performance this is part of final deliverable & several logistics and tools (code.seas, gdb, perf, valgrind, testing infrastructure) do not underestimate this Stratos Idreos 8 /49

9 what should I be doing? do P0 register to Piazza and stay logged in check syllabus/website carefully check project timeline and plan around it keep up with reading (goes fast) register for notes today (tmr we will do assignments) come to Labs and OH frequently Stratos Idreos 9 /49

10 how to read research papers 1) abstract-intro-related work-conclusions what is the problem why is it important why past solutions do not work what is the core idea what is success 2) core part-analysis basic idea what matters any gaps? 3) follow a few citations and repeat goal: by the end of the semester understand these papers fully Stratos Idreos 10/49

11 we want you to have fun! data systems is an exciting field! tell us how you are keeping up tell us what you need to better follow the class tell us your suggestions about how to improve the class Stratos Idreos 11/49

12 photo of Anand here the evolution of data-driven applications Anand Rajaraman (3) use social data (social networks) use own data (1) (recommendations) (2) use public data (search) (4) all of the above (all of the above) (5) training data (machine learning) Stratos Idreos 12/49

13 food for (big data-driven) thought Anand Rajaraman amazon google Cyborg the cyborg knows & manages all your models linkedin bank X Stratos Idreos 13/49

14 food for (big data-driven) thought the biggest transportations companies have no cars the biggest data companies have no data the biggest hotel companies have no hotels more about this and other thoughts in our first brainstorming session (TBA) Stratos Idreos 14/49

15 logical design physical design system design Stratos Idreos 15/49

16 essential steps in using a database system experts/system admins clean schema load tune query user/apps Stratos Idreos 16/49

17 relational model+sql database professors (id,name, ) key table/relation courses (id,name, profid, ) column/attribute students (id,name, ) create table for professors: create table professors (id:integer, name: char(40), telephone: char(10), ) insert into professors ( , john smith, ) give me the names of all students: select name from students where GPA>3.0 Stratos Idreos 17/49

18 employee (id:int, name:varchar(50), office:char(5), telephone:char(10), city:varchar(30), salary:int) data schema (1, name1, office1, tel1, city1, salary1) (2, name2, office2, tel2, city2, salary2) (3, name3, office3, tel3, city3, salary3) (4, name4, office4, tel4, city4, salary4) (5, name5, office5, tel5, city5, salary5) (6, name6, office6, tel6, city6, salary6) (7, name7, office7, tel7, city7, salary7) (8, name8, office8, tel8, city8, salary8) (9, name9, office9, NULL, city9, salary9) SQL:insert into employee (1, name1, office1, tel1, city1, salary1) cardinality=9 value does not exist Stratos Idreos 18/49

19 relational model+sql database professor (id,name, ) enrolled (studentid, courseid, ) course (id,name, profid, ) foreign key student (id,name, ) give me all students enrolled in cs165 select student.name from student, enrolled, course where course.name= cs165 and enrolled.courseid=course.id and student.id=enrolled.studentid join Stratos Idreos 19/49

20 enrolled (studentid,courseid, ) student (id,name, ) how do we join Stratos Idreos 20/49

21 normalization say schema about university db contains one table AllData(student ID,student name,student address, course name, grade, professor name, professor ID, professor telephone, ) good duplicates - tons of data - updates - but no joins Stratos Idreos 21/49

22 star schema dimension table 1 (id1, ) fact table (id1,id2, ) dimension table 2 (id2, ) Stratos Idreos 22/49

23 snowflake schema Stratos Idreos 23/49

24 Alex Liu, class /265 project adaptive denormalization 1st prize in ACM SIGMOD undergrad research competition Special Interest Group on Management of Data Stratos Idreos 24/49

25 NORMALIZED DATA DENORMALIZED DATA only fast scans but expensive to create, storage & updates good for updates, storage but we need joins Stratos Idreos 25/49

26 adaptive denormalization continuously physically reorganize data based on incoming query patterns (joins) denormalized fragments queries only need to fast scan normalized data possible denormalized space Stratos Idreos 26/49

27 constraints create table employee (id:integer, name:varchar(50) not null, must have a value office:char(5), at most 5 chars telephone:char(10), city:varchar(30), salary:integer, primary key (id) must be unique check (salary<100000)) must not become rich when and how do we enforce constraints Stratos Idreos 27/49

28 more SQL examples aggregations select max(gpa),avg(gpa),min(gpa) from students math select R.a - R.b + R.c from R nested select * from R where R.a IN (select b from S where C<10) set ops select * from R where a =10 UNION select * from B where b =20 Stratos Idreos 28/49

29 select avg(gpa), class, major from students where GPA>3.0 and class>1990 group by class, major order by class Stratos Idreos 29/49

30 base table Employee (id:int, name:varchar(50), office:char(5), telephone:char(10), city:varchar(30), salary:int) view to be used by managers in Berlin Employee-Berlin-Manager select * from employee where city= berlin how should we store views view to be used by all employees in Berlin Employee-Berlin-All select id,name,city,office from employee where city= berlin Stratos Idreos 30/49

31 why are models great? Stratos Idreos 31/49

32 other models? Stratos Idreos 32/49

33 it is summer now you know all about data systems you are building an augmented reality startup using Google Glass people wearing Google Glass can tag places/objects - voice/image recognition works fine tagging means assigning values, comments, etc to an object you can then query this data - again assume voice recognition works fine and a black box translates natural language to SQL how does the schema of your app look like? (tables, attributes, keys, relationships) (assume a limited working environment/features, say walking around Harvard square/yard) describe 2 interesting queries in SQL Stratos Idreos 33/49

34 a possible example q1: get all places where jenny said awesome q2: get all users that like what I like and are close by comment (id,user_id,oject_id,text, ) likes_comment (user_id,comment_id) object (id,name,location,telephone,date,url,color,taste, many more) user (id,name,location,device, ) likes_object (user_id,oject_id,) trust (user_id,user_id) select user.name, user.location select object.location from user, likes_object as L1, likes_object as from L2 object, user where L1.user_id=my_id and L1.object_id=L2.object_id where user.name and L2.user_id = jenny!=my_id and and user.id=l2.user_id and close(user.location,mylocation)=true comment.user_id=user.id and comment.text LIKE %awesome% Stratos Idreos 34/49

35 how do we store the object table? what if we want to add another kind of object? object (id,name,location,telephone,date,url,color,taste, many more) open research and business problem Stratos Idreos 35/49

36 design logical design physical design system design Stratos Idreos 36/49

37 declarative interface ask what you want so do db systems just work? db system Stratos Idreos 37/49

38 declarative interface ask what you want indexes/views/tuning knobs DBA but db cracking, adaptive* ideas db system Stratos Idreos 38/49

39 essential steps in using a database system experts/system admins clean schema load tune query user/apps Stratos Idreos 39/49

40 design logical design physical design system design next up: db architectures 101 Stratos Idreos 40/49

41 applications sql algorithms/operators database kernel design/implement numerous possible algorithms + data representations choose the best data source, algorithms and path for each query data data data Stratos Idreos 41/49

42 select min(a) from R where B<10 and C<80 algorithms/operators database kernel data data data parser optimizer execution storage Stratos Idreos 42/49

43 applications sql parser optimizer in/out admission execution storage database kernel Stratos Idreos 43/49

44 applications sql client programs thread 1 thread 2 thread 3 thread 4 thread 5 db program thread pool database kernel Stratos Idreos 44/49

45 applications sql parser in/out database kernel cpu optimizer thread pool memory execution transactions disk storage buffer pool is it good to have modules Stratos Idreos 45/49

46 Notes to remember models help create the right abstractions models help create >>1 applications over the same data we first need to clean, structure and load data data systems consist of software components Stratos Idreos 46/49

47 reading textbook: chapters 1, 3 (-3.5), 5 (-5.8,-5.9) intro + relational model + SQL browse the Fourth Paradigm Stratos Idreos 47/49

48 readings for next 3 classes Architecture of a Database System (Sections 1,2,3,4) by J. Hellerstein, M. Stonebraker and J. Hamilton The Design and Implementation of Modern Column-store Database Systems by D. Abadi, P. Boncz, S. Harizopoulos, S. Idreos, S. Madden Stratos Idreos 48/49

49 class 3 Models & Intro to DB Architectures DATA SYSTEMS prof. Stratos Idreos

Models & Intro to DB Architectures

Models & Intro to DB Architectures class 3 Models & Intro to DB Architectures prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ welcome brave cs165 students! Stratos Idreos 2 /55 NO LAPTOP/PHONE POLICY class is based on

More information

SQL & intro to db architectures

SQL & intro to db architectures class 3 SQL & intro to db architectures prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ welcome brave cs165 students! 35+62 Stratos Idreos 2 /55 guest lecture Laura Haas Data Systems

More information

data systems 101 prof. Stratos Idreos class 2

data systems 101 prof. Stratos Idreos class 2 class 2 data systems 101 prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS265/ big data V s (it is not about size only) volume velocity variety veracity actually none of that is really new

More information

column-stores basics

column-stores basics class 3 column-stores basics prof. HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS265/ project description is now online First background info will be given this Friday and detailed lecture on Feb 21 Basic Readings

More information

basic db architectures & layouts

basic db architectures & layouts class 4 basic db architectures & layouts prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ videos for sections 3 & 4 are online check back every week (1-2 sections weekly) there is a schedule

More information

column-stores basics

column-stores basics class 3 column-stores basics prof. HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS265/ Goetz Graefe Google Research guest lecture Justin Levandoski Microsoft Research projects option 1: systems project (now

More information

from bits to systems

from bits to systems class 2 from bits to systems prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ today logistics, goals, etc big data & systems (cont d) designing a data system algorithm: what can go wrong

More information

data systems 101 prof. Stratos Idreos class 2

data systems 101 prof. Stratos Idreos class 2 class 2 data systems 101 prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS265/ 2 classes per week - OH/Labs every day 1 presentation/discussion lead - 2 reviews each week research (or systems)

More information

HOW INDEX TO STORE DATA DATA

HOW INDEX TO STORE DATA DATA Stratos Idreos HOW INDEX DATA TO STORE DATA ALGORITHMS data structure decisions define the algorithms that access data INDEX DATA ALGORITHMS unordered [7,4,2,6,1,3,9,10,5,8] INDEX DATA ALGORITHMS unordered

More information

complex plans and hybrid layouts

complex plans and hybrid layouts class 7 complex plans and hybrid layouts prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ essential column-stores features virtual ids late tuple reconstruction (if ever) vectorized execution

More information

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

Introduction to Data Management. Lecture #1 (Course Trailer ) Introduction to Data Management Lecture #1 (Course Trailer ) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today s Topics v Welcome to one

More information

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

Introduction to Data Management. Lecture #1 (Course Trailer ) Instructor: Chen Li Introduction to Data Management Lecture #1 (Course Trailer ) Instructor: Chen Li 1 Today s Topics v Welcome to one of my biggest classes ever! v Read (and live by) the course wiki page: http://www.ics.uci.edu/~cs122a/

More information

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

Data! CS 133: Databases. Goals for Today. So, what is a database? What is a database anyway? From the textbook: CS 133: Databases Fall 2018 Lec 01 09/04 Introduction & Relational Model Data! Need systems to Data is everywhere Banking, airline reservations manage the data Social media, clicking anything on the internet

More information

class 17 updates prof. Stratos Idreos

class 17 updates prof. Stratos Idreos class 17 updates prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ early/late tuple reconstruction, tuple-at-a-time, vectorized or bulk processing, intermediates format, pushing selects

More information

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

CS564: Database Management Systems. Lecture 1: Course Overview. Acks: Chris Ré 1 CS564: Database Management Systems Lecture 1: Course Overview Acks: Chris Ré 1 2 Big science is data driven. 3 Increasingly many companies see themselves as data driven. 4 Even more traditional companies

More information

class 13 scans vs indexes prof. Stratos Idreos

class 13 scans vs indexes prof. Stratos Idreos class 13 scans vs indexes prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ b-tree - dynamic tree - always balanced 35,50 35, 12,20 50, 1,2,3 12,15,17 20, Stratos Idreos 2 /24 select from

More information

class 11 b-trees prof. Stratos Idreos

class 11 b-trees prof. Stratos Idreos class 11 b-trees prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ Midway check-in: Two design docs tmr (Canvas) & tests on Sunday Next weekend: Lab marathon for midway check-in & tests

More information

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

Introduction to Data Management. Lecture #1 (Course Trailer ) Introduction to Data Management Lecture #1 (Course Trailer ) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today s Topics! Welcome to my biggest

More information

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

Introduction to Data Management. Lecture #1 (The Course Trailer ) Introduction to Data Management Lecture #1 (The Course Trailer ) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today s Topics v Welcome to

More information

Overview of Data Exploration Techniques. Stratos Idreos, Olga Papaemmanouil, Surajit Chaudhuri

Overview of Data Exploration Techniques. Stratos Idreos, Olga Papaemmanouil, Surajit Chaudhuri Overview of Data Exploration Techniques Stratos Idreos, Olga Papaemmanouil, Surajit Chaudhuri data exploration not always sure what we are looking for (until we find it) data has always been big volume

More information

Modern Database Systems CS-E4610

Modern Database Systems CS-E4610 Modern Database Systems CS-E4610 Aristides Gionis Michael Mathioudakis Spring 2017 what is a database? a collection of data what is a database management system?... a.k.a. database system software to store,

More information

CAS CS 460/660 Introduction to Database Systems. Fall

CAS CS 460/660 Introduction to Database Systems. Fall CAS CS 460/660 Introduction to Database Systems Fall 2017 1.1 About the course Administrivia Instructor: George Kollios, gkollios@cs.bu.edu MCS 283, Mon 2:30-4:00 PM and Tue 1:00-2:30 PM Teaching Fellows:

More information

Goals for Today. CS 133: Databases. Relational Model. Multi-Relation Queries. Reason about the conceptual evaluation of an SQL query

Goals for Today. CS 133: Databases. Relational Model. Multi-Relation Queries. Reason about the conceptual evaluation of an SQL query Goals for Today CS 133: Databases Fall 2018 Lec 02 09/06 Relational Model & Memory and Buffer Manager Prof. Beth Trushkowsky Reason about the conceptual evaluation of an SQL query Understand the storage

More information

CS425 Midterm Exam Summer C 2012

CS425 Midterm Exam Summer C 2012 Q1) List five responsibilities of a database-management system. Q2) Fill in the terms in the right hand side of the table that match the description from the list below: Instance SQL Integrity constraints

More information

class 8 b-trees prof. Stratos Idreos

class 8 b-trees prof. Stratos Idreos class 8 b-trees prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ I spend a lot of time debugging am I doing something wrong? maybe but probably not 1. learn to use gdb 2. after spending

More information

Chapter 1: Introduction

Chapter 1: Introduction Chapter 1: Introduction Chapter 2: Intro. To the Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Database Management System (DBMS) DBMS is Collection of

More information

Modern Database Systems Lecture 1

Modern Database Systems Lecture 1 Modern Database Systems Lecture 1 Aristides Gionis Michael Mathioudakis T.A.: Orestis Kostakis Spring 2016 logistics assignment will be up by Monday (you will receive email) due Feb 12 th if you re not

More information

Data Modeling and Databases Ch 10: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich

Data Modeling and Databases Ch 10: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Data Modeling and Databases Ch 10: Query Processing - Algorithms Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Transactions (Locking, Logging) Metadata Mgmt (Schema, Stats) Application

More information

SQL: Part III. Announcements. Constraints. CPS 216 Advanced Database Systems

SQL: Part III. Announcements. Constraints. CPS 216 Advanced Database Systems SQL: Part III CPS 216 Advanced Database Systems Announcements 2 Reminder: Homework #1 due in 12 days Reminder: reading assignment posted on Web Reminder: recitation session this Friday (January 31) on

More information

Data Modeling and Databases Ch 9: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich

Data Modeling and Databases Ch 9: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Data Modeling and Databases Ch 9: Query Processing - Algorithms Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Transactions (Locking, Logging) Metadata Mgmt (Schema, Stats) Application

More information

SQL: Part II. Announcements (September 18) Incomplete information. CPS 116 Introduction to Database Systems. Homework #1 due today (11:59pm)

SQL: Part II. Announcements (September 18) Incomplete information. CPS 116 Introduction to Database Systems. Homework #1 due today (11:59pm) SQL: Part II CPS 116 Introduction to Database Systems Announcements (September 18) 2 Homework #1 due today (11:59pm) Submit in class, slide underneath my office door Sample solution available Thursday

More information

systems & research project

systems & research project class 4 systems & research project prof. HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS265/ index index knows order about the data data filtering data: point/range queries index data A B C sorted A B C initial

More information

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

CMPT 354: Database System I. Lecture 1. Course Introduction CMPT 354: Database System I Lecture 1. Course Introduction 1 Outline Motivation for studying this course Course admin and set up Overview of course topics 2 Trend 1: Data grows exponentially 1 ZB = 1,

More information

Overview. CS165: Project Document. The goal of the project is to design and build a main memory optimized column store.

Overview. CS165: Project Document. The goal of the project is to design and build a main memory optimized column store. Overview The goal of the project is to design and build a main memory optimized column store. By the end of the project you will have designed, implemented, and evaluated several key elements of a modern

More information

Database Technology Introduction. Heiko Paulheim

Database Technology Introduction. Heiko Paulheim Database Technology Introduction Outline The Need for Databases Data Models Relational Databases Database Design Storage Manager Query Processing Transaction Manager Introduction to the Relational Model

More information

CMPT 354: Database System I. Lecture 3. SQL Basics

CMPT 354: Database System I. Lecture 3. SQL Basics CMPT 354: Database System I Lecture 3. SQL Basics 1 Announcements! About Piazza 97 enrolled (as of today) Posts are anonymous to classmates You should have started doing A1 Please come to office hours

More information

Evolution of Database Systems

Evolution of Database Systems Evolution of Database Systems Krzysztof Dembczyński Intelligent Decision Support Systems Laboratory (IDSS) Poznań University of Technology, Poland Intelligent Decision Support Systems Master studies, second

More information

The Relational Model Constraints and SQL DDL

The Relational Model Constraints and SQL DDL The Relational Model Constraints and SQL DDL Week 2-3 Weeks 2-3 MIE253-Consens 1 Schedule Week Date Lecture Topic 1 Jan 9 Introduction to Data Management 2 Jan 16 The Relational Model 3 Jan. 23 Constraints

More information

Announcements (September 18) SQL: Part II. Solution 1. Incomplete information. Solution 3? Solution 2. Homework #1 due today (11:59pm)

Announcements (September 18) SQL: Part II. Solution 1. Incomplete information. Solution 3? Solution 2. Homework #1 due today (11:59pm) Announcements (September 18) 2 SQL: Part II Homework #1 due today (11:59pm) Submit in class, slide underneath my office door Sample solution available Thursday Homework #2 assigned today CPS 116 Introduction

More information

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

Introduction to Data Management. Lecture #4 (E-R à Relational Design) Introduction to Data Management Lecture #4 (E-R à Relational Design) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Reminders:

More information

Who we are: Database Research - Provenance, Integration, and more hot stuff. Boris Glavic. Department of Computer Science

Who we are: Database Research - Provenance, Integration, and more hot stuff. Boris Glavic. Department of Computer Science Who we are: Database Research - Provenance, Integration, and more hot stuff Boris Glavic Department of Computer Science September 24, 2013 Hi, I am Boris Glavic, Assistant Professor Hi, I am Boris Glavic,

More information

CSCI1270 Introduction to Database Systems

CSCI1270 Introduction to Database Systems CSCI1270 Introduction to Database Systems with thanks to Prof. George Kollios, Boston University Prof. Mitch Cherniack, Brandeis University Prof. Avi Silberschatz, Yale University 1.1 What is a Database

More information

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

Big Data Processing Technologies. Chentao Wu Associate Professor Dept. of Computer Science and Engineering Big Data Processing Technologies Chentao Wu Associate Professor Dept. of Computer Science and Engineering wuct@cs.sjtu.edu.cn Schedule (1) Storage system part (first eight weeks) lec1: Introduction on

More information

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

Overview of the Class and Introduction to DB schemas and queries. Lois Delcambre Overview of the Class and Introduction to DB schemas and queries Lois Delcambre 1 CS 386/586 Introduction to Databases Instructor: Lois Delcambre lmd@cs.pdx.edu 503 725-2405 TA: TBA Office Hours: Immediately

More information

Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 8: Database effektivitet. 31. marts Forelæser: Rasmus Pagh

Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 8: Database effektivitet. 31. marts Forelæser: Rasmus Pagh Databasesystemer, forår 2005 IT Universitetet i København Forelæsning 8: Database effektivitet. 31. marts 2005 Forelæser: Rasmus Pagh Today s lecture Database efficiency Indexing Schema tuning 1 Database

More information

CSC 453 Database Technologies. Tanu Malik DePaul University

CSC 453 Database Technologies. Tanu Malik DePaul University CSC 453 Database Technologies Tanu Malik DePaul University A Data Model A notation for describing data or information. Consists of mostly 3 parts: Structure of the data Data structures and relationships

More information

EECS 647: Introduction to Database Systems

EECS 647: Introduction to Database Systems EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2009 Summary of SQL Features Query SELECT-FROM-WHERE statements Set and bag operations Table expressions, subqueries Aggregation

More information

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

Introduction to Data Management. Lecture #2 Intro II & Data Models I Introduction to Data Management Lecture #2 Intro II & Data Models I Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today s Topics v The biggest

More information

Standard stuff. Class webpage: cs.rhodes.edu/db Textbook: get it somewhere; used is fine. Prerequisite: CS 241 Coursework:

Standard stuff. Class webpage: cs.rhodes.edu/db Textbook: get it somewhere; used is fine. Prerequisite: CS 241 Coursework: Databases Standard stuff Class webpage: cs.rhodes.edu/db Textbook: get it somewhere; used is fine Stay up with reading! Prerequisite: CS 241 Coursework: Homework, group project, midterm, final Be prepared

More information

class 10 b-trees 2.0 prof. Stratos Idreos

class 10 b-trees 2.0 prof. Stratos Idreos class 10 b-trees 2.0 prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ CS Colloquium HV Jagadish Prof University of Michigan 10/6 Stratos Idreos /29 2 CS Colloquium Magdalena Balazinska

More information

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data. Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting

More information

Relational Algebra for sets Introduction to relational algebra for bags

Relational Algebra for sets Introduction to relational algebra for bags Relational Algebra for sets Introduction to relational algebra for bags Thursday, September 27, 2012 1 1 Terminology for Relational Databases Slide repeated from Lecture 1... Account Number Owner Balance

More information

Module 4. Implementation of XQuery. Part 0: Background on relational query processing

Module 4. Implementation of XQuery. Part 0: Background on relational query processing Module 4 Implementation of XQuery Part 0: Background on relational query processing The Data Management Universe Lecture Part I Lecture Part 2 2 What does a Database System do? Input: SQL statement Output:

More information

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 8 - Data Warehousing and Column Stores

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 8 - Data Warehousing and Column Stores CSE 544 Principles of Database Management Systems Alvin Cheung Fall 2015 Lecture 8 - Data Warehousing and Column Stores Announcements Shumo office hours change See website for details HW2 due next Thurs

More information

CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model

CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model Modifies from: Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Textbook: Chapter 2 2.2 Example of a Relation

More information

relational Key-value Graph Object Document

relational Key-value Graph Object Document NoSQL Databases Earlier We have spent most of our time with the relational DB model so far. There are other models: Key-value: a hash table Graph: stores graph-like structures efficiently Object: good

More information

LAB 2 Notes. Conceptual Design ER. Logical DB Design (relational) Schema Refinement. Physical DD

LAB 2 Notes. Conceptual Design ER. Logical DB Design (relational) Schema Refinement. Physical DD LAB 2 Notes For students that were not present in the first lab TA Web page updated : http://www.cs.ucr.edu/~cs166/ Mailing list Signup: http://www.cs.ucr.edu/mailman/listinfo/cs166 The general idea of

More information

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept] Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept] 1. What is DBMS? A Database Management System (DBMS) is a program that controls creation, maintenance and use

More information

CS 245: Database System Principles

CS 245: Database System Principles CS 245: Database System Principles Notes 01: Introduction Peter Bailis CS 245 Notes 1 1 This course pioneered by Hector Garcia-Molina All credit due to Hector All mistakes due to Peter CS 245 Notes 1 2

More information

Indexing. Week 14, Spring Edited by M. Naci Akkøk, , Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel

Indexing. Week 14, Spring Edited by M. Naci Akkøk, , Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel Indexing Week 14, Spring 2005 Edited by M. Naci Akkøk, 5.3.2004, 3.3.2005 Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel Overview Conventional indexes B-trees Hashing schemes

More information

DATABASE MANAGEMENT SYSTEMS

DATABASE MANAGEMENT SYSTEMS www..com Code No: N0321/R07 Set No. 1 1. a) What is a Superkey? With an example, describe the difference between a candidate key and the primary key for a given relation? b) With an example, briefly describe

More information

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

Introduction to Data Management. Lecture #2 (Big Picture, Cont.) Introduction to Data Management Lecture #2 (Big Picture, Cont.) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Still hanging

More information

Lecture 16. The Relational Model

Lecture 16. The Relational Model Lecture 16 The Relational Model Lecture 16 Today s Lecture 1. The Relational Model & Relational Algebra 2. Relational Algebra Pt. II [Optional: may skip] 2 Lecture 16 > Section 1 1. The Relational Model

More information

class 17 updates prof. Stratos Idreos

class 17 updates prof. Stratos Idreos class 17 updates prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ UPDATE table_name SET column1=value1,column2=value2,... WHERE some_column=some_value INSERT INTO table_name VALUES (value1,value2,value3,...)

More information

CMPSCI 645 Database Design & Implementation

CMPSCI 645 Database Design & Implementation Welcome to CMPSCI 645 Database Design & Implementation Instructor: Gerome Miklau Overview of Databases Gerome Miklau CMPSCI 645 Database Design & Implementation UMass Amherst Jan 19, 2010 Some slide content

More information

Lecture 3: SQL Part II

Lecture 3: SQL Part II Lecture 3 Lecture 3: SQL Part II Copyright: These slides are the modified version of the slides used in CS145 Introduction to Databases course at Stanford by Dr. Peter Bailis Lecture 3 Today s Lecture

More information

EECS 482 Introduction to Operating Systems

EECS 482 Introduction to Operating Systems EECS 482 Introduction to Operating Systems Winter 2018 Baris Kasikci barisk@umich.edu (Thanks, Harsha Madhyastha for the slides!) 1 About Me Prof. Kasikci (Prof. K.), Prof. Baris (Prof. Barish) Assistant

More information

CSE 344 JANUARY 3 RD - INTRODUCTION

CSE 344 JANUARY 3 RD - INTRODUCTION CSE 344 JANUARY 3 RD - INTRODUCTION COURSE FORMAT Lectures Location: SIG 134 Please attend Sections: Content: exercises, tutorials, questions, new materials (occasionally) Locations: see web Please attend

More information

Announcements (September 21) SQL: Part III. Triggers. Active data. Trigger options. Trigger example

Announcements (September 21) SQL: Part III. Triggers. Active data. Trigger options. Trigger example Announcements (September 21) 2 SQL: Part III CPS 116 Introduction to Database Systems Homework #2 due next Thursday Homework #1 sample solution available today Hardcopies only Check the handout box outside

More information

Introduction to Data Management. Lecture #2 (Big Picture, Cont.) Instructor: Chen Li

Introduction to Data Management. Lecture #2 (Big Picture, Cont.) Instructor: Chen Li Introduction to Data Management Lecture #2 (Big Picture, Cont.) Instructor: Chen Li 1 Announcements v We added 10 more seats to the class for students on the waiting list v Deadline to drop the class:

More information

NJIT Department of Computer Science PhD Qualifying Exam on CS 631: DATA MANAGEMENT SYSTEMS DESIGN. Summer 2012

NJIT Department of Computer Science PhD Qualifying Exam on CS 631: DATA MANAGEMENT SYSTEMS DESIGN. Summer 2012 JIT Department of Computer Science PhD Qualifying Exam on CS 63: DATA MAAGEMET SYSTEMS DESIG Summer 202 o book or other document is allowed. Duration of the exam: 2.5 hours. The total number of points

More information

Database Design. Goal: specification of database schema Methodology:

Database Design. Goal: specification of database schema Methodology: Database Design Goal: specification of database schema Methodology: Use E-R model to get a high-level graphical view of essential components of the model and how they are related Convert E-R diagram to

More information

Column-Stores vs. Row-Stores: How Different Are They Really?

Column-Stores vs. Row-Stores: How Different Are They Really? Column-Stores vs. Row-Stores: How Different Are They Really? Daniel J. Abadi, Samuel Madden and Nabil Hachem SIGMOD 2008 Presented by: Souvik Pal Subhro Bhattacharyya Department of Computer Science Indian

More information

CMPT 354: Database System I. Lecture 2. Relational Model

CMPT 354: Database System I. Lecture 2. Relational Model CMPT 354: Database System I Lecture 2. Relational Model 1 Outline An overview of data models Basics of the Relational Model Define a relational schema in SQL 2 Outline An overview of data models Basics

More information

Query Processing & Optimization. CS 377: Database Systems

Query Processing & Optimization. CS 377: Database Systems Query Processing & Optimization CS 377: Database Systems Recap: File Organization & Indexing Physical level support for data retrieval File organization: ordered or sequential file to find items using

More information

CS639: Data Management for Data Science. Lecture 1: Intro to Data Science and Course Overview. Theodoros Rekatsinas

CS639: Data Management for Data Science. Lecture 1: Intro to Data Science and Course Overview. Theodoros Rekatsinas CS639: Data Management for Data Science Lecture 1: Intro to Data Science and Course Overview Theodoros Rekatsinas 1 2 Big science is data driven. 3 Increasingly many companies see themselves as data driven.

More information

CMPT 354: Database System I. Lecture 11. Transaction Management

CMPT 354: Database System I. Lecture 11. Transaction Management CMPT 354: Database System I Lecture 11. Transaction Management 1 Why this lecture DB application developer What if crash occurs, power goes out, etc? Single user à Multiple users 2 Outline Transaction

More information

CSCB20. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

CSCB20. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017 CSCB20 Introduction to Database and Web Application Programming Anna Bretscher Winter 2017 Welcome to CSCB20 Course Description: A practical introduction to databases and Web app development. Databases:

More information

class 9 fast scans 1.0 prof. Stratos Idreos

class 9 fast scans 1.0 prof. Stratos Idreos class 9 fast scans 1.0 prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ 1 pass to merge into 8 sorted pages (2N pages) 1 pass to merge into 4 sorted pages (2N pages) 1 pass to merge into

More information

LAB 3 Notes. Codd proposed the relational model in 70 Main advantage of Relational Model : Simple representation (relationstables(row,

LAB 3 Notes. Codd proposed the relational model in 70 Main advantage of Relational Model : Simple representation (relationstables(row, LAB 3 Notes The Relational Model Chapter 3 In the previous lab we discussed the Conceptual Database Design Phase and the ER Diagram. Today we will mainly discuss how to convert an ER model into the Relational

More information

The Relational Model. Week 2

The Relational Model. Week 2 The Relational Model Week 2 1 Relations A relation is a more concrete construction, of something we have seen before, the ER diagram. name S.S.N students street city A relation is (just!) a table! We will

More information

CS145: Intro to Databases. Lecture 1: Course Overview

CS145: Intro to Databases. Lecture 1: Course Overview CS145: Intro to Databases Lecture 1: Course Overview 1 The world is increasingly driven by data This class teaches the basics of how to use & manage data. 2 Key Questions We Will Answer How can we collect

More information

Exam code: Exam name: Database Fundamentals. Version 16.0

Exam code: Exam name: Database Fundamentals. Version 16.0 98-364 Number: 98-364 Passing Score: 800 Time Limit: 120 min File Version: 16.0 Exam code: 98-364 Exam name: Database Fundamentals Version 16.0 98-364 QUESTION 1 You have a table that contains the following

More information

MIT Database Management Systems Lesson 01: Introduction

MIT Database Management Systems Lesson 01: Introduction MIT 22033 Database Management Systems Lesson 01: Introduction By S. Sabraz Nawaz Senior Lecturer in MIT, FMC, SEUSL Learning Outcomes At the end of the module the student will be able to: Describe the

More information

NoSQL database and its business applications

NoSQL database and its business applications COSC 657 Db. Management Systems Professor: RAMESH K. Student: BUER JIANG Research paper NoSQL database and its business applications The original purpose has been contemporary web-expand dbs. The movement

More information

Introduction and Overview

Introduction and Overview Introduction and Overview (Read Cow book Chapter 1) Instructor: Leonard McMillan mcmillan@cs.unc.edu Comp 521 Files and Databases Spring 2010 1 Course Administrivia Book Cow book New (to our Dept) More

More information

Introduction to SQL Part 1 By Michael Hahsler based on slides for CS145 Introduction to Databases (Stanford)

Introduction to SQL Part 1 By Michael Hahsler based on slides for CS145 Introduction to Databases (Stanford) Introduction to SQL Part 1 By Michael Hahsler based on slides for CS145 Introduction to Databases (Stanford) Lecture 2 Lecture Overview 1. SQL introduction & schema definitions 2. Basic single-table queries

More information

Score. 1 (10) 2 (10) 3 (8) 4 (13) 5 (9) Total (50)

Score. 1 (10) 2 (10) 3 (8) 4 (13) 5 (9) Total (50) Student number: Signature: UNIVERSITY OF VICTORIA Faculty of Engineering Department of Computer Science CSC 370 (Database Systems) Instructor: Daniel M. German Midterm 18 June 2003 Duration: 75 minutes

More information

Data about data is database Select correct option: True False Partially True None of the Above

Data about data is database Select correct option: True False Partially True None of the Above Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another

More information

Administriva. CS 133: Databases. General Themes. Goals for Today. Fall 2018 Lec 11 10/11 Query Evaluation Prof. Beth Trushkowsky

Administriva. CS 133: Databases. General Themes. Goals for Today. Fall 2018 Lec 11 10/11 Query Evaluation Prof. Beth Trushkowsky Administriva Lab 2 Final version due next Wednesday CS 133: Databases Fall 2018 Lec 11 10/11 Query Evaluation Prof. Beth Trushkowsky Problem sets PSet 5 due today No PSet out this week optional practice

More information

class 6 more about column-store plans and compression prof. Stratos Idreos

class 6 more about column-store plans and compression prof. Stratos Idreos class 6 more about column-store plans and compression prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ query compilation an ancient yet new topic/research challenge query->sql->interpet

More information

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall The Relational Model Chapter 3 Comp 521 Files and Databases Fall 2012 1 Why Study the Relational Model? Most widely used model by industry. IBM, Informix, Microsoft, Oracle, Sybase, etc. It is simple,

More information

Midterm 1: CS186, Spring 2012

Midterm 1: CS186, Spring 2012 Midterm 1: CS186, Spring 2012 Prof. J. Hellerstein You should receive a double- sided answer sheet and a 7- page exam. Mark your name and login on both sides of the answer sheet. For each question, place

More information

MongoDB Schema Design

MongoDB Schema Design MongoDB Schema Design Demystifying document structures in MongoDB Jon Tobin @jontobs MongoDB Overview NoSQL Document Oriented DB Dynamic Schema HA/Sharding Built In Simple async replication setup Automated

More information

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

Course Web Site. 445 Staff and Mailing Lists. Textbook. Databases and DBMS s. Outline. CMPSCI445: Information Systems. Yanlei Diao and Haopeng Zhang Course Web Site CMPSCI445: Information Systems Yanlei Diao and Haopeng Zhang University of Massachusetts Amherst http://avid.cs.umass.edu/courses/445/s2015/ or http://www.cs.umass.edu/~yanlei à Teaching

More information

University of California, Berkeley. (2 points for each row; 1 point given if part of the change in the row was correct)

University of California, Berkeley. (2 points for each row; 1 point given if part of the change in the row was correct) University of California, Berkeley CS 186 Intro to Database Systems, Fall 2012, Prof. Michael J. Franklin MIDTERM II - Questions This is a closed book examination but you are allowed one 8.5 x 11 sheet

More information

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

Introduction to Data Management. Lecture #4 (E-R Relational Translation) Introduction to Data Management Lecture #4 (E-R Relational Translation) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Today

More information

CSC 261/461 Database Systems Lecture 19

CSC 261/461 Database Systems Lecture 19 CSC 261/461 Database Systems Lecture 19 Fall 2017 Announcements CIRC: CIRC is down!!! MongoDB and Spark (mini) projects are at stake. L Project 1 Milestone 4 is out Due date: Last date of class We will

More information

CS W Introduction to Databases Spring Computer Science Department Columbia University

CS W Introduction to Databases Spring Computer Science Department Columbia University CS W4111.001 Introduction to Databases Spring 2018 Computer Science Department Columbia University 1 in SQL 1. Key constraints (PRIMARY KEY and UNIQUE) 2. Referential integrity constraints (FOREIGN KEY

More information

class 20 updates 2.0 prof. Stratos Idreos

class 20 updates 2.0 prof. Stratos Idreos class 20 updates 2.0 prof. Stratos Idreos HTTP://DASLAB.SEAS.HARVARD.EDU/CLASSES/CS165/ UPDATE table_name SET column1=value1,column2=value2,... WHERE some_column=some_value INSERT INTO table_name VALUES

More information