DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database...

71
Stratos Idreos

Transcript of DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database...

Page 1: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Stratos Idreos

Page 2: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA

INDEX——HOW——

TO STORE ——DATA——

Page 3: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA

INDEX

data structure decisions define the algorithms that access data

ALGORITHMS

Page 4: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA

INDEX

[7,4,2,6,1,3,9,10,5,8]

ALGORITHMSunordered

Page 5: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA

INDEX

[7,4,2,6,1,3,9,10,5,8]

ALGORITHMSunordered

Page 6: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA

INDEX

[7,4,2,6,1,3,9,10,5,8]

ALGORITHMS[1,2,3,4,5,6,7,8,9,10]

unordered

ordered

Page 7: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA

INDEX

ALGORITHMS

Page 8: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA

INDEX

ALGORITHMS

DATA SYSTEMS

Page 9: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

DATA STRUCTURES

DEFINE PERFORMANCE

2018

spee

d COMPUTE

DATA MOVEMENT

Page 10: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

2018

spee

d COMPUTE

DATA MOVEMENT

register = this room

disk = Pluto memory = nearby city

Jim Gray, Turing Award 1998

caches = this city

Page 11: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Read Update

Memory

no perfect structure

amplification

Page 12: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Read Update

Memory

Mem

ory

Read

Upda

teno perfect structure

amplification

Page 13: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Read Update

Memory

Mem

ory

Read

Upda

te

differential approximate

pointtree

no perfect structure

amplification

Page 14: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Read Update

Memory

Mem

ory

Read

Upda

te

differential approximate

pointtree

no perfect structure

amplification

Array

Linked-List

Skip-List

Trie

Hash-Table

Sorted Array

B-tree

Page 15: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

How do I make my data system run x times as fast? (sql,nosql,bigdata, …)

Page 16: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

How do I make my data system run x times as fast?

How do I minimize my bill in the cloud?

(sql,nosql,bigdata, …)

Page 17: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

How do I make my data system run x times as fast?

How do I minimize my bill in the cloud?

(sql,nosql,bigdata, …)

How do I extend the lifetime of my hardware?

Page 18: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

How do I make my data system run x times as fast?

How do I minimize my bill in the cloud?

How to accelerate statistics computation for data science/ML?

(sql,nosql,bigdata, …)

How do I extend the lifetime of my hardware?

Page 19: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

How do I make my data system run x times as fast?

How do I minimize my bill in the cloud?

How do I train my neural network x times faster?

How to accelerate statistics computation for data science/ML?

(sql,nosql,bigdata, …)

How do I extend the lifetime of my hardware?

Page 20: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

NEW APPLICATIONS

Page 21: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

NEW APPLICATIONS

existing systems need to change too

Page 22: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

NEW APPLICATIONS

existing systems need to change too

WORKLOAD HARDWARE

ADAPT

Page 23: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

NEW APPLICATIONS

existing systems need to change too

WORKLOAD HARDWARE

ADAPT

IMPROVE WITHIN A BUDGET

WHAT WILL BREAK MY SYSTEM?

REASON

Page 24: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

more data

new applications

new h/w

continuous need

for newstorage solutions

Page 25: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

fundamental of storage learning outcome

software engineering data-driven startup researchdata structures, SQL, NoSQL, Big Data, Neural Networks, Statistics, Data Science

Page 26: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends
Page 27: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

interaction: in and out of class

There is no such thing as a

wrong question/answer!!!!

Page 28: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Recent Research Papers

review and slides should focus on

what is the problem why is it important

why is it hard why existing solutions do not work

what is the core intuition for the solution solution step by step

does the paper prove its claims exact setup of analysis/experiments are there any gaps in the logic/proof

possible next steps

* follow a few citations to gain more background

Each student: 2 reviews per week/1 presentation

Page 29: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Recent Research Papers

review and slides should focus on

what is the problem why is it important

why is it hard why existing solutions do not work

what is the core intuition for the solution solution step by step

