64
Uncertain Data Management Boolean c-tables Antoine Amarilli , Silviu Maniu December th, Télécom ParisTech LRI /

Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Uncertain Data ManagementBoolean c-tables

Antoine Amarilli1, Silviu Maniu2

December 5th, 20161Télécom ParisTech

2LRI

1/21

Page 2: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

c-tables

Remember c-tables:

Member ./ Booking

id date teacher class room

2 2016-11-28 NULL1 UDM NULL23 2016-12-05 NULL1 UDM NULL24 2016-12-12 NULL1 UDM NULL2 if NULL0 is “UDM”

→ Variant: Only allow NULLs in the conditions

2/21

Page 3: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

c-tables

Remember c-tables:

Member ./ Booking

id date teacher class room

2 2016-11-28 NULL1 UDM NULL23 2016-12-05 NULL1 UDM NULL24 2016-12-12 NULL1 UDM NULL2 if NULL0 is “UDM”

→ Variant: Only allow NULLs in the conditions

2/21

Page 4: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

NULLs in conditions

• The possible tuples are exactly the rows

• Each row may either be kept or deleted→ Depends on the condition

→ Finite number of possible worlds→ at most 2N if we have N rows

3/21

Page 5: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

NULLs in conditions

• The possible tuples are exactly the rows

• Each row may either be kept or deleted→ Depends on the condition

→ Finite number of possible worlds

→ at most 2N if we have N rows

3/21

Page 6: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

NULLs in conditions

• The possible tuples are exactly the rows

• Each row may either be kept or deleted→ Depends on the condition

→ Finite number of possible worlds→ at most 2N if we have N rows

3/21

Page 7: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Example

Member ./ Booking

id date teacher class room

2 2016-11-28 Antoine UDM C42 if NULL1 is “Antoine”3 2016-12-05 Antoine UDM C42 if NULL1 is “Antoine”4 2016-12-12 Antoine UDM C42 if NULL1 is “Antoine”2 2016-11-28 Silviu UDM C42 if NULL1 is “Silviu”3 2016-12-05 Silviu UDM C42 if NULL1 is “Silviu”4 2016-12-12 Silviu UDM C42 if NULL1 is “Silviu”

4/21

Page 8: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Table of contents

Definitions

Boolean c-tables

Expressiveness

5/21

Page 9: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Boolean c-tables

With Boolean c-tables, we impose:

• the possible values of each NULLi are True and False

We can simplify notation

→ We write the NULLs as Boolean variables xi→ We replace xi = True by just xi→ We replace xi = False by ¬xi→ We can rewrite:

• xi = xj to (xi ∧ xj) ∨ (¬xi ∧ ¬xj)• xi 6= xj to (xi ∧ ¬xj) ∨ (¬xi ∧ xj)

→ The conditions become Boolean expressions

6/21

Page 10: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Boolean c-tables

With Boolean c-tables, we impose:

• the possible values of each NULLi are True and False

We can simplify notation

→ We write the NULLs as Boolean variables xi→ We replace xi = True by just xi→ We replace xi = False by ¬xi

→ We can rewrite:• xi = xj to (xi ∧ xj) ∨ (¬xi ∧ ¬xj)• xi 6= xj to (xi ∧ ¬xj) ∨ (¬xi ∧ xj)

→ The conditions become Boolean expressions

6/21

Page 11: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Boolean c-tables

With Boolean c-tables, we impose:

• the possible values of each NULLi are True and False

We can simplify notation

→ We write the NULLs as Boolean variables xi→ We replace xi = True by just xi→ We replace xi = False by ¬xi→ We can rewrite:

• xi = xj to (xi ∧ xj) ∨ (¬xi ∧ ¬xj)• xi 6= xj to (xi ∧ ¬xj) ∨ (¬xi ∧ xj)

→ The conditions become Boolean expressions

6/21

Page 12: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Boolean c-tables

With Boolean c-tables, we impose:

• the possible values of each NULLi are True and False

We can simplify notation

→ We write the NULLs as Boolean variables xi→ We replace xi = True by just xi→ We replace xi = False by ¬xi→ We can rewrite:

