Combining Dependent Annotations for Relational Algebra Egor V. - - PowerPoint PPT Presentation

combining dependent annotations for relational algebra
SMART_READER_LITE
LIVE PREVIEW

Combining Dependent Annotations for Relational Algebra Egor V. - - PowerPoint PPT Presentation

Combining Dependent Annotations for Relational Algebra Egor V. Kostylev, Peter Buneman University of Edinburgh Theory and Practice of Provenance, 2011 Egor V. Kostylev, Peter Buneman Combining Dependent Annotations Semiring Model Domain of


slide-1
SLIDE 1

Combining Dependent Annotations for Relational Algebra

Egor V. Kostylev, Peter Buneman

University of Edinburgh

Theory and Practice of Provenance, 2011

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-2
SLIDE 2

Semiring Model

Domain of annotations for positive relational algebra (SPJU) is expected to be a semiring [Green, et al.] What to do if we need to annotate a database with 2 domains R1 and R2? Simple answer: the set of pairs R1 × R2. Does it always work?

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-3
SLIDE 3

Semiring Model

Domain of annotations for positive relational algebra (SPJU) is expected to be a semiring [Green, et al.] What to do if we need to annotate a database with 2 domains R1 and R2? Simple answer: the set of pairs R1 × R2. Does it always work?

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-4
SLIDE 4

Semiring Model

Domain of annotations for positive relational algebra (SPJU) is expected to be a semiring [Green, et al.] What to do if we need to annotate a database with 2 domains R1 and R2? Simple answer: the set of pairs R1 × R2. Does it always work?

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-5
SLIDE 5

Example

Exports: CName Goods Time Customers Greece Food 2004-2008 UK, Germany Greece Textile 2007-2010 Germany, Italy, Cyprus Time – sets of years with ∪ and ∩ as operations Customers – sets of countries with ∪ and ∩ as operations Q = πCName(Exports) : CName Time Customers Greece 2004-2010 UK, Germany, Italy, Cyprus Is it the answer we expect?

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-6
SLIDE 6

Example

Exports: CName Goods Time Customers Greece Food 2004-2008 UK, Germany Greece Textile 2007-2010 Germany, Italy, Cyprus Time – sets of years with ∪ and ∩ as operations Customers – sets of countries with ∪ and ∩ as operations Q = πCName(Exports) : CName Time Customers Greece 2004-2010 UK, Germany, Italy, Cyprus Is it the answer we expect?

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-7
SLIDE 7

Graphical representation

’04 ’05 ’06 ’07 ’08 ’09 ’10 UK Ger Ita Cyp

([2004-2008], {UK, Germany}) ([2007-2010], {Germany, Italy, Cyprus}):

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-8
SLIDE 8

Graphical representation

’04 ’05 ’06 ’07 ’08 ’09 ’10 UK Ger Ita Cyp

([2004-2010], {UK, Germany, Italy, Cyprus})

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-9
SLIDE 9

Combined domain of dependent annotations

It is impossible to represent the desired set of dots by a single pair of elements from the combining domains. Combined annotation – a set of pairs from R1 × R2.

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-10
SLIDE 10

Combined domain of dependent annotations

It is impossible to represent the desired set of dots by a single pair of elements from the combining domains. Combined annotation – a set of pairs from R1 × R2.

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-11
SLIDE 11

Example: Combined annotation

’04 ’05 ’06 ’07 ’08 ’09 ’10 UK Ger Ita Cyp

λ1 = {([2004-2008], {UK, Germany}) ([2007-2010], {Germany, Italy, Cyprus})}:

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-12
SLIDE 12

Example: Combined annotation

’04 ’05 ’06 ’07 ’08 ’09 ’10 UK Ger Ita Cyp

λ2 = {([2004-2006], {UK, Germany}) ([2007-2008], {UK, Ger, Italy, Cyprus})}: ([2009-2010], {Germany, Italy, Cyprus})}:

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations

slide-13
SLIDE 13

Semiring of Combined Annotations

define an equivalence in combined annotations define a semiring of equivalence classes of combined annotations define a normal form for equivalence classes design an algorithm to compute normal forms Do it carefully to make it work for (almost) all semirings (no difference, idempotence, etc.)

Egor V. Kostylev, Peter Buneman Combining Dependent Annotations