CS848: Topics in Databases: Foundations of Query Optimization Review SQL the programming language Applications in information systems SQL technology issues SQL language issues
Dec 17, 2015
CS848: Topics in Databases: Foundations of Query Optimization
Review
SQL the programming language
Applications in information systems
SQL technology issues
SQL language issues
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')
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
CS848: Topics in Databases: Foundations of Query Optimization
Review
SQL the programming language
Applications in information systems
SQL technology issues
SQL language issues
CS848: Topics in Databases: Foundations of Query Optimization
Information System (early days)
SS2
SS3
SS1
File System DML
Database(File System DDL)
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
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
CS848: Topics in Databases: Foundations of Query Optimization
Cost Savings
SQLC
(code size)
SQLC
(code size)
(desirable)
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
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)
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
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)
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
CS848: Topics in Databases: Foundations of Query Optimization
Cost Savings
SQLC
(code size)
SQLC
(code size)
(desirable)
CS848: Topics in Databases: Foundations of Query Optimization
Review
SQL the programming language
Applications in information systems
SQL technology issues
SQL language issues
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
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
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
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)
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.
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!
CS848: Topics in Databases: Foundations of Query Optimization
Review
SQL the programming language
Applications in information systems
SQL technology issues
SQL language issues
CS848: Topics in Databases: Foundations of Query Optimization
Language Issues in Static Constraints
OWL!