Top Banner
CS848: Topics in Databases: Foundations of Query Optimization Review SQL the programming language Applications in information systems SQL technology issues SQL language issues
24

CS848: Topics in Databases: Foundations of Query Optimization Review SQL the programming language Applications in information systems SQL technology.

Dec 17, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Review

SQL the programming language

Applications in information systems

SQL technology issues

SQL language issues

Page 2: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Language for Information Retrieval

DatabaseL?User

L must be approximated by L'

Person Set of Books

Set of array of char

precision/recall/relevance(L')

Page 3: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Language for Programming

DatabaseL?User

L can be perfect

precision/recall/relevance not relevant

Compiler Symbol Table

Page 4: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Review

SQL the programming language

Applications in information systems

SQL technology issues

SQL language issues

Page 5: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Information System (early days)

SS2

SS3

SS1

File System DML

Database(File System DDL)

Page 6: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Introduction of SQL: Ted Codd, …

SS2

SS3

SS1

SQL DML

Database(SQL DDL)

1. Physical data independence

2. Quantification

3. Transactions and serializability

Page 7: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Introduction of SQL Technology

SS2

SS3

SS1

Database(SQL DDL)

SQL DML

1. Physical data independence

2. Quantification

3. Transactions and serializability File System DML

Database(File System DDL)

DBMS

Page 8: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Cost Savings

SQLC

(code size)

SQLC

(code size)

(desirable)

Page 9: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Evolution of SQL

Richer DDL

E.g.: constraints, views, inheritance,

users, permissions

Richer DML

E.g.: nulls, bags, aggregation, ordering,

view update, isolation levels

Page 10: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Evolution of Technology

SS2

SS3

SS1

Database(SQL DDL)

SQL DML

File System DML

Database(File System DDL)

DBMS

DBMS1

DBMS2

(information integration: exact answers)

Page 11: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Introduction of Main Memory Technology

SS2

SS3

SS1

Database(SQL DDL)

SQL DML + sync

Database(C library DDL)

DBMS

DBMS

Custom API

Embedded Software System

Page 12: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Database(SQL DDL)

Introduction of Compilation

SS2

SS3

SS1

SQL DML + sync

Database(C library DDL)

DBMS

DBMS

Custom API

Embedded Software System

(C library DML)

Page 13: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Final Evolution of Technology

SS2

SS3

SS1

Database(SQL DDL)

SQL DML

File System DML

Database(File System DDL)

DBMS

DBMS1

DBMS2

(information integration: exact answers)

Database(C type DDL)

C type DML

Page 14: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Cost Savings

SQLC

(code size)

SQLC

(code size)

(desirable)

Page 15: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Review

SQL the programming language

Applications in information systems

SQL technology issues

SQL language issues

Page 16: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Performance: Need for Compilation

SS2

SS3

SS1

Database(SQL DDL)

SQL DML

File System DML

Database(File System DDL)

DBMS

DBMS1

DBMS2

Database(C type DDL)

C type DML

Page 17: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Step 1: Use Current Technology

SS2

SS3

SS1

Database(SQL DDL)

SQL DML

File System DML

Database(File System DDL)

DBMS3

DBMS1

DBMS2

Page 18: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Step 2: Specify Control Program

SS2

SS3

SS1

Database(SQL DDL)

SQL DML

Database(C type DDL)

DBMS

DBMS3

C type DML

Page 19: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Result of Compilation

NewSS2

NewSS3

NewSS1

DBMS3

SQL DML

Database(C type DDL)

C type DML

Control Program

(a runtime reference architecture)

Page 20: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Technology Issues in Physical Design

Tuple identification

Field layout

Indexing: arrays, stacks, heaps, …†

†See, e.g., Knuth, volume 3.

Page 21: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Technology Issues in Query Optimization

Pointers and arrays

Pipelined query plans

Code and data inlining

Semantic query optimization

Timing requirements

Competition: What expert C programmers can do in coding to the runtime reference architecture!

Page 22: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Review

SQL the programming language

Applications in information systems

SQL technology issues

SQL language issues

Page 23: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Language Issues in Static Constraints

OWL!

Page 24: CS848: Topics in Databases: Foundations of Query Optimization Review  SQL the programming language  Applications in information systems  SQL technology.

CS848: Topics in Databases: Foundations of Query Optimization

Language Issues in Dynamic Constraints

CTL!