SlideShare une entreprise Scribd logo
1  sur  57
Computing Full Disjunctions Yaron Kanza Yehoshua Sagiv The Selim and Rachel Benin School of Engineering  and Computer Science  The Hebrew University of Jerusalem
Overview of the Talk ,[object Object],[object Object],[object Object],[object Object],[object Object]
Querying Incomplete Data  Requires a Special Semantics  ,[object Object],[object Object],[object Object],[object Object]
Querying Incomplete  Semistructured Data ,[object Object],[object Object]
In the Semistructured Data Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody   Allen title year acted in acted in A Semistructured Database About Movies
v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A Query Under complete semantics, the query returns actor-movie pairs, such that the actor played in the movie and was also the director of the movie
1 2 4 5 6 title language 7 3 year 8 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A complete matching of the query variables  to database objects director 1 2 5 6 4 10 11
Constraints on Complete Matchings Query Root Database Root ,[object Object],[object Object],[object Object],r 1 x y 9 11 l l
language 1 2 4 5 title 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody   Allen title year acted in acted in Suppose that  Node 6 is missing 6 English language 6 English
1 2 4 5 title 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language An incomplete  matching This matching is maximal 1 2 5 4 10 11 w 2 null
The Reachability Constraint on Partial Matchings ,[object Object],Database 1 x z w y l 1 r v l 3 l 2 l 5 l 4 l 6 v Query x z r l 2 l 4 l 6 7 9 1 l 2 l 4 l 6 w y l 1 r v l 3 l 5 v 1 55 5 8 l 1 1 l 3 l 5 55
Weak Satisfaction of Edge Constraints ,[object Object],[object Object],[object Object],x y 9 11 l l x y 9 11 l m x y 9 11 l m null null x y l null null
Weak Matchings ,[object Object],[object Object],[object Object],[object Object]
1 2 4 5 title 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A weak matching w 2 1 2 5 4 10 11 null
1 2 4 5 title 7 3 year 8 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody   Allen title year acted in acted in A Movie Database Consider the case where  the director edge is missing director director
1 2 4 5 title 7 3 year 8 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language An incomplete matching that is not  a weak matching w 2 1 2 5 4 10 11 null There is an edge that is  not weakly satisfied
OR Matchings ,[object Object],[object Object],[object Object],Differently from a weak matching, in an  OR Matching,  an edge constraint does not  have to be weakly satisfied
Maximal Matchings ,[object Object],[object Object],[object Object],[object Object],t 1 =(1, 5, 2, null) t 2 =(1, null, 2, null)
More Examples
1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody   Allen title year acted in acted in The Movie Database Before the Removals
1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A complete  matching It is also a maximal  weak matching It is also a maximal OR-matching In the result,  the actor must be both an actor in the movie  and the director of the movie 1 2 5 6 4 10 11
1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A second maximal weak matching In the result, if the actor and the movie are assigned non-null values, then the actor must be both an actor in the movie  and  the director of the movie 1 8 3 null null null null
1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A maximal OR-matching In the result,  the actor either played in the movie, directed the movie,  or  is not related at all to the movie 1 8 3 4 10 11 null It is not a weak matching
Complexity of Evaluating Maximal Weak Matchings and Maximal OR Matchings
Data Complexity ,[object Object],[object Object]
Two Alternatives for Query Evaluation ,[object Object],[object Object],[object Object]
Input-Output Complexity ,[object Object],[object Object],[object Object],[object Object]
A Naïve Algorithm vs. A Better Algorithm ,[object Object],[object Object],[object Object]
Cyclic Queries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Full Disjunctions What is the full disjunction of a set of relations? How are full disjunctions related to queries with incomplete answers ?
Movies Actors Acted-in Actors-that-Directed The Full Disjunction of the Given Relations English 1998 Armageddon 3 English 1940 Fantasia 4 English 1998 Antz 2 English 1983 Zelig 1 language year title m-id 19/3/1955 Bruce Willis 2 28/10/1967 Julia Roberts 3 1/12/1935 Woody Allen 1 date-of-birth name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id 1 1 m-id a-id Harry 19/3/1955 Bruce Willis 2 English 1998 Armageddon 3     English 1940 Fantasia 4  Z Zelig role 28/10/1967 1/12/1935 1/12/1935 Date-of-birth Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id     English 1998 Antz 2 English 1983 Zelig 1 language year title m-id
The Full Disjunction of the Given Relations The full disjunction does not include subsumed tuples Movies Harry 19/3/1955 Bruce Willis 2 English 1998 Armageddon 3     English 1940 Fantasia 4  Z Zelig role 28/10/1967 1/12/1935 1/12/1935 Date-of-birth Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id     English 1998 Antz 2 English 1983 Zelig 1 language year title m-id  role  Date-of-birth  name  a-id English 1983 Zelig 1 language year title m-id English 1998 Armageddon 3 English 1940 Fantasia 4 English 1998 Antz 2 English 1983 Zelig 1 language year title m-id This tuple will not be in the full disjunction
Movies Actors Acted-in Actors-that-Directed The Full Disjunction of the Given Relations The full disjunction does not include tuples that are based  on Cartesian Product rather than join English 1998 Armageddon 3 English 1940 Fantasia 4 English 1998 Antz 2 English 1983 Zelig 1 language year title m-id 19/3/1955 Bruce Willis 2 28/10/1967 Julia Roberts 3 1/12/1935 Woody Allen 1 date-of-birth name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id 1 1 m-id a-id Harry 19/3/1955 Bruce Willis 2 English 1998 Armageddon 3     English 1940 Fantasia 4  Z Zelig role 28/10/1967 1/12/1935 1/12/1935 Date-of-birth Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id     English 1998 Antz 2 English 1983 Zelig 1 language year title m-id  role 28/10/1967 Date-of-birth Julia Roberts name 3 a-id English 1940 Fantasia 4 language year title m-id
In the Full Disjunction of a Given Set of Relations: Every tuple of the input is a part of at least one tuple of the output Tuples are joined as in a natural join, padded with null values  The result includes only “ maximal connected portions”
Motivation for Full Disjunctions ,[object Object],[object Object]
Computing Full Disjunctions for  γ -acyclic Relation Schemas ,[object Object],[object Object]
Weak Semantics Generalizes Full Disjunctions ,[object Object],[object Object]
Example Movies Actors Acted-in A node is created for each tuple Edges are added between connected tuples, in both directions A root is added, and edges are added from the root to every node Creating The Database We use colors instead of labels Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id r
Movies Actors Acted-in Creating The Queries Example A node is created for each relation schema Edges are added between connected schemas, in both directions r The number of queries is equal to the number of schemas In each query, the root is connected to a different schema Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Movies Actors Acted-in r
Queries are Evaluated under  Weak Semantics Movies Actors Acted-in Example r Movies Actors Acted-in r Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Zelig role Woody Allen name 1 a-id Zelig 1 title m-id role name a-id title m-id
Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under  Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Zelig role Woody Allen name 1 a-id Zelig 1 title m-id Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id
Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under  Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Zelig role Woody Allen name 1 a-id Zelig 1 title m-id Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id
Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under  Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3  Z Zelig role Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id   Antz 2 Zelig 1 title m-id null null
Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under  Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3  Z Zelig role Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id   Antz 2 Zelig 1 title m-id
Movies Actors Acted-in Example r Movies Actors Acted-in r Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3  Z Zelig role Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id   Antz 2 Zelig 1 title m-id null null Harry Bruce Willis 2 Armageddon 3  Julia Roberts 3    Z Zelig role  Woody Allen Woody Allen name  1 1 a-id Fantasia 4 Antz 2 Zelig 1 title m-id
The Algorithm Computes Full Disjunctions in Polynomial Time Under Input-Output Complexity Theorem:  The full disjunction of relations  r 1 , …, r n  can be computed in  O ( n 5 s   2 f  2 ) time,  where  n  is the number of relations,  s  is the  total size of all the relations and  f  is the size  of the result
Generalizing Full Disjunctions ,[object Object],[object Object]
Example Movies ( m-id , title, year, language, location) Actors ( a-id , name, date-of-birth) Acted-in (a-id, m-id, role) Actors-that-Directed (a-id, m-id) Historical-Events ( name , date, description) Historical-Sites (Country, State, City, Site) The date of the historical event is a date in the year when the movie was released The filming location is near the historical site
The General Idea ,[object Object],[object Object],[object Object],[object Object]
Another Way of Generalizing Full Disjunctions: Use OR-Semantics   ,[object Object],[object Object],[object Object]
Employees (e-id, ename, city, dept-no) Departments (dept-no, dname, building) Located-in (building, city, street) Example The Full Disjunction Employee: (007, James Bond, London, 6) Department:  (6, MI-6, 10) Located-in: (10, Liverpool, King) 10  building Liverpool  city 10 10 building 6 6 dept -no King MI-6      MI-6 6 London James Bond 007 street dname dept -no city ename e-id
Employees (e-id, ename, city, dept-no) Departments (dept-no, dname, building) Located-in (building, city, street) Example The Full Disjunction under OR-Semantics Employee: (007, James Bond, London, 6) Department:  (6, MI-6, 10) Located-in: (10, Liverpool, King) 10 building Liverpool city 10 building 6 dept -no King MI-6 6 London James Bond 007 street dname dept -no city ename e-id
The Projection Problem :   Computing the projection of  the full disjunction on a given set of attributes The Restriction Problem :   Computing only those  tuples of the full disjunction that are non-null on a  given set of attributes Two Related Problems The projection problem and the restriction problem  cannot be computed in polynomial time (under  input-output complexity) unless P=NP
Conclusion ,[object Object],[object Object],[object Object]
Conclusion (continued) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Thank You Questions?