• xi = xj to (xi ∧ xj) ∨ (¬xi ∧ ¬xj)• xi 6= xj to (xi ∧ ¬xj) ∨ (¬xi ∧ xj)

→ The conditions become Boolean expressions6/21

Page 13: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Expressiveness

TheoremWe can always rewrite a c-table having NULLs only in conditionsto a Boolean c-table.

Proof: Two steps:

1. We can pick the NULLs in a finite domain2. We can rewrite any finite domain to True and False

7/21

Page 14: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Expressiveness

TheoremWe can always rewrite a c-table having NULLs only in conditionsto a Boolean c-table.

Proof: Two steps:

1. We can pick the NULLs in a finite domain2. We can rewrite any finite domain to True and False

7/21

Page 15: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain

• We can choose among infinitely many values for the NULLs• However, the values only appear in the conditions:

• NULLi = NULLj• NULLi = “c”• Boolean combinations

• We call two assignments of values to NULLs equivalentif all conditions evaluate to the same

8/21

Page 16: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain

• We can choose among infinitely many values for the NULLs• However, the values only appear in the conditions:

• NULLi = NULLj• NULLi = “c”• Boolean combinations

• We call two assignments of values to NULLs equivalentif all conditions evaluate to the same

8/21

Page 17: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values to NULLs equivalentif all conditions evaluate to the same.

Consider the following:

• NULL1 = NULL2• NULL2 = “c”

→ E.g.: The assignment (a,d) is equivalent to (b,d)

→ What are the possible assignments?• (c, c)

→ true, true• (x, c) with x 6= c

→ false, true• (x, x) with x 6= c

→ true, false• (y, x) with x 6= c and y 6= x

→ false, false

9/21

Page 18: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values to NULLs equivalentif all conditions evaluate to the same.

Consider the following:

• NULL1 = NULL2• NULL2 = “c”

→ E.g.: The assignment (a,d) is equivalent to (b,d)→ What are the possible assignments?

• (c, c)→ true, true

• (x, c) with x 6= c→ false, true

• (x, x) with x 6= c→ true, false

• (y, x) with x 6= c and y 6= x→ false, false

9/21

Page 19: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values to NULLs equivalentif all conditions evaluate to the same.

Consider the following:

• NULL1 = NULL2• NULL2 = “c”

→ E.g.: The assignment (a,d) is equivalent to (b,d)→ What are the possible assignments?

• (c, c)→ true, true

• (x, c) with x 6= c→ false, true

• (x, x) with x 6= c→ true, false

• (y, x) with x 6= c and y 6= x→ false, false

9/21

Page 20: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values to NULLs equivalentif all conditions evaluate to the same.

Consider the following:

• NULL1 = NULL2• NULL2 = “c”

→ E.g.: The assignment (a,d) is equivalent to (b,d)→ What are the possible assignments?

• (c, c)→ true, true

• (x, c) with x 6= c→ false, true

• (x, x) with x 6= c→ true, false

• (y, x) with x 6= c and y 6= x→ false, false

9/21

Page 21: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values to NULLs equivalentif all conditions evaluate to the same.

Consider the following:

• NULL1 = NULL2• NULL2 = “c”

→ E.g.: The assignment (a,d) is equivalent to (b,d)→ What are the possible assignments?

• (c, c)→ true, true

• (x, c) with x 6= c→ false, true

• (x, x) with x 6= c→ true, false

• (y, x) with x 6= c and y 6= x→ false, false

9/21

Page 22: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values to NULLs equivalentif all conditions evaluate to the same.

Consider the following:

• NULL1 = NULL2• NULL2 = “c”

→ E.g.: The assignment (a,d) is equivalent to (b,d)→ What are the possible assignments?

• (c, c)→ true, true

• (x, c) with x 6= c→ false, true

• (x, x) with x 6= c→ true, false

• (y, x) with x 6= c and y 6= x→ false, false 9/21

Page 23: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (concluding)

• Consider all constants that appear: C• Consider N different values V , where N is the number of NULLs

→ Gives our domain D ··= C t V

LemmaFor any c-table with NULLs only in conditions,its set of possible worlds is the same:

• under the standard semantics• when NULLs range over the finite D.

