This material was developed by Dr. Toon Calders and prof. Dr. Jan Paredaens at University of...

31
Advanced Databases Introduction Dr. Rogelio Dávila Pérez Laboratorio Nacional de Informática Avanzada (LANIA) http://www.rogeliodavila.com/ e-mail: [email protected]

Transcript of This material was developed by Dr. Toon Calders and prof. Dr. Jan Paredaens at University of...

Page 1: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Advanced DatabasesIntroduction

Dr. Rogelio Dávila PérezLaboratorio Nacional

de Informática Avanzada (LANIA)http://www.rogeliodavila.com/

e-mail: [email protected]

Page 2: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Important Information

This material was developed by Dr. Toon Calders and prof. Dr. Jan Paredaensat University of Technology, Eindhoven.The original document can be accessed at the

following address:http://wwwis.win.tue.nl/~tcalders/teaching/advancedDB/

All changes and adaptations are my own responsability, Rogelio Dávila Pérez

Page 3: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Outline

Motivation for the course

Practical organization Course topics Project

Page 4: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Motivation for the Course

Database = a piece of software to handle data:

store, maintain, and query

Most ideal system situation-dependent› data type: simple / semi-structured / complex / …› types of queries: simple lookup / analytical / …› type of usage: multi-user / single-user /

distributed / …› …

Page 5: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Motivation for the Course Relational databases are tuned towards:

› simple data› simple, ad-hoc queries› multiple users

Other models are more suitable for other types of data› Object-Oriented Databases,› Deductive Databases, › Semi-Structured Databases,› Geographical Databases,› Data warehouses

Page 6: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Motivation for the Course

Study different data models› Advantages, disadvantages› Conceptual level

what are the important notions?› What’s underneath?

In a scientific way› exact, not just claims

Page 7: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Motivation for the Course

By the end: Student knows:

› different database models Understands:

› why they are introduced› conceptual notions

Is able to:› quickly master vendor-specific products

Page 8: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Outline

Motivation for the course

Practical organization Course topics Project

Page 9: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Practical Organization

In principle …Saturday, August 1st 2009, 9:00 12:00 Relational Model Overview

no new material opportunity to practice, ask questions together solve exercises Limitations of the Relational Model

13:00 16:00 Deductive Databases Databases and Logic Programming Datalog as engine for Deductive Databases Knowledge Bases

Page 10: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Practical Organization

Saturday, August 8th 2009 9:00 12:00 Deductive DB Practical Session

opportunity to practice, ask questions together solve exercises

13:00 16:00 Object Oriented Databases Object Modeling Language UDL Extending SQL (Recursion and Nested

relations) Objecto-Oriented and Object-Relational

Databases

Page 11: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Practical Organization

Saturday, August 15th 9:00 12:00 OODB Practical Session

opportunity to practice, ask questions together solve exercises

13:00 16:00 Distributed Databases› Heterogeneous and Homogeneous

Databases› Distributed Data Storage› Distributed Transactions› Commit Protocols

Page 12: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Practical Organization

Saturday, August 22nd

9:00 12:00 DDB Practical Session opportunity to practice, ask questions together solve exercises

13:00 16:00 Final Project Presentations Every team makes an exposition of their

project results to the rest of the group. Every team submeets a printed document

defending their project.

Page 13: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Important Information

Course notes can be downloaded at my webpage: http://www.rogeliodavila.com/cursos.htm

Doubts? Send me a message to [email protected] Interesting links:

› Dr. Toon Calders &prof. Dr. Jan Paredaens course link: http://wwwis.win.tue.nl/~tcalders/teaching/advancedDB/

Page 14: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Practical Organization

Grades:› 70% written exam› 30% group project

No project = no grade

Page 15: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Outline

Motivation for the course

Practical organization Course Topics Project

Page 16: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Course Topics

Limitations of the relational model

Deductive Databases

Object-Oriented Databases

Distributed Databases

Page 17: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Limitations of the relational model

Not every query can be expressed› Transitive closure cannot be expressed in

Relational Algebra Give all cities reachable from Antwerp by plane Give all smallest components of a part Give all decendants of person X

› Not even if you’re very smart … proof

› Extension to other relational query languages

Page 18: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Deductive Databases

Motivation is two-fold:› add deductive capabilities to databases;

the database contains: facts (intensional relations) rules to generate derived facts (extensional

relations)

Database is knowledge base› Extend the querying

datalog allows for recursion

Page 19: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Deductive Databases

Datalog as engine of deductive databases› similarities with Prolog› has facts and rules› rules define -possibly recursive- views

Semantics not always clear› safety› negation› recursion

Page 20: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Deductive Databases

g(a,b). g(b,c). g(a,d).reach(X,X) :- g(X,Y).reach(X,Y) :- g(X,Y).reach(X,Z) :- reach(X,Y), reach(Y,Z).node(X) :- g(X,Y).node(Y) :- g(X,Y).unreach(X,Y) :- node(X), node(Y),

not reach(X,Y).

Page 21: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Deductive Databases

In this topic we study:

› How to handle negation and recursion in the same program

› How to efficiently evaluate Datalog queries

Page 22: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

OO Databases

Many applications require the storage and manipulation of complex data› design databases› geometric databases› …

Object-Oriented programming languages manipulate complex objects› classes, methods, inheritance,

polymorphism

Page 23: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

OO Databases

Very simple example:› Class book

set of authors title set of keywords

Extremely simple to model in OO language

Hard in relational database!

Page 24: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

OO Databases

In many applications persistency of the data is nevertheless required› protection against system failure› consistency of the data

Mapping: object in OO language tuples of atomic values in relational database is often problematic

Page 25: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

OO Databases Either we ignore the multivalued dependencies

This table is in 3NF, BCNF

Title Author Keyword

Database System Concepts Silberschatz Database

Database System Concepts Korth Database

Database System Concepts Sudarshan Database

Database System Concepts Silberschatz Storage

Database System Concepts Korth Storage

Database System Concepts Sudarshan Storage

Page 26: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

OO Databases

Or we go to 4NFTitle Author

Database System Concepts Silberschatz

Database System Concepts Korth

Database System Concepts Sudarshan

Title Keyword

Database System Concepts Database

Database System Concepts Storage

Page 27: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

OO Databases

Basically OODB = persistent OO programming language› Very important concept› rather uninteresting scientifically

This topic will mainly be self-study› Reading bookchapter + Q & A session

Page 28: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Outline

Motivation for the course

Practical organization Course Topics Project

Page 29: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Project

Pick one of the 4 topics:› deductive databases / rule-based systems› object-oriented databases› data warehouses› semi-structured databases

Formulate your own project› illustrating the different course concepts› showing you mastered the technology

Page 30: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Project

Make a project proposal( WEEK 1)› fulfilling certain constraints› listing technologies to be used

Status report ( WEEK 2 )

Status report ( WEEK 3 )

Project presentations & Final report ( WEEK 4 )

Page 31: This material was developed by  Dr. Toon Calders and  prof. Dr. Jan Paredaens at University of Technology, Eindhoven. The original document can be accessed.

Summary

Relational model has limitations› simple queries› simple data

OODBs allow complex data types Deductive databases, datalog complex

queries Project complements theoretical

lectures Instructions for clarification