does the paper prove its claims exact setup of analysis/experiments are there any gaps in the logic/proof

possible next steps

* follow a few citations to gain more background

Each student: 2 reviews per week/1 presentation

learn to judge constructively

learn to present

learn to prepare slides

Page 30: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

systems project research project

semester project: due in the end of semester + a midway check in (early March,10%)

Page 31: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

systems project

individual projectNoSQL, in c/c++

research project

semester project: due in the end of semester + a midway check in (early March,10%)

Page 32: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

systems project

individual projectNoSQL, in c/c++

research project

groups of threeNoSQL, Neural Networks

Periodic Table of Data Structures

only open to cs165 students (unless proven otherwise)

semester project: due in the end of semester + a midway check in (early March,10%)

Page 33: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

systems project

individual projectNoSQL, in c/c++

research project

groups of threeNoSQL, Neural Networks

Periodic Table of Data Structures

only open to cs165 students (unless proven otherwise)

semester project: due in the end of semester + a midway check in (early March,10%)

Page 34: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

ACM Special Interest Group In Data Management (SIGMOD)Undergrad Research Competition

first prize in 2016, 2017, 2018Adaptive Denormalization Evolving Trees Splaying LSM-Trees

Page 35: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

ACM Special Interest Group In Data Management (SIGMOD)Undergrad Research Competition

first prize in 2016, 2017, 2018Adaptive Denormalization Evolving Trees Splaying LSM-Trees

Design continuums at CIDR 2019, LSM/BTree hybrids in SIGMOD finals

Page 36: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

piazza forum

all announcements & discussions (link on class website - check out usage guidelines)

classes are recorded (links on class website)

NO LAPTOP/PHONE POLICYclass is based on participation!

Project: 40% Midway Check-in:10% Discussion: 20% Presentation: 15% Reviews: 15%

Page 37: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Check out: syllabus, preparation readings, project 0, systems project, online sections

http://daslab.seas.harvard.edu/classes/cs265/

Get familiar with the very basics of traditional database architectures:Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends in Databases, 2007

Get familiar with very basics of modern database architectures:The Design and Implementation of Modern Column-store Database Systems.  By D. Abadi, P. Boncz, S. Harizopoulos, S. Idreos, S. Madden. Foundations and Trends in Databases, 2013

Get familiar with the very basics of modern large scale systems:Massively Parallel Databases and MapReduce Systems. By Shivnath Babu and Herodotos Herodotou. Foundations and Trends in Databases, 2013

Page 38: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

subarna wilson wasay

Teaching Fellows:

Off class discussions are key! question on readings, ideas, help with code/analysis

Page 39: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

questions on logistics?

Page 40: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

BASICS of storageIntro to RESEACH topics

Discussion phase/presentation as of week 3

Next few classes:

ask/answer questions, keep notes/ideas

Page 41: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

registers

on chip cache

on board cache

memory

disk

CPU

memory wall

chea

per

fast

er

SRAM

DRAM

~1ns

~10ns

~100ns

cache miss: looking for something which is not in the cache

memory miss: looking for something which is not in memory

time

speed cpu

mem

Page 42: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

registers

on chip cache

on board cache

memory

disk

CPU

memory wall

chea

per

fast

er

SRAM

DRAM

~1ns

~10ns

~100ns

cache miss: looking for something which is not in the cache

memory miss: looking for something which is not in memory

time

speed cpu

mem

Page 43: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Jim Gray, IBM, Tandem, DEC, Microsoft ACM Turing award ACM SIGMOD Edgar F. Codd Innovations award

disk100Kx Pluto

2 years

memory100x New York1.5 hours

on board cache10x this building

10 min

on chip cache2x this room

1 min

registers my head~0

Page 44: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

need to only read x… but have to read all of page 1

page1 page2 page3

data value x

registers

on chip cache

on board cachememory

disk

CPU

data

mov

e

Page 45: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

5 10 6 4 12

(size=120 bytes)

2 8 9 7 6 7 11 3 9 6

Page 46: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

scan