→ For simplicity, let’s pad D to have exactly 2k values for some k

10/21

Page 24: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (concluding)

• Consider all constants that appear: C• Consider N different values V , where N is the number of NULLs→ Gives our domain D ··= C t V

LemmaFor any c-table with NULLs only in conditions,its set of possible worlds is the same:

• under the standard semantics• when NULLs range over the finite D.

→ For simplicity, let’s pad D to have exactly 2k values for some k

10/21

Page 25: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (concluding)

• Consider all constants that appear: C• Consider N different values V , where N is the number of NULLs→ Gives our domain D ··= C t V

LemmaFor any c-table with NULLs only in conditions,its set of possible worlds is the same:

• under the standard semantics• when NULLs range over the finite D.

→ For simplicity, let’s pad D to have exactly 2k values for some k

10/21

Page 26: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 1: Reducing to a finite domain (concluding)

• Consider all constants that appear: C• Consider N different values V , where N is the number of NULLs→ Gives our domain D ··= C t V

LemmaFor any c-table with NULLs only in conditions,its set of possible worlds is the same:

• under the standard semantics• when NULLs range over the finite D.

→ For simplicity, let’s pad D to have exactly 2k values for some k

10/21

Page 27: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables

• The domain has size 2k

• Write its values in binary• Encode each NULLi to variables x1i , . . . , x

ki

→ Can we translate the conditions?

11/21

Page 28: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables

• The domain has size 2k

• Write its values in binary• Encode each NULLi to variables x1i , . . . , x

ki

→ Can we translate the conditions?

11/21

Page 29: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables

• The domain has size 2k

• Write its values in binary• Encode each NULLi to variables x1i , . . . , x

ki

→ Can we translate the conditions?

11/21

Page 30: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001

→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001→ negate the above

• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8→ negate the above

12/21

Page 31: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1

→ ¬x17 ∧ ¬x27 ∧ x37• NULL7 6= 001→ negate the above

• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8→ negate the above

12/21

Page 32: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001→ negate the above

• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8→ negate the above

12/21

Page 33: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001

→ negate the above• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8→ negate the above

12/21

Page 34: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001→ negate the above

• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8→ negate the above

12/21

Page 35: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001→ negate the above

• NULL7 = NULL8

→ x17 = x18 and x27 = x28 and x37 = x38• NULL7 6= NULL8→ negate the above

12/21

Page 36: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001→ negate the above

• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8→ negate the above

12/21

Page 37: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001→ negate the above

• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8

→ negate the above

12/21

Page 38: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Step 2: Rewriting to Boolean variables (example)

• NULL7 = 001→ x17 = 0 and x27 = 0 and x37 = 1→ ¬x17 ∧ ¬x27 ∧ x37

• NULL7 6= 001→ negate the above

• NULL7 = NULL8→ x17 = x18 and x27 = x28 and x37 = x38

• NULL7 6= NULL8→ negate the above

12/21

Page 39: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Concluding

1. We have moved to a finite domain(without changing the relation)

2. We have rewritten to Boolean variables(we changed the relation)

→ It suffices to study Boolean c-tables

13/21

Page 40: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Concluding

1. We have moved to a finite domain(without changing the relation)

2. We have rewritten to Boolean variables(we changed the relation)

→ It suffices to study Boolean c-tables

13/21

Page 41: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Concluding

1. We have moved to a finite domain(without changing the relation)

2. We have rewritten to Boolean variables(we changed the relation)

→ It suffices to study Boolean c-tables

13/21

Page 42: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Table of contents

Definitions

Boolean c-tables

Expressiveness

14/21

Page 43: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Strong representation system

• Are Boolean c-tables a strong representation systemfor relational algebra? ...

→ Yes!→ c-tables are a strong representation system→ NULLs will never appear by themselves outside of conditions

15/21

Page 44: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Strong representation system

• Are Boolean c-tables a strong representation systemfor relational algebra? ...→ Yes!

→ c-tables are a strong representation system→ NULLs will never appear by themselves outside of conditions

15/21

Page 45: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Strong representation system

• Are Boolean c-tables a strong representation systemfor relational algebra? ...→ Yes!