Contenu connexe

Dernier

CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
priyasharma62062
 
Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432
motiram463
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 

Dernier (20)

Navi Mumbai Cooperetive Housewife Call Girls-9833754194-Natural Panvel Enjoye...
Navi Mumbai Cooperetive Housewife Call Girls-9833754194-Natural Panvel Enjoye...Navi Mumbai Cooperetive Housewife Call Girls-9833754194-Natural Panvel Enjoye...
Navi Mumbai Cooperetive Housewife Call Girls-9833754194-Natural Panvel Enjoye...
 
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
 
Toronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdfToronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdf
 
Airport Road Best Experience Call Girls Number-📞📞9833754194 Santacruz MOst Es...
Airport Road Best Experience Call Girls Number-📞📞9833754194 Santacruz MOst Es...Airport Road Best Experience Call Girls Number-📞📞9833754194 Santacruz MOst Es...
Airport Road Best Experience Call Girls Number-📞📞9833754194 Santacruz MOst Es...
 
Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
 
Business Principles, Tools, and Techniques in Participating in Various Types...
Business Principles, Tools, and Techniques  in Participating in Various Types...Business Principles, Tools, and Techniques  in Participating in Various Types...
Business Principles, Tools, and Techniques in Participating in Various Types...
 
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
 
Diva-Thane European Call Girls Number-9833754194-Diva Busty Professional Call...
Diva-Thane European Call Girls Number-9833754194-Diva Busty Professional Call...Diva-Thane European Call Girls Number-9833754194-Diva Busty Professional Call...
Diva-Thane European Call Girls Number-9833754194-Diva Busty Professional Call...
 
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
 
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
 
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
 