5 10 6 4 12(size=120 bytes)

2 8 9 7 6 7 11 3 9 6

Page 47: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

scan

5 10 6 4 12(size=120 bytes)

2 8 9 7 6

4

7 11 3 9 6

Page 48: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

scan

40 bytes

5 10 6 4 12(size=120 bytes)

2 8 9 7 6

4

7 11 3 9 6

Page 49: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

scan scan

40 bytes

5 10 6 4 12(size=120 bytes) 2 8 9 7 6 4

7 11 3 9 6

Page 50: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

scan scan

40 bytes

5 10 6 4 12(size=120 bytes) 2 8 9 7 6 4 2

7 11 3 9 6

Page 51: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

scan scan

5 10 6 4 12(size=120 bytes) 2 8 9 7 6 4 2

7 11 3 9 6

80 bytes

Page 52: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 2

7 11 3 9 6

80 bytes

Page 53: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 27 11 3 9 6

scan

80 bytes

Page 54: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 27 11 3 9 6

scan

3

80 bytes

Page 55: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 27 11 3 9 6

scan

3

120 bytes

Page 56: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

5 10 6 4 12

(size=120 bytes)

2 8 9 7 6 7 11 3 9 6

an oracle gives us the positions

Page 57: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

oracle

5 10 6 4 12(size=120 bytes)

2 8 9 7 6 7 11 3 9 6

an oracle gives us the positions

Page 58: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

oracle

5 10 6 4 12(size=120 bytes)

2 8 9 7 6

4

7 11 3 9 6

an oracle gives us the positions

Page 59: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

oracle

40 bytes

5 10 6 4 12(size=120 bytes)

2 8 9 7 6

4

7 11 3 9 6

an oracle gives us the positions

Page 60: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

oracle oracle

40 bytes

5 10 6 4 12(size=120 bytes) 2 8 9 7 6 4

7 11 3 9 6

an oracle gives us the positions

Page 61: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

oracle oracle

40 bytes

5 10 6 4 12(size=120 bytes) 2 8 9 7 6 4 2

7 11 3 9 6

an oracle gives us the positions

Page 62: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

oracle oracle

5 10 6 4 12(size=120 bytes) 2 8 9 7 6 4 2

7 11 3 9 6

80 bytesan oracle gives us the positions

Page 63: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 2

7 11 3 9 6

80 bytesan oracle gives us the positions

Page 64: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 27 11 3 9 6

oracle

80 bytesan oracle gives us the positions

Page 65: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 27 11 3 9 6

oracle

3

80 bytesan oracle gives us the positions

Page 66: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 6

memory level N

memory level N-1

query x<5

page size: 5x8 bytes

(size=120 bytes) 2 8 9 7 6 4 27 11 3 9 6

oracle

3

120 bytesan oracle gives us the positions

Page 67: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

when does it make sense to have an oraclehow can we minimize the cost

…5 10 6 4 12 2 8 9 7 6 7 11 3 9 65 10 6 4 12 2 8 9 7 6 7 11 3 9 6

e.g., query x<5

Page 68: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

CPU DATA MOVEMENT

MEMORY REQUIREMENT

SPACE REQUIREMENT

(ENERGY)

ROBUSTNESS

Page 69: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

CPU DATA MOVEMENT

MEMORY REQUIREMENT

SPACE REQUIREMENT

(ENERGY)

SQL, NoSQL, Graph, Neural Nets, Statistics —> Data to Processing

ROBUSTNESS

Page 70: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

CPU DATA MOVEMENT

MEMORY REQUIREMENT

SPACE REQUIREMENT

(ENERGY)

SQL, NoSQL, Graph, Neural Nets, Statistics —> Data to Processing

TIME —— CLOUD COSTS

ROBUSTNESS

Page 71: DATA - Harvard SEASdaslab.seas.harvard.edu/classes/cs265/files/... · Architecture of a Database System. By J. Hellerstein, M. Stonebraker and J. Hamilton. Foundations and Trends

Stratos Idreos