→ c-tables are a strong representation system→ NULLs will never appear by themselves outside of conditions

15/21

Page 46: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Capturing all uncertain relations

• Fix a finite set of possible tuples• A possible world: a subset of the possible tuples• An finite uncertain relation: (finite) set of possible worlds

Booking

date teacher room

21 Antoine Saphir21 Silviu Saphir21 Silviu C4728 Antoine Saphir28 Antoine C4728 Silviu Saphir

Booking

date teacher room

21 Antoine Saphir21 Silviu Saphir21 Silviu C4728 Antoine Saphir28 Antoine C4728 Silviu Saphir

→ Can we capture all finite uncertain relations?

16/21

Page 47: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Capturing all uncertain relations

• Fix a finite set of possible tuples• A possible world: a subset of the possible tuples• An finite uncertain relation: (finite) set of possible worlds

Booking

date teacher room

21 Antoine Saphir21 Silviu Saphir21 Silviu C4728 Antoine Saphir28 Antoine C4728 Silviu Saphir

Booking

date teacher room

21 Antoine Saphir21 Silviu Saphir21 Silviu C4728 Antoine Saphir28 Antoine C4728 Silviu Saphir

→ Can we capture all finite uncertain relations?

16/21

Page 48: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Capturing all uncertain relations

• Fix a finite set of possible tuples• A possible world: a subset of the possible tuples• An finite uncertain relation: (finite) set of possible worlds

Booking

date teacher room

21 Antoine Saphir21 Silviu Saphir21 Silviu C4728 Antoine Saphir28 Antoine C4728 Silviu Saphir

Booking

date teacher room

21 Antoine Saphir21 Silviu Saphir21 Silviu C4728 Antoine Saphir28 Antoine C4728 Silviu Saphir

→ Can we capture all finite uncertain relations?16/21

Page 49: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Capturing finite uncertain relations

• Make multiple copies of possible worldsso there are 2k possible worlds

• Write each possible world in binary

00

v w

a db ec f

01

v w

a db ec f

10

v w

a db ec f

11

v w

a db ec f

17/21

Page 50: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Capturing finite uncertain relations

• Make multiple copies of possible worldsso there are 2k possible worlds

• Write each possible world in binary

00

v w

a db ec f

01

v w

a db ec f

10

v w

a db ec f

11

v w

a db ec f

17/21

Page 51: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Capturing finite uncertain relations

• Make multiple copies of possible worldsso there are 2k possible worlds

• Write each possible world in binary

00

v w

a db ec f

01

v w

a db ec f

10

v w

a db ec f

11

v w

a db ec f

17/21

Page 52: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Numbering tuples

For each tuple, write the possible worlds where it appears

00

v w

a db ec f

01

v w

a db ec f

10

v w

a db ec f

11

v w

a db ec f

v w

a d 00 01 10 11b e 01c f 01 10 11

18/21

Page 53: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Numbering tuples

For each tuple, write the possible worlds where it appears

00

v w

a db ec f

01

v w

a db ec f

10

v w

a db ec f

11

v w

a db ec f

v w

a d 00 01 10 11b e 01c f 01 10 11

18/21

Page 54: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Numbering tuples

For each tuple, write the possible worlds where it appears

00

v w

a db ec f

01

v w

a db ec f

10

v w

a db ec f

11

v w

a db ec f

v w

a d 00 01 10 11b e 01c f 01 10 11

18/21

Page 55: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Making a condition

• Create one non-Boolean variable→ chooses the world

• Obtain a non-Boolean c-table

v w

a d 00 01 10 11b e 01c f 01 10 11

v w

a d x = 00 ∨ x = 01 ∨ x = 10 ∨ x = 11b e x = 01c f x = 01 ∨ x = 10 ∨ x = 11

19/21

Page 56: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Making a condition

• Create one non-Boolean variable→ chooses the world

• Obtain a non-Boolean c-table

v w

a d 00 01 10 11b e 01c f 01 10 11

v w

a d x = 00 ∨ x = 01 ∨ x = 10 ∨ x = 11b e x = 01c f x = 01 ∨ x = 10 ∨ x = 11

