Presentation is loading. Please wait.

Presentation is loading. Please wait.

Believe It or Not – Adding belief annotations to databases Wolfgang Gatterbauer, Magda Balazinska, Nodira Khoussainova, and Dan Suciu University of Washington.

Similar presentations


Presentation on theme: "Believe It or Not – Adding belief annotations to databases Wolfgang Gatterbauer, Magda Balazinska, Nodira Khoussainova, and Dan Suciu University of Washington."— Presentation transcript:

1 Believe It or Not – Adding belief annotations to databases Wolfgang Gatterbauer, Magda Balazinska, Nodira Khoussainova, and Dan Suciu University of Washington http://db.cs.washington.edu/beliefDB/ August 25, VLDB 2009

2 2 High-level overview DBMS: manage consistent data Applications need inconsistent DM –Scientific databases –Internet community databases Community DBMS: manage inconsistent views This work: Belief databases –manage data and curation –grounded in modal and default logic –implemented on top of relational model reason: disagreement !

3 3 Agenda Motivating example Logic foundations Relational implementation Discussion

4 Observations iduidspeciesdatelocationcomment 2AliceCrow06-14-08Lake Placidfound feathers 4 Motivating application NatureMapping project (http://depts.washington.edu/natmap/) –volunter contribute animal observations –one person curates the database Sightings (S) siduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid Comments (C) cidcommentsid c1found featherss2 problem: does not scale!

5 Alice Bob 5 1. Distinct database instances Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid D1: Belief worlds: individually consistent, mutually possibly inconsistent

6 Alice Bob 6 1. Distinct database instances Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid BeliefSQL insertinto BELIEF ‘Alice’ Sightings values(‘s2’,‘Alice’,‘Crow’,’06-14-08’,‘Lake Placid’) selectU2.name, S1.species, S2.species fromUsers as U, BELIEF ‘Alice’ Sightings as S1, BELIEF U.uid Sightings as S2, whereS1.sid = S2.sid andS1.species <> S2.species Q: Who believes something different than Alice and what? A: {(‘Bob’, ‘Crow’, ‘Raven’)} I: Alice believes that she saw a crow. insertinto BELIEF ‘Bob’ Sightings values(‘s2’,‘Alice’,‘Raven’,’06-14-08’,‘Lake Placid’) I: Bob believes that she actually saw a raven.

7 Alice Bob 7 2. Open world assumption Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid Carol Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid s2AliceRaven06-14-08Lake Placid − − D2: Model incomplete knowledge with exlicit negative beliefs Adapted key constraints !

8 Alice Bob 8 2. Open world assumption Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid Carol Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid s2AliceRaven06-14-08Lake Placid − − I: Carol does not believe that Alice saw a crow nor a raven. insertinto BELIEF ‘Carol’ not Sightings values(‘s2’,‘Alice’,‘Crow’,’06-14-08’,‘Lake Placid’) insertinto BELIEF ‘Carol’ not Sightings values(‘s2’,‘Alice’,‘Raven’,’06-14-08’,‘Lake Placid’)

9 Alice Bob 9 2. Open world assumption Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid Carol Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid s2AliceRaven06-14-08Lake Placid − − Q: Who disagrees with a sighting from ‘06-14-08’ that Alice believes? A: {(‘Bob’, ‘Crow’), (‘Carol’, ‘Crow’)} selectU.name, S1.species fromUsers as U, BELIEF ‘Alice’ Sightings as S1, BELIEF U.uid not Sightings as S2 whereS1.sid = S2.sid andS1.uid = S2.uid andS1.species = S2.species andS1.date = ‘06-14-08’ andS2.date = ‘06-14-08’ andS1.location = S2.location

10 Bob Alice Bob 10 3. Higher-order beliefs Ccidcommentsid c1purple-black featherss2 Ccidcommentsid c1plain black featherss2 Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid D3: Beliefs about other user’s beliefs: allow discussion between users

11 Bob Alice Bob 11 3. Higher-order beliefs Ccidcommentsid c1purple-black featherss2 Ccidcommentsid c1plain black featherss2 Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid I: According to Bob, Alice believes that the feathers of the sighted animal were plain black. insertinto BELIEF ‘Bob’ BELIEF ‘Alice’ Comments values(‘c1’, ‘plain black feathers’, ‘s2’)

12 Bob Alice Bob 12 3. Higher-order beliefs Ccidcommentsid c1purple-black featherss2 Ccidcommentsid c1plain black featherss2 Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid selectC1.cid, C1.comment fromBELIEF ‘Bob’ BELIEF ‘Alice’ Comments as C1, BELIEF ‘Bob’ not Comments as C2 whereC1.cid = C2.cid andC1.comment = C2.comment andC1.sid = C2.sid Q: Which comments does Alice believe according to Bob, which he does not believe himself? A: {(‘c1’,‘plain-black feathers’)}

13 Bob Alice Bob 13 3. Higher-order beliefs Ccidcommentsid c1purple-black featherss2 Ccidcommentsid c1plain black featherss2 Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid selectU.name, C1.sid, C1.comment fromUsers as U, BELIEF U.uid BELIEF ‘Alice’ Comments as C1, BELIEF U.uid not Comments as C2 whereC1.cid = C2.cid andC1.comment = C2.comment andC1.sid = C2.sid Q: Which comments does Alice believe according to somebody, which (s)he does not believe themself? A: {(‘Bob’, ‘c1’, ‘plain-black feathers’)}

14 Ccidcommentsid c1purple-black featherss2 Bob Alice Bob Ccidcommentsid c1plain black featherss2 Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid 14 4. Message board assumption Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid D4: Default assumption: models a trusting attitude & avoids repeated inserts

15 15 4. Message board assumption Alice Bob Alice Ccidcommentsid c1purple-black featherss2 Ccidcommentsid c1plain black featherss2 Ssiduidspeciesdatelocation s2AliceRaven06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid Ssiduidspeciesdatelocation s2AliceCrow06-14-08Lake Placid Q: Which animal sightings does Alice believe according to Bob, which he does not believe himself? selectS1.sid, S1.species fromBELIEF ‘Bob’ BELIEF ‘Alice’ Sightings as S1, BELIEF ‘Bob’ not Sightings as S2 whereS1.sid = S2.sid andS1.uid = S2.uid andS1.species = S2.species andS1.date = S2.date andS1.location = S2.location A: {(‘s2’, ‘Crow’)}

16 16 What we have seen so far 4 Design decisions for Belief Database model –Distinct belief worlds –Open world assumption (OWA) –Higher-order beliefs –Message board assumption BeliefSQL –SQL + ‘BELIEF’ (+ ‘not’)

17 17 Agenda Motivating example Logic foundations Relational implementation Discussion

18 Bob  Alice Bob 18 Logic foundations: Belief statements Carol Alice Carol insertinto BELIEF ‘Alice’ S values(‘s2’, ‘Alice’, ‘Crow’,…) i: ☐ Alice S + (‘s2’,‘Alice’,‘Crow’,…) belief statement  = ☐ w t s relational tuple (t) sign (s) modal operator & belief path (w) Bob Carol Alice Bob … … … … … … Alice ε Belief database D = {  1, …,  n } Alice Ssiduidspecies… s2AliceCrow… “annotation of ground tuple”

19 19 Logic foundations: Entailment Carol Alice Ssiduidspecies… s2AliceCrow… Bob Carol Alice Bob … … … … … ε  1 = ☐ Alice S + (…‘Crow’,…) Bob Ssiduidspecies… s2AliceCrow… Alice Bob Alice … select* fromBELIEF ‘Bob’ BELIEF ‘Alice’ S D ☐ Bob  Alice S + (…‘Crow’,…) Bob  Alice Alice One belief annotation: More than one entailed belief: D = {  1 }

20 20 Logic foundations: Message board assumption If D ☐ w t s Message board assumption then D ☐ u  w t s and ☐ u  w t s consistent with D  : ☐ u  ☐u ☐u  Default logic D Explicit beliefs (annotations) D Entailed beliefs (extension) D \ D Implicit beliefs (assumptions) non-monotonic reasoning ! belief database “contains” more than the explicit belief annotations !

21 21 “Semi-formal” problem statement i 1 :  1 i 2 :  2... i n :  n Belief statements Message board assumption  : ☐ u  ☐u ☐u  INPUTOUTPUT Adapted key constraints D  ? D ☐ w 1 … w d R + (x 1,…x l ) ? Belief Conjunctive Queries (BCQ) q(x) :− ☐ w R i + (x i ) q(x) :− ☐ w 1 R 1 s 1 (x 1 ), …, ☐ w g R g s g (x g )

22 22 Agenda Motivating example Logic foundations Relational implementation Discussion

23 { s1 1 −,s1 2 −,s2 2 +,c2 2 + } { s1 1 +,s2 1 +,c1 1 +,c2 1 + } {s1 1 + } {s1 1 +,s2 1 +,c1 1 + } 23 Canonical Kripke structure i 1 : s1 1 + i 2 : ☐ Bob s1 1 − i 3 : ☐ Bob s1 2 − i 4 : ☐ Alice s2 1 + i 5 : ☐ Alice c1 1 + i 6 : ☐ Bob s2 2 + i 7 : ☐ Bob  Alice c2 1 + i 8 : ☐ Bob c2 2 + Belief statements* Message board assumption  : ☐ i  ☐i ☐i  Alice Bob Carol Bob Carol Alice #1 #0 #2 * Running example from the paper Carol #3

24 24 Relational representation Comments_INTERNAL tidcidcommentsid c1.1c1found featherss2 c2.1c2plain black featherss2 c2.2c2purple-black featherss2 Sightings_INTERNAL tidsiduidspeciesdatelocation s1.1s1CarolBald eagle06-14-08Lake Forest s1.2s1CarolFish eagle06-14-08Lake Forest s2.1s2AliceCrow06-14-08Lake Placid s2.2s2AliceRaven06-14-08Lake Placid Sightings_V widtidsidse #0s1.1s1+y #1s1.1s1+n #1s2.1s2+y #2s1.1s1−y #2s1.2s1−y #2s2.2s2+y #3s1.1s1+n #3s2.1s2+n Comments_V wdtidcidse #1c1.1c1+y #2c2.2c2+y #3c1.1c1+n #3c2.1c2+y E wid1uidwid2 #0Alice#1 #0Bob#2 #0Carol#0 #1Bob#2 #1Carol#0 #2Alice#3 #2Carol#0 #3Bob#2 #3Carol#0 D widd #00 #11 #21 #32 S wid1wid2 #1#0 #2#0 #3#1

25 25 Example Translation of a Belief CQ (BCQ) BeliefSQL selectU.name, S1.species fromUsers as U, BELIEF ‘Alice’ Sightings as S1, BELIEF U.uid not Sightings as S2 whereS1.sid = S2.sid andS1.uid = S2.uid andS1.species = S2.species andS1.date = ‘06-14-08’ andS2.date = ‘06-14-08’ andS1.location = S2.location Q: Who disagrees with a sighting from ’06-14-08’ that Alice believes? select E1.uid as uid1, V.tid, V.sid, R.uid, R.species, R.date, R.location, V.s into T2 from E as E1, Sightings_V as V, Sightings_STAR as R where E1.wid1=0 and V.wid=E1.wid2 and V.tid=R.tid and E1.uid='1'; select E1.uid as uid1, V.tid, V.sid, R.uid, R.species, R.date, R.location, V.s into T1 from E as E1, Sightings_V as V, Sightings_STAR as R where E1.wid1=0 and V.wid=E1.wid2 and V.tid=R.tid; select T1.uid1, T2.species from T1 as T1, T2 as T2 where T1.sid=T2.sid and ((T1.s=0 and T1.uid=T2.uid and T1.species=T2.species and T1.date='6-14-08' and T1.location=T2.location) or (T1.s=1 and (T1.uid<>T2.uid or T1.species<>T2.species or T1.date<>'6-14-08' or T1.location<>T2.location))) and T2.s=1 and T2.date='6-14-08'; drop table T2; drop table T1; Translation into SQL q(x,y) :− ☐ Alice S + (u,v,y,‘06-14-08’,z), ☐ x S − (u,v,y,‘06-14-08’,z)

26 26 Agenda Motivating example Logic foundations Relational implementation Discussion

27 27 Experiments Relative overhead ρ := |R*| n ρ = O(m d max ) m … #users d max … maximum depth of belief annotation In theory: e.g. 100 users, max. depth 2 Experiments: ρ  10,000 ρ  21 – 1,009 Size not limitation of semantics, but of relational implementation! Size Time Depends on type of query (3 types in paper) Experiments on 10,000 annotations (ρ =22.4): Considerable speed-up to come! Q1: ~0.1 s Q2: ~0.4 s Q3: ~4.5 s

28 28 Inspirations and related work (excerpt) Annotations –Buneman et al. [ICDT 2001 / ICDT 2007] –Bhagwat et al. [VLDBJ 2005], Geerts et al. [ICDE 2006] –Srivastava & Velegrakis [SIGMOD 2007] Modal logic –Fagin et al. [1995] –Calvanese et al. [IS 2008] –Nguyen [LJ-IGPL 2008] Uncertain / incomplete information –Sarma et al. [ICDE 2006] –Green & Tannen [IEEE Data Eng. 2006] –Dalvi & Suciu [PODS 2007] Inconsistency / key violations –Arenas et al. [PODS 1999] –Fuxman et al. [SIGMOD 2005] Peer-to-peer computing / collaborative data sharing –Bernstein et al. [WebDB 2002] –Ives et al. [SIGMOD record 2008]

29 29 Conclusions Proposed BELIEF databases –Goal: manage, curate inconsistent data Implementation –Logical foundations –Relational translation Current work –making it compact and fast

30 30 BACKUP

31 31 Relative overhead of relational representation Distribution of belief path depths (Pr[k=x])

32 32 Query types and execution times

33 33 Belief Conjunctive Queries (BCQ)

34 34 Revisiting the semantics / the user BELIEF ’Alice’ (…,’eagle’,…) -> ’Alice’ASSERTS (…,’eagle’,…) BELIEF ’Bob’ BELIEF ’Alice’ (…,’black feathers’,…) -> ’Bob’SUGGESTS that the ASSUMPTION (…,’black feathers’,…) has led ‘Alice’ to her original observation Standard relational model Conflicts in belief worlds: OWA, keys, ML, DA -> Structured discourse (1) SQL (2) BeliefSQL (3) ?


Download ppt "Believe It or Not – Adding belief annotations to databases Wolfgang Gatterbauer, Magda Balazinska, Nodira Khoussainova, and Dan Suciu University of Washington."

Similar presentations


Ads by Google