Technology industry / Finnish economic outlook
Technology industry / Finnish economic outlookTechnology industry / Finnish economic outlook
Technology industry / Finnish economic outlook
 
W.D. Gann Theory Complete Information.pdf
W.D. Gann Theory Complete Information.pdfW.D. Gann Theory Complete Information.pdf
W.D. Gann Theory Complete Information.pdf
 
Lion One Corporate Presentation May 2024
Lion One Corporate Presentation May 2024Lion One Corporate Presentation May 2024
Lion One Corporate Presentation May 2024
 
Kopar Khairane Russian Call Girls Number-9833754194-Navi Mumbai Fantastic Unl...
Kopar Khairane Russian Call Girls Number-9833754194-Navi Mumbai Fantastic Unl...Kopar Khairane Russian Call Girls Number-9833754194-Navi Mumbai Fantastic Unl...
Kopar Khairane Russian Call Girls Number-9833754194-Navi Mumbai Fantastic Unl...
 
Q1 2024 Conference Call Presentation vF.pdf
Q1 2024 Conference Call Presentation vF.pdfQ1 2024 Conference Call Presentation vF.pdf
Q1 2024 Conference Call Presentation vF.pdf
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Pods2003

  • 1. Computing Full Disjunctions Yaron Kanza Yehoshua Sagiv The Selim and Rachel Benin School of Engineering and Computer Science The Hebrew University of Jerusalem
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. 1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in A Semistructured Database About Movies
  • 7. v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A Query Under complete semantics, the query returns actor-movie pairs, such that the actor played in the movie and was also the director of the movie
  • 8. 1 2 4 5 6 title language 7 3 year 8 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A complete matching of the query variables to database objects director 1 2 5 6 4 10 11
  • 9.
  • 10. language 1 2 4 5 title 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in Suppose that Node 6 is missing 6 English language 6 English
  • 11. 1 2 4 5 title 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language An incomplete matching This matching is maximal 1 2 5 4 10 11 w 2 null
  • 12.
  • 13.
  • 14.
  • 15. 1 2 4 5 title 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A weak matching w 2 1 2 5 4 10 11 null
  • 16. 1 2 4 5 title 7 3 year 8 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in A Movie Database Consider the case where the director edge is missing director director
  • 17. 1 2 4 5 title 7 3 year 8 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language An incomplete matching that is not a weak matching w 2 1 2 5 4 10 11 null There is an edge that is not weakly satisfied
  • 18.
  • 19.
  • 21. 1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in The Movie Database Before the Removals
  • 22. 1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A complete matching It is also a maximal weak matching It is also a maximal OR-matching In the result, the actor must be both an actor in the movie and the director of the movie 1 2 5 6 4 10 11
  • 23. 1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A second maximal weak matching In the result, if the actor and the movie are assigned non-null values, then the actor must be both an actor in the movie and the director of the movie 1 8 3 null null null null
  • 24. 1 2 4 5 6 title language 7 3 year 8 director 9 name 10 movie date of birth 11 1983 movie actor Zelig Antz 1998 English 1/12/1935 Woody Allen title year acted in acted in v 1 v 2 w 1 v 3 title actor movie director acted in w 2 w 3 w 4 date of birth name language A maximal OR-matching In the result, the actor either played in the movie, directed the movie, or is not related at all to the movie 1 8 3 4 10 11 null It is not a weak matching
  • 25. Complexity of Evaluating Maximal Weak Matchings and Maximal OR Matchings
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Full Disjunctions What is the full disjunction of a set of relations? How are full disjunctions related to queries with incomplete answers ?
  • 32. Movies Actors Acted-in Actors-that-Directed The Full Disjunction of the Given Relations English 1998 Armageddon 3 English 1940 Fantasia 4 English 1998 Antz 2 English 1983 Zelig 1 language year title m-id 19/3/1955 Bruce Willis 2 28/10/1967 Julia Roberts 3 1/12/1935 Woody Allen 1 date-of-birth name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id 1 1 m-id a-id Harry 19/3/1955 Bruce Willis 2 English 1998 Armageddon 3     English 1940 Fantasia 4  Z Zelig role 28/10/1967 1/12/1935 1/12/1935 Date-of-birth Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id     English 1998 Antz 2 English 1983 Zelig 1 language year title m-id
  • 33. The Full Disjunction of the Given Relations The full disjunction does not include subsumed tuples Movies Harry 19/3/1955 Bruce Willis 2 English 1998 Armageddon 3     English 1940 Fantasia 4  Z Zelig role 28/10/1967 1/12/1935 1/12/1935 Date-of-birth Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id     English 1998 Antz 2 English 1983 Zelig 1 language year title m-id  role  Date-of-birth  name  a-id English 1983 Zelig 1 language year title m-id English 1998 Armageddon 3 English 1940 Fantasia 4 English 1998 Antz 2 English 1983 Zelig 1 language year title m-id This tuple will not be in the full disjunction
  • 34. Movies Actors Acted-in Actors-that-Directed The Full Disjunction of the Given Relations The full disjunction does not include tuples that are based on Cartesian Product rather than join English 1998 Armageddon 3 English 1940 Fantasia 4 English 1998 Antz 2 English 1983 Zelig 1 language year title m-id 19/3/1955 Bruce Willis 2 28/10/1967 Julia Roberts 3 1/12/1935 Woody Allen 1 date-of-birth name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id 1 1 m-id a-id Harry 19/3/1955 Bruce Willis 2 English 1998 Armageddon 3     English 1940 Fantasia 4  Z Zelig role 28/10/1967 1/12/1935 1/12/1935 Date-of-birth Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id     English 1998 Antz 2 English 1983 Zelig 1 language year title m-id  role 28/10/1967 Date-of-birth Julia Roberts name 3 a-id English 1940 Fantasia 4 language year title m-id
  • 35. In the Full Disjunction of a Given Set of Relations: Every tuple of the input is a part of at least one tuple of the output Tuples are joined as in a natural join, padded with null values The result includes only “ maximal connected portions”
  • 36.
  • 37.
  • 38.
  • 39. Example Movies Actors Acted-in A node is created for each tuple Edges are added between connected tuples, in both directions A root is added, and edges are added from the root to every node Creating The Database We use colors instead of labels Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id r
  • 40. Movies Actors Acted-in Creating The Queries Example A node is created for each relation schema Edges are added between connected schemas, in both directions r The number of queries is equal to the number of schemas In each query, the root is connected to a different schema Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Movies Actors Acted-in r
  • 41. Queries are Evaluated under Weak Semantics Movies Actors Acted-in Example r Movies Actors Acted-in r Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Zelig role Woody Allen name 1 a-id Zelig 1 title m-id role name a-id title m-id
  • 42. Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Zelig role Woody Allen name 1 a-id Zelig 1 title m-id Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id
  • 43. Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Zelig role Woody Allen name 1 a-id Zelig 1 title m-id Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id
  • 44. Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3  Z Zelig role Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id   Antz 2 Zelig 1 title m-id null null
  • 45. Movies Actors Acted-in Example r Movies Actors Acted-in r Queries are Evaluated under Weak Semantics Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3  Z Zelig role Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id   Antz 2 Zelig 1 title m-id
  • 46. Movies Actors Acted-in Example r Movies Actors Acted-in r Armageddon 3 Fantasia 4 Antz 2 Zelig 1 title m-id Bruce Willis 2 Julia Roberts 3 Woody Allen 1 name a-id Z 2 1 Harry 3 2 Zelig 1 1 role m-id a-id Harry Bruce Willis 2 Armageddon 3 Z Zelig role Woody Allen Woody Allen name 1 1 a-id Antz 2 Zelig 1 title m-id Harry Bruce Willis 2 Armageddon 3  Z Zelig role Julia Roberts Woody Allen Woody Allen name 3 1 1 a-id   Antz 2 Zelig 1 title m-id null null Harry Bruce Willis 2 Armageddon 3  Julia Roberts 3    Z Zelig role  Woody Allen Woody Allen name  1 1 a-id Fantasia 4 Antz 2 Zelig 1 title m-id
  • 47. The Algorithm Computes Full Disjunctions in Polynomial Time Under Input-Output Complexity Theorem: The full disjunction of relations r 1 , …, r n can be computed in O ( n 5 s 2 f 2 ) time, where n is the number of relations, s is the total size of all the relations and f is the size of the result
  • 48.
  • 49. Example Movies ( m-id , title, year, language, location) Actors ( a-id , name, date-of-birth) Acted-in (a-id, m-id, role) Actors-that-Directed (a-id, m-id) Historical-Events ( name , date, description) Historical-Sites (Country, State, City, Site) The date of the historical event is a date in the year when the movie was released The filming location is near the historical site
  • 50.
  • 51.
  • 52. Employees (e-id, ename, city, dept-no) Departments (dept-no, dname, building) Located-in (building, city, street) Example The Full Disjunction Employee: (007, James Bond, London, 6) Department: (6, MI-6, 10) Located-in: (10, Liverpool, King) 10  building Liverpool  city 10 10 building 6 6 dept -no King MI-6      MI-6 6 London James Bond 007 street dname dept -no city ename e-id
  • 53. Employees (e-id, ename, city, dept-no) Departments (dept-no, dname, building) Located-in (building, city, street) Example The Full Disjunction under OR-Semantics Employee: (007, James Bond, London, 6) Department: (6, MI-6, 10) Located-in: (10, Liverpool, King) 10 building Liverpool city 10 building 6 dept -no King MI-6 6 London James Bond 007 street dname dept -no city ename e-id
  • 54. The Projection Problem : Computing the projection of the full disjunction on a given set of attributes The Restriction Problem : Computing only those tuples of the full disjunction that are non-null on a given set of attributes Two Related Problems The projection problem and the restriction problem cannot be computed in polynomial time (under input-output complexity) unless P=NP
  • 55.
  • 56.