19/21

Page 57: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Making a condition

• Create one non-Boolean variable→ chooses the world

• Obtain a non-Boolean c-table

v w

a d 00 01 10 11b e 01c f 01 10 11

v w

a d x = 00 ∨ x = 01 ∨ x = 10 ∨ x = 11b e x = 01c f x = 01 ∨ x = 10 ∨ x = 11

19/21

Page 58: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Making a Boolean c-table

Use the previous trick to rewrite to a Boolean c-table

v w

a d x = 00 ∨ x = 01 ∨ x = 10 ∨ x = 11b e x = 01c f x = 01 ∨ x = 10 ∨ x = 11

v w

a d ¬x1 ∧ ¬x2 ∨ ¬x1 ∧ x2 ∨ x1 ∧ ¬x2 ∨ x1 ∧ x2b e ¬x1 ∧ x2c f ¬x1 ∧ x2 ∨ x1 ∧ ¬x2 ∨ x1 ∧ x2

20/21

Page 59: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Making a Boolean c-table

Use the previous trick to rewrite to a Boolean c-table

v w

a d x = 00 ∨ x = 01 ∨ x = 10 ∨ x = 11b e x = 01c f x = 01 ∨ x = 10 ∨ x = 11

v w

a d ¬x1 ∧ ¬x2 ∨ ¬x1 ∧ x2 ∨ x1 ∧ ¬x2 ∨ x1 ∧ x2b e ¬x1 ∧ x2c f ¬x1 ∧ x2 ∨ x1 ∧ ¬x2 ∨ x1 ∧ x2

20/21

Page 60: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Making a Boolean c-table

Use the previous trick to rewrite to a Boolean c-table

v w

a d x = 00 ∨ x = 01 ∨ x = 10 ∨ x = 11b e x = 01c f x = 01 ∨ x = 10 ∨ x = 11

v w

a d ¬x1 ∧ ¬x2 ∨ ¬x1 ∧ x2 ∨ x1 ∧ ¬x2 ∨ x1 ∧ x2b e ¬x1 ∧ x2c f ¬x1 ∧ x2 ∨ x1 ∧ ¬x2 ∨ x1 ∧ x2

20/21

Page 61: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Conclusion

We have studied:

• First:• Codd tables with NULLs• v-tables with named NULLs• c-tables with named NULLs and conditions

• Then:• c-tables with NULLs only in conditions• Boolean c-tables: Boolean variables

We have shown:

→ Any c-table with NULLs only in conditionsrewrites to a Boolean c-table

→ Boolean c-tables capture all finite uncertain relations→ Boolean c-tables are a strong representation system→ c-tables are a strong representation system

21/21

Page 62: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Conclusion

We have studied:

• First:• Codd tables with NULLs• v-tables with named NULLs• c-tables with named NULLs and conditions

• Then:• c-tables with NULLs only in conditions• Boolean c-tables: Boolean variables

We have shown:

→ Any c-table with NULLs only in conditionsrewrites to a Boolean c-table

→ Boolean c-tables capture all finite uncertain relations→ Boolean c-tables are a strong representation system→ c-tables are a strong representation system

21/21

Page 63: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

Conclusion

We have studied:

• First:• Codd tables with NULLs• v-tables with named NULLs• c-tables with named NULLs and conditions

• Then:• c-tables with NULLs only in conditions• Boolean c-tables: Boolean variables

We have shown:

→ Any c-table with NULLs only in conditionsrewrites to a Boolean c-table

→ Boolean c-tables capture all finite uncertain relations→ Boolean c-tables are a strong representation system→ c-tables are a strong representation system

21/21

Page 64: Uncertain Data Management Boolean c-tables · Table of contents Definitions Boolean c-tables Expressiveness 5/21. Boolean c-tables With Boolean c-tables, we impose: • the possible

References I

Abiteboul, S., Hull, R., and Vianu, V. (1995).Foundations of Databases.Addison-Wesley.http://webdam.inria.fr/Alice/pdfs/all.pdf.

Suciu, D., Olteanu, D., Ré, C., and Koch, C. (2011).Probabilistic Databases.Morgan & Claypool.Unavailable online.