• Aucun résultat trouvé

Uncertain Data Management Boolean c-tables

N/A
N/A
Protected

Academic year: 2022

Partager "Uncertain Data Management Boolean c-tables"

Copied!
64
0
0

Texte intégral

(1)

Uncertain Data Management Boolean c-tables

Antoine Amarilli1, Silviu Maniu2 November 21st, 2017

1Télécom ParisTech

2LRI

(2)

c-tables

Rememberc-tables:

Member./Booking id date teacher class room 2 2017-11-28 NULL1 UDM NULL2

3 2017-12-05 NULL1 UDM NULL2

4 2017-12-12 NULL1 UDM NULL2 ifNULL0is “UDM”

→ Variant:Only allowNULLsin theconditions

(3)

c-tables

Rememberc-tables:

Member./Booking id date teacher class room 2 2017-11-28 NULL1 UDM NULL2

3 2017-12-05 NULL1 UDM NULL2

4 2017-12-12 NULL1 UDM NULL2 ifNULL0is “UDM”

→ Variant:Only allowNULLsin theconditions

(4)

NULLs in conditions

Thepossible tuplesare exactly therows

Each row may either bekeptordeleted

Depends on thecondition

→ Finitenumber of possible worlds

at most2Nif we haveNrows

(5)

NULLs in conditions

Thepossible tuplesare exactly therows

Each row may either bekeptordeleted

Depends on thecondition

→ Finitenumber of possible worlds

at most2Nif we haveNrows

(6)

NULLs in conditions

Thepossible tuplesare exactly therows

Each row may either bekeptordeleted

Depends on thecondition

→ Finitenumber of possible worlds

at most2Nif we haveNrows

(7)

Example

Member./Booking id date teacher class room

2 2017-11-28 Antoine UDM C42 ifNULL1is “Antoine”

3 2017-12-05 Antoine UDM C42 ifNULL1is “Antoine”

4 2017-12-12 Antoine UDM C42 ifNULL1is “Antoine”

2 2017-11-28 Silviu UDM C42 ifNULL1is “Silviu”

3 2017-12-05 Silviu UDM C42 ifNULL1is “Silviu”

4 2017-12-12 Silviu UDM C42 ifNULL1is “Silviu”

(8)

Table of contents

Definitions

Boolean c-tables

Expressiveness

(9)

Boolean c-tables

WithBoolean c-tables, we impose:

the possible values of eachNULLi areTrueandFalse

We cansimplify notation

→ We write theNULLsasBoolean variablesxi

→ We replacexi=Trueby justxi

→ We replacexi=Falseby¬xi

→ We canrewrite:

xi=xjto(xixj)(¬xi∧ ¬xj)

xi6=xjto(xi∧ ¬xj)(¬xixj)

→ The conditions becomeBoolean expressions

(10)

Boolean c-tables

WithBoolean c-tables, we impose:

the possible values of eachNULLi areTrueandFalse We cansimplify notation

→ We write theNULLsasBoolean variablesxi

→ We replacexi=Trueby justxi

→ We replacexi=Falseby¬xi

→ We canrewrite:

xi=xjto(xixj)(¬xi∧ ¬xj)

xi6=xjto(xi∧ ¬xj)(¬xixj)

→ The conditions becomeBoolean expressions

(11)

Boolean c-tables

WithBoolean c-tables, we impose:

the possible values of eachNULLi areTrueandFalse We cansimplify notation

→ We write theNULLsasBoolean variablesxi

→ We replacexi=Trueby justxi

→ We replacexi=Falseby¬xi

→ We canrewrite:

xi=xjto(xixj)(¬xi∧ ¬xj)

xi6=xjto(xi∧ ¬xj)(¬xixj)

→ The conditions becomeBoolean expressions

(12)

Boolean c-tables

WithBoolean c-tables, we impose:

the possible values of eachNULLi areTrueandFalse We cansimplify notation

→ We write theNULLsasBoolean variablesxi

→ We replacexi=Trueby justxi

→ We replacexi=Falseby¬xi

→ We canrewrite:

xi=xjto(xixj)(¬xi∧ ¬xj)

xi6=xjto(xi∧ ¬xj)(¬xixj)

(13)

Expressiveness

Theorem

We can always rewrite a c-table havingNULLsonly in conditions to a Boolean c-table.

Proof: Two steps:

1. We can pick theNULLsin afinite domain

2. We can rewrite anyfinite domaintoTrueandFalse

(14)

Expressiveness

Theorem

We can always rewrite a c-table havingNULLsonly in conditions to a Boolean c-table.

Proof:Two steps:

1. We can pick theNULLsin afinite domain

2. We can rewrite anyfinite domaintoTrueandFalse

(15)

Step 1: Reducing to a finite domain

We can choose amonginfinitely manyvalues for theNULLs

However, the values only appear in theconditions:

NULLi=NULLj

NULLi= “c”

• Boolean combinations

We call two assignments of values toNULLsequivalent if all conditions evaluate to thesame

(16)

Step 1: Reducing to a finite domain

We can choose amonginfinitely manyvalues for theNULLs

However, the values only appear in theconditions:

NULLi=NULLj

NULLi= “c”

• Boolean combinations

We call two assignments of values toNULLsequivalent if all conditions evaluate to thesame

(17)

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values toNULLsequivalent if all conditions evaluate to thesame.

Consider the following:

NULL1 =NULL2

NULL2 = “c”

→ E.g.:The assignment(a,d)isequivalentto(b,d)

→ What are the possibleassignments?

(c,c)

true,true

(x,c)withx6=c

false,true

(x,x)withx6=c

true, false

(y,x)withx6=candy6=x

false, false

(18)

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values toNULLsequivalent if all conditions evaluate to thesame.

Consider the following:

NULL1 =NULL2

NULL2 = “c”

→ E.g.:The assignment(a,d)isequivalentto(b,d)

→ What are the possibleassignments?

(c,c)

true,true

(x,c)withx6=c

false,true

(x,x)withx6=c

true, false

(y,x)withx6=candy6=x

false, false

(19)

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values toNULLsequivalent if all conditions evaluate to thesame.

Consider the following:

NULL1 =NULL2

NULL2 = “c”

→ E.g.:The assignment(a,d)isequivalentto(b,d)

→ What are the possibleassignments?

(c,c)

true,true

(x,c)withx6=c

false,true

(x,x)withx6=c

true, false

(y,x)withx6=candy6=x

false, false

(20)

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values toNULLsequivalent if all conditions evaluate to thesame.

Consider the following:

NULL1 =NULL2

NULL2 = “c”

→ E.g.:The assignment(a,d)isequivalentto(b,d)

→ What are the possibleassignments?

(c,c)

true,true

(x,c)withx6=c

false,true

(x,x)withx6=c

true, false

(y,x)withx6=candy6=x

false, false

(21)

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values toNULLsequivalent if all conditions evaluate to thesame.

Consider the following:

NULL1 =NULL2

NULL2 = “c”

→ E.g.:The assignment(a,d)isequivalentto(b,d)

→ What are the possibleassignments?

(c,c)

true,true

(x,c)withx6=c

false,true

(x,x)withx6=c

true, false

(y,x)withx6=candy6=x

false, false

(22)

Step 1: Reducing to a finite domain (example)

→ Call two assignments of values toNULLsequivalent if all conditions evaluate to thesame.

Consider the following:

NULL1 =NULL2

NULL2 = “c”

→ E.g.:The assignment(a,d)isequivalentto(b,d)

→ What are the possibleassignments?

(c,c)

true,true

(x,c)withx6=c

false,true

(x,x)withx6=c

(23)

Step 1: Reducing to a finite domain (concluding)

Consider allconstantsthat appear:C

ConsiderNdifferent valuesV, whereNis the number ofNULLs

→ Gives ourdomainD ··=C t V Lemma

For any c-table withNULLsonly in conditions, its set of possible worlds is the same:

under the standard semantics

whenNULLsrange over the finiteD.

→ Forsimplicity, let’spadDto have exactly2kvalues for somek

(24)

Step 1: Reducing to a finite domain (concluding)

Consider allconstantsthat appear:C

ConsiderNdifferent valuesV, whereNis the number ofNULLs

→ Gives ourdomainD ··=C t V

Lemma

For any c-table withNULLsonly in conditions, its set of possible worlds is the same:

under the standard semantics

whenNULLsrange over the finiteD.

→ Forsimplicity, let’spadDto have exactly2kvalues for somek

(25)

Step 1: Reducing to a finite domain (concluding)

Consider allconstantsthat appear:C

ConsiderNdifferent valuesV, whereNis the number ofNULLs

→ Gives ourdomainD ··=C t V Lemma

For any c-table withNULLsonly in conditions, its set of possible worlds is the same:

under the standard semantics

whenNULLsrange over the finiteD.

→ Forsimplicity, let’spadDto have exactly2kvalues for somek

(26)

Step 1: Reducing to a finite domain (concluding)

Consider allconstantsthat appear:C

ConsiderNdifferent valuesV, whereNis the number ofNULLs

→ Gives ourdomainD ··=C t V Lemma

For any c-table withNULLsonly in conditions, its set of possible worlds is the same:

under the standard semantics

whenNULLsrange over the finiteD.

Forsimplicity, let’s to have exactly values for some

(27)

Step 2: Rewriting to Boolean variables

Thedomainhas size2k

Write itsvaluesinbinary

Encode eachNULLi to variablesxi1, . . . ,xik

→ Can wetranslatethe conditions?

(28)

Step 2: Rewriting to Boolean variables

Thedomainhas size2k

Write itsvaluesinbinary

Encode eachNULLi to variablesx1i, . . . ,xik

→ Can wetranslatethe conditions?

(29)

Step 2: Rewriting to Boolean variables

Thedomainhas size2k

Write itsvaluesinbinary

Encode eachNULLi to variablesx1i, . . . ,xik

→ Can wetranslatethe conditions?

(30)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x17=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL76=001

negatethe above

NULL7=NULL8

x17=x18andx27 =x82andx37=x38

NULL76=NULL8

negatethe above

(31)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL76=001

negatethe above

NULL7=NULL8

x17=x18andx27 =x82andx37=x38

NULL76=NULL8

negatethe above

(32)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL76=001

negatethe above

NULL7=NULL8

x17=x18andx27 =x82andx37=x38

NULL76=NULL8

negatethe above

(33)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL7 6=001

negatethe above

NULL7=NULL8

x17=x18andx27 =x82andx37=x38

NULL76=NULL8

negatethe above

(34)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL7 6=001

negatethe above

NULL7=NULL8

x17=x18andx27 =x82andx37=x38

NULL76=NULL8

negatethe above

(35)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL7 6=001

negatethe above

NULL7 =NULL8

x17=x18andx27 =x82andx37=x38

NULL76=NULL8

negatethe above

(36)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL7 6=001

negatethe above

NULL7 =NULL8

x71=x18andx27 =x82andx37=x38

NULL76=NULL8

negatethe above

(37)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL7 6=001

negatethe above

NULL7 =NULL8

x71=x18andx27 =x82andx37=x38

NULL7 6=NULL8

negatethe above

(38)

Step 2: Rewriting to Boolean variables (example)

NULL7 =001

x71=0andx27=0andx37=1

¬x71∧ ¬x27x37

NULL7 6=001

negatethe above

NULL7 =NULL8

x71=x18andx27 =x82andx37=x38

NULL7 6=NULL8

negatethe above

(39)

Concluding

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

2. We haverewrittento Boolean variables (we changed the relation)

→ Itsufficesto study Boolean c-tables

(40)

Concluding

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

2. We haverewrittento Boolean variables (we changed the relation)

→ Itsufficesto study Boolean c-tables

(41)

Concluding

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

2. We haverewrittento Boolean variables (we changed the relation)

→ Itsufficesto study Boolean c-tables

(42)

Table of contents

Definitions

Boolean c-tables

Expressiveness

(43)

Strong representation system

Are Boolean c-tables astrong representation system for relational algebra? ...

Yes!

c-tablesare a strong representation system

NULLswill neverappearby themselves outside of conditions

(44)

Strong representation system

Are Boolean c-tables astrong representation system for relational algebra? ...

Yes!

c-tablesare a strong representation system

NULLswill neverappearby themselves outside of conditions

(45)

Strong representation system

Are Boolean c-tables astrong representation system for relational algebra? ...

Yes!

c-tablesare a strong representation system

NULLswill neverappearby themselves outside of conditions

(46)

Capturing all uncertain relations

Fix afiniteset ofpossible tuples

Apossible world: a subset of thepossible tuples

Anfinite uncertain relation:(finite) set ofpossible worlds

Booking date teacher room 21 Antoine Saphir 21 Silviu Saphir 21 Silviu C47 28 Antoine Saphir 28 Antoine C47 28 Silviu Saphir

Booking date teacher room 21 Antoine Saphir 21 Silviu Saphir 21 Silviu C47 28 Antoine Saphir 28 Antoine C47 28 Silviu Saphir

→ Can we capture allfinite uncertain relations?

(47)

Capturing all uncertain relations

Fix afiniteset ofpossible tuples

Apossible world: a subset of thepossible tuples

Anfinite uncertain relation:(finite) set ofpossible worlds Booking

date teacher room 21 Antoine Saphir 21 Silviu Saphir 21 Silviu C47 28 Antoine Saphir 28 Antoine C47 28 Silviu Saphir

Booking date teacher room 21 Antoine Saphir 21 Silviu Saphir 21 Silviu C47 28 Antoine Saphir 28 Antoine C47 28 Silviu Saphir

→ Can we capture allfinite uncertain relations?

(48)

Capturing all uncertain relations

Fix afiniteset ofpossible tuples

Apossible world: a subset of thepossible tuples

Anfinite uncertain relation:(finite) set ofpossible worlds Booking

date teacher room 21 Antoine Saphir 21 Silviu Saphir 21 Silviu C47 28 Antoine Saphir 28 Antoine C47 28 Silviu Saphir

Booking date teacher room 21 Antoine Saphir 21 Silviu Saphir 21 Silviu C47 28 Antoine Saphir 28 Antoine C47 28 Silviu Saphir

(49)

Capturing finite uncertain relations

Make multiplecopiesof possible worlds so there are2k possible worlds

Write eachpossible worldin binary

00 v w a d b e c f

01 v w a d b e c f

10 v w a d b e c f

11 v w a d b e c f

(50)

Capturing finite uncertain relations

Make multiplecopiesof possible worlds so there are2k possible worlds

Write eachpossible worldin binary 00

v w a d b e c f

01 v w a d b e c f

10 v w a d b e c f

11 v w a d b e c f

(51)

Capturing finite uncertain relations

Make multiplecopiesof possible worlds so there are2k possible worlds

Write eachpossible worldin binary 00

v w a d b e c f

01 v w a d b e c f

10 v w a d b e c f

11 v w a d b e c f

(52)

Numbering tuples

For eachtuple, write thepossible worldswhere it appears

00 v w a d b e c f

01 v w a d b e c f

10 v w a d b e c f

11 v w a d b e c f

v w

a d 00 01 10 11

b e 01

c f 01 10 11

(53)

Numbering tuples

For eachtuple, write thepossible worldswhere it appears 00

v w a d b e c f

01 v w a d b e c f

10 v w a d b e c f

11 v w a d b e c f

v w

a d 00 01 10 11

b e 01

c f 01 10 11

(54)

Numbering tuples

For eachtuple, write thepossible worldswhere it appears 00

v w a d b e c f

01 v w a d b e c f

10 v w a d b e c f

11 v w a d b e c f

v w

a d 00 01 10 11

b e 01

(55)

Making a condition

Create onenon-Boolean variable

chooses the world

Obtain anon-Booleanc-table

v w

a d 00 01 10 11

b e 01

c f 01 10 11

v w

a d x=00∨x=01∨x=10∨x=11

b e x=01

c f x=01∨x=10∨x=11

(56)

Making a condition

Create onenon-Boolean variable

chooses the world

Obtain anon-Booleanc-table v w

a d 00 01 10 11

b e 01

c f 01 10 11

v w

a d x=00∨x=01∨x=10∨x=11

b e x=01

c f x=01∨x=10∨x=11

(57)

Making a condition

Create onenon-Boolean variable

chooses the world

Obtain anon-Booleanc-table v w

a d 00 01 10 11

b e 01

c f 01 10 11

v w

a d x=00∨x=01∨x=10∨x=11

b e x=01

c f x=01∨x=10∨x=11

(58)

Making a Boolean c-table

Use theprevious trickto rewrite to aBoolean c-table

v w

a d x=00∨x=01∨x=10∨x=11

b e x=01

c f x=01∨x=10∨x=11

v w

a d ¬x1∧ ¬x2∨ ¬x1x2x1∧ ¬x2x1x2

b e ¬x1x2

c f ¬x1x2x1∧ ¬x2x1x2

(59)

Making a Boolean c-table

Use theprevious trickto rewrite to aBoolean c-table

v w

a d x=00∨x=01∨x=10∨x=11

b e x=01

c f x=01∨x=10∨x=11

v w

a d ¬x1∧ ¬x2∨ ¬x1x2x1∧ ¬x2x1x2

b e ¬x1x2

c f ¬x1x2x1∧ ¬x2x1x2

(60)

Making a Boolean c-table

Use theprevious trickto rewrite to aBoolean c-table

v w

a d x=00∨x=01∨x=10∨x=11

b e x=01

c f x=01∨x=10∨x=11

v w

a d ¬x1∧ ¬x2∨ ¬x1x2x1∧ ¬x2x1x2

b e ¬x1x2

c f ¬x ∧xx ∧ ¬x ∨xx

(61)

Conclusion We have studied:

First:

Codd tableswithNULLs

v-tableswithnamedNULLs

c-tableswithnamedNULLsandconditions

Then:• c-tables withNULLsonly in conditions

Booleanc-tables: Boolean variables We have shown:

→ Anyc-tablewithNULLsonly in conditions rewritesto a Boolean c-table

→ Boolean c-tablescaptureall finiteuncertain relations

→ Boolean c-tables are astrong representation system

→ c-tables are astrong representation system

(62)

Conclusion We have studied:

First:

Codd tableswithNULLs

v-tableswithnamedNULLs

c-tableswithnamedNULLsandconditions

Then:• c-tables withNULLsonly in conditions

Booleanc-tables: Boolean variables

We have shown:

→ Anyc-tablewithNULLsonly in conditions rewritesto a Boolean c-table

→ Boolean c-tablescaptureall finiteuncertain relations

→ Boolean c-tables are astrong representation system

→ c-tables are astrong representation system

(63)

Conclusion We have studied:

First:

Codd tableswithNULLs

v-tableswithnamedNULLs

c-tableswithnamedNULLsandconditions

Then:• c-tables withNULLsonly in conditions

Booleanc-tables: Boolean variables We have shown:

→ Anyc-tablewithNULLsonly in conditions rewritesto a Boolean c-table

→ Boolean c-tablescaptureall finiteuncertain relations

→ Boolean c-tables are astrong representation system

→ c-tables are astrong representation system

(64)

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.

Références

Documents relatifs

158 Arrêt de la Cour de cassation du 5 juillet 2017, 14-16.737 ; opposant CONCURRENCE à SAMSUNG et Amazon : « attendu qu'après avoir constaté que l'arrêt du 25 octobre 2012,

En particulier, même s’il était avéré, le fait que certaines des informations demandées par les services d’instruction pourraient se trouver dans les fichiers informatiques

L’Autorité s’est saisie d’office de pratiques mises en œuvre dans le secteur du transport routier de marchandises à la suite de la transmission d’un rapport d’enquête

Contact avec la peau Laver immédiatement avec du savon beaucoup d’eau tout en retirant tous les vêtements et toutes les chaussures contaminés.. Enlever et laver les

PARTICIPATION : Cette course est ouverte à toutes et à tous, des catégories cadets à masters masculins et féminins.. Départ et arrivée au

Les jeunes vezos sont donc obliger de partir et de s’installer dans des zones plus éloignées avec leur famille, notamment dans le sud du pays en dessous de Toliara.. La baisse

[r]

a) Remplissage à 100 % de la bouteille de gaz (11 kg), réservoir eau fraîche rempli à 10 litres, réservoir chauffe-eau rempli à 100 % b) Le poids à vide est la résultante du