Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Similar documents
Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Chapter 24. Active Database Concepts and Triggers. Outline. Trigger Example. Event-Condition-Action (ECA) Model

Interactive PMCube Explorer

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

1 Enterprise Modeler

Τεχνολογία Λογισμικού

COSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1

Appendix D. Controller Implementation

Ones Assignment Method for Solving Traveling Salesman Problem

Elementary Educational Computer

Goals of the Lecture UML Implementation Diagrams

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

Greedy Algorithms. Interval Scheduling. Greedy Algorithms. Interval scheduling. Greedy Algorithms. Interval Scheduling

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance

Ch 9.3 Geometric Sequences and Series Lessons

Python Programming: An Introduction to Computer Science

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Evaluation scheme for Tracking in AMI

Analysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Modern Systems Analysis and Design Seventh Edition

Τεχνολογία Λογισμικού

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments

( n+1 2 ) , position=(7+1)/2 =4,(median is observation #4) Median=10lb

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON

Image Segmentation EEE 508

Computers and Scientific Thinking

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Analysis of Algorithms

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

. Written in factored form it is easy to see that the roots are 2, 2, i,

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method

The Magma Database file formats

Data Structures and Algorithms. Analysis of Algorithms

Review: The ACID properties

CS 111: Program Design I Lecture 15: Objects, Pandas, Modules. Robert H. Sloan & Richard Warner University of Illinois at Chicago October 13, 2016

Python Programming: An Introduction to Computer Science

Copyright 1982, by the author(s). All rights reserved.

Avid Interplay Bundle

arxiv: v2 [cs.ds] 24 Mar 2018

Lazy Type Changes in Object-oriented Database. Shan Ming Woo and Barbara Liskov MIT Lab. for Computer Science December 1999

IMP: Superposer Integrated Morphometrics Package Superposition Tool

Analysis of Algorithms

Keywords Software Architecture, Object-oriented metrics, Reliability, Reusability, Coupling evaluator, Cohesion, efficiency

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Goals of this Lecture Activity Diagram Example

Parabolic Path to a Best Best-Fit Line:

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5

Outline n Introduction n Background o Distributed DBMS Architecture

Outline and Reading. Analysis of Algorithms. Running Time. Experimental Studies. Limitations of Experiments. Theoretical Analysis

A Comparative Study of Positive and Negative Factorials

Sectio 4, a prototype project of settig field weight with AHP method is developed ad the experimetal results are aalyzed. Fially, we coclude our work

CMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago

Bezier curves. Figure 2 shows cubic Bezier curves for various control points. In a Bezier curve, only

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

In this chapter, you learn the concepts and terminology of databases and

n n B. How many subsets of C are there of cardinality n. We are selecting elements for such a

WYSE Academic Challenge Sectional Computer Science 2005 SOLUTION SET

Baan Finance Financial Statements

EFFECT OF QUERY FORMATION ON WEB SEARCH ENGINE RESULTS

What are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs

BOOLEAN MATHEMATICS: GENERAL THEORY

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS

The VSS CCD photometry spreadsheet

Today s objectives. CSE401: Introduction to Compiler Construction. What is a compiler? Administrative Details. Why study compilers?

Web OS Switch Software

Investigation Monitoring Inventory

CSI 3140 WWW Structures, Techniques and Standards. Cascading Style Sheets (CSS)

Reliable Transmission. Spring 2018 CS 438 Staff - University of Illinois 1

Homework 1 Solutions MA 522 Fall 2017

Eigenimages. Digital Image Processing: Bernd Girod, Stanford University -- Eigenimages 1

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

Computational Geometry

System Overview. Hardware Concept. s Introduction to the Features of MicroAutoBox t

6.854J / J Advanced Algorithms Fall 2008

% Sun Logo for Frame. X3T10/95-229, Revision 2. September 28, 1995

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5.

GE FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control

Recursive Procedures. How can you model the relationship between consecutive terms of a sequence?

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

What are Information Systems?

Guide to Applying Online

% Sun Logo for. X3T10/95-229, Revision 0. April 18, 1998

Octahedral Graph Scaling

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

Programming with Shared Memory PART II. HPC Spring 2017 Prof. Robert van Engelen

CMSC Computer Architecture Lecture 10: Caches. Prof. Yanjing Li University of Chicago

Chapter 2. C++ Basics. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Bayesian approach to reliability modelling for a probability of failure on demand parameter

Transcription:

Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe

CHAPTER 26 Ehaced Data Models: Itroductio to Active, Temporal, Spatial, Multimedia, ad Deductive Databases Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe

26.1 Active Database Cocepts ad Triggers Database systems implemet rules that specify actios automatically triggered by certai evets Triggers Techique for specifyig certai types of active rules Commercial relatioal DBMSs have various versios of triggers available Oracle sytax used to illustrate cocepts Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-3

Geeralized Model for Active Databases ad Oracle Triggers Evet-coditio-actio (ECA) model Evet triggers a rule Usually database update operatios Coditio determies whether rule actio should be completed Optioal Actio will complete oly if coditio evaluates to true Actio to be take Sequece of SQL statemets, trasactio, or exteral program Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-4

Example Evets that may cause a chage i value of Total_sal attribute Isertig ew employee Chagig salary Reassigig or deletig employees Figure 26.1 A simplified COMPANY database used for active rule examples Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-5

Example (cot d.) Coditio to be evaluated Check that value of Do attribute is ot NULL Actio to be take Automatically update the value of Total_sal Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-6

Figure 26.2 Specifyig active rules as triggers i Oracle otatio (a) Triggers for automatically maitaiig the cosistecy of Total_sal of DEPARTMENT Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-7

Figure 26.2 (cot d.) Specifyig active rules as triggers i Oracle otatio (b) Trigger for comparig a employee s salary with that of his or her supervisor Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-8

Desig ad Implemetatio Issues for Active Databases Deactivated rule Will ot be triggered by the triggerig evet Activate commad Makes the rule active agai Drop commad Deletes the rule from the system Approach: group rules ito rule sets Etire rule set ca be activated, deactivated, or dropped Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-9

Desig ad Implemetatio Issues for Active Databases (cot d.) Timig of actio Before trigger executes trigger before executig evet that caused the trigger After trigger executes trigger after executig the evet Istead of trigger executes trigger istead of executig the evet Actio ca be cosidered separate trasactio Or part of same trasactio that triggered the rule Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-10

Desig ad Implemetatio Issues for Active Databases (cot d.) Rule cosideratio Immediate cosideratio Coditio evaluated as part of same trasactio Evaluate coditio either before, after, or istead of executig the triggerig evet Deferred cosideratio Coditio evaluated at the ed of the trasactio Detached cosideratio Coditio evaluated as a separate trasactio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-11

Desig ad Implemetatio Issues for Active Databases (cot d.) Row-level rule Rule cosidered separately for each row Statemet-level rule Rule cosidered oce for etire statemet Difficult to guaratee cosistecy ad termiatio of rules Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-12

Examples of Statemet-Level Active Rules i STARBURST Figure 26.5 (cotiues) Active rules usig statemet-level sematics i STARBURST otatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-13

Examples of Statemet-Level Active Rules i STARBURST (cot d.) Figure 26.5 (cot d.) Active rules usig statemet-level sematics i STARBURST otatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-14

Potetial Applicatios for Active Databases Allow otificatio of certai coditios that occur Eforce itegrity costraits Automatically maitai derived data Maitai cosistecy of materialized views Eable cosistecy of replicated tables Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-15

Triggers i SQL-99 Figure 26.6 Trigger T1 illustratig the sytax for defiig triggers i SQL-99 Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-16

26.2 Temporal Database Cocepts Temporal databases require some aspect of time whe orgaizig iformatio Healthcare Isurace Reservatio systems Scietific databases Time cosidered as ordered sequece of poits Graularity determied by the applicatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-17

Temporal Database Cocepts (cot d.) Chroo Term used to describe miimal graularity of a particular applicatio Referece poit for measurig specific time evets Various caledars SQL2 temporal data types DATE, TIME, TIMESTAMP, INTERVAL, PERIOD Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-18

Temporal Database Cocepts (cot d.) Poit evets or facts Typically associated with a sigle time poit Time series data Duratio evets or facts Associated with specific time period Time period represeted by start ad ed poits Valid time True i the real world Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-19

Temporal Database Cocepts (cot d.) Trasactio time Value of the system clock whe iformatio is valid i the system User-defied time Bitemporal database Uses valid time ad trasactio time Valid time relatios Used to represet history of chages Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-20

Temporal Database Cocepts (cot d.) Figure 26.7 Differet types of temporal relatioal databases (a) Valid time database schema (b) Trasactio time database schema (c) Bitemporal database schema Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-21

Temporal Database Cocepts (cot d.) Figure 26.8 Some tuple versios i the valid time relatios EMP_VT ad DEPT_VT Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-22

Temporal Database Cocepts (cot d.) Types of updates Proactive Retroactive Simultaeous Timestamp recorded wheever chage is applied to database Bitemporal relatios Applicatio requires both valid time ad trasactio time Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-23

Temporal Database Cocepts (cot d.) Implemetatio cosideratios Store all tuples i the same table Create two tables: oe for curretly valid iformatio ad oe for the rest Vertically partitio temporal relatio attributes ito separate relatios New tuple created wheever ay attribute updated Apped-oly database Keeps complete record of chages ad correctios Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-24

Temporal Database Cocepts (cot d.) Attribute versioig Simple complex object used to store all temporal chages of the object Time-varyig attribute Values versioed over time by addig temporal periods to the attribute No-time-varyig attribute Values do ot chage over time Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-25

Figure 26.10 Possible ODL schema for a temporal valid time EMPLOYEE_VT object class usig attribute versioig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-26

Temporal Database Cocepts (cot d.) TSQL2 laguage Exteds SQL for queryig valid time ad trasactio time tables Used to specify whether a relatio is temporal or otemporal Temporal database query coditios may ivolve time ad attributes Pure time coditio ivolves oly time Attribute ad time coditios Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-27

Temporal Database Cocepts (cot d.) CREATE TABLE statemet Exteded with optioal AS clause Allows users to declare differet temporal optios Examples: AS VALID STATE<GRANULARITY> (valid time relatio with valid time period) AS TRANSACTION (trasactio time relatio with trasactio time period) Keywords STATE ad EVENT Specify whether a time period or poit is associated with valid time dimesio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-28

Temporal Database Cocepts (cot d.) Time series data Ofte used i fiacial, sales, ad ecoomics applicatios Special type of valid evet data Evet s time poits predetermied accordig to fixed caledar Maaged usig specialized time series maagemet systems Supported by some commercial DBMS packages Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-29

26.3 Spatial Database Cocepts Spatial databases support iformatio about objects i multidimesioal space Examples: cartographic databases, geographic iformatio systems, weather iformatio databases Spatial relatioships amog the objects are importat Optimized to query data such as poits, lies, ad polygos Spatial queries Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-30

Spatial Database Cocepts (cot d.) Measuremet operatios Used to measure global properties of sigle objects Spatial aalysis operatios Ucover spatial relatioships withi ad amog mapped data layers Flow aalysis operatios Help determie shortest path betwee two poits Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-31

Spatial Database Cocepts (cot d.) Locatio aalysis Determie whether give set of poits ad lies lie withi a give polygo Digital terrai aalysis Used to build three-dimesioal models Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-32

Spatial Database Cocepts (cot d.) Table 26.1 Commo types of aalysis for spatial data Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-33

Spatial Database Cocepts (cot d.) Spatial data types Map data Geographic or spatial features of objects i a map Attribute data Descriptive data associated with map features Image data Satellite images Models of spatial iformatio Field models Object models Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-34

Spatial Database Cocepts (cot d.) Spatial operator categories Topological operators Properties do ot chage whe topological trasformatios applied Projective operators Express cocavity/covexity of objects Metric operators Specifically describe object s geometry Dyamic spatial operators Create, destroy, ad update Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-35

Spatial Database Cocepts (cot d.) Spatial queries Rage queries Example: fid all hospitals with the Metropolita Atlata city area Nearest eighbor queries Example: fid police car earest locatio of a crime Spatial jois or overlays Example: fid all homes withi two miles of a lake Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-36

Spatial Database Cocepts (cot d.) Spatial data idexig Grid files R-trees Spatial joi idex Spatial data miig techiques Spatial classificatio Spatial associatio Spatial clusterig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-37

26.4 Multimedia Database Cocepts Multimedia databases allow users to store ad query images, video, audio, ad documets Cotet-based retrieval Automatic aalysis Maual idetificatio Color ofte used i cotet-based image retrieval Texture ad shape Object recogitio Scale-ivariat feature trasform (SIFT) approach Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-38

Multimedia Database Cocepts (cot d.) Sematic taggig of images User-supplied tags Automated geeratio of image tags Web Otology Laguage (OWL) provides cocept hierarchy Aalysis of audio data sources Text-based idexig Cotet-based idexig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-39

26.5 Itroductio to Deductive Databases Deductive database uses facts ad rules Iferece egie ca deduce ew facts usig rules Prolog/Datalog otatio Based o providig predicates with uique ames Predicate has a implicit meaig ad a fixed umber of argumets If argumets are all costat values, predicate states that a certai fact is true If argumets are variables, cosidered as a query or part of a rule or costrait Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-40

Prolog Notatio ad The Supervisory Tree Figure 26.11 (a) Prolog otatio (b) The supervisory tree Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-41

Itroductio to Deductive Databases (cot d.) Datalog otatio Program built from basic objects called atomic formulas Literals of the form p(a 1,a 2, a ) p is the predicate ame is the umber of argumets for predicate p Iterpretatios of rules Proof-theoretic versus model-theoretic Deductive axioms Groud axioms Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-42

Itroductio to Deductive Databases (cot d.) Figure 26.12 Provig a ew fact Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-43

Itroductio to Deductive Databases (cot d.) Safe program or rule Geerates a fiite set of facts Norecursive query Icludes oly orecursive predicates Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-44

Use of Relatioal Operatios Figure 26.16 Predicates for illustratig relatioal operatios Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-45

26.6 Summary Active databases Specify active rules Temporal databases Ivolve time cocepts Spatial databases Ivolve spatial characteristics Multimedia databases Store images, audio, video, documets, ad more Deductive databases Prolog ad Datalog otatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 26-46