Guided Interaction:Rethinking the Query-Result Paradigm                                  Arnab Nandi                      ...
Overview         Interact           Optimize          Execute          Intent    Query        Query Plan             Resul...
Outline•• Motivating Example•• Challenges•• Guided Interaction
Outline•• Motivating Example•• Challenges•• Guided Interaction
Motivating Example•• Alex and Bob meet a Senior Manager  •• Forget name, need to look up contact info.  •• All they rememb...
Motivating Example: Naïve Alex•• Visits corporate social network website        1. Browses all the ““advanced search”” for...
Motivating Example: Expert Bob•• Opens up SQL Console to employee DB    1. SHOW TABLES; // reads……    2. DESC TABLES; // r...
Motivating Example•• Both users spent more time   constructing and issuing sub queries•• Issued redundant / wrong queries•...
Outline•• Motivating Example•• Challenges•• Guided Interaction
Outline•• Motivating Example•• Challenges  ••   User’’s lack of Knowledge  ••   Dependency of Information  ••   Iterative ...
ChallengesLack of Knowledge•• Both users didn’’t know about the   •• Schema   •• Data•• Naïve user Alex did not know about...
ChallengesDependency of Information             3. Realizes you can’’t drill down by seniority                 - There isn...
ChallengesDependency of Information•• Finding out what age ““Senior”” meant   required a secondary query•• Cannot really w...
ChallengesIterative & Incremental Querying•• Observation: Users construct queries by rst   executing smaller parts   •• C...
ChallengesImprecise Query Intent••   SELECT emp.project, COUNT(*) AS c, AVG(emp.age) AS a     FROM emp JOIN dept ON (emp.d...
Challenges•• Our example was a simple one•• Challenges become much harder with   complex needs  •• n-way JOINs, Nested que...
Solutions so far•• Application-level   •• Slick UIs, customized to use case•• No principled approach to solving overall us...
Outline•• Motivating Example•• Challenges•• Guided Interaction
Guided Interaction•• Principled Approach to solving these problems•• More holistic thinking•• To be included inside databa...
Guided Interaction•• Set of 3 design principles  •• Enumeration  •• Insights  •• Responsiveness•• Database systems that   ...
Guided InteractionEnumeration•• The database is responsible for   effectively enumerating   all possible valid interaction...
Guided InteractionEnumeration: Example•• What does an enumeration-enabled   query system look like?•• Important   •• One p...
Guided InteractionEnumeration: Example•• Consider SQL query interface   •• With Partial Query Completion•• Typing in ““em”...
Guided InteractionInsights•• The database must attempt to   surface as many insights from   the data as possible.•• Remove...
Guided InteractionInsights: Example              WHERE emp.age > 60•• Consider SQL interface with range / numeric value se...
Guided InteractionResponsiveness•• All interactions must be   instantaneous   even if inaccurate.•• Fluid data interaction...
Guided InteractionResponsiveness: Example•• SQL query interface, Partial Query Completion•• Need to deliver results in <10...
Summary•• Shortcomings in the Query-Result Model  •• Challenges•• Proposed Solution: Guided Interaction  •• Enumeration  •...
Thanks! Questions?Join me at theOSU DatabaseGroup!                 http://arnab.org
Upcoming SlideShare
Loading in …5
×

Guided Interaction: Rethinking the Query-Result Paradigm

7,870 views
7,840 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
7,870
On SlideShare
0
From Embeds
0
Number of Embeds
6,969
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Guided Interaction: Rethinking the Query-Result Paradigm

  1. 1. Guided Interaction:Rethinking the Query-Result Paradigm Arnab Nandi H.V. Jagadish University of Michigan, Ann Arbor
  2. 2. Overview Interact Optimize Execute Intent Query Query Plan Result•• Databases have become really fast / efcient in going from query to result•• But does that solve the overall user need?
  3. 3. Outline•• Motivating Example•• Challenges•• Guided Interaction
  4. 4. Outline•• Motivating Example•• Challenges•• Guided Interaction
  5. 5. Motivating Example•• Alex and Bob meet a Senior Manager •• Forget name, need to look up contact info. •• All they remember: manager of small group of senior researchers
  6. 6. Motivating Example: Naïve Alex•• Visits corporate social network website 1. Browses all the ““advanced search”” forms 2. Uses Faceted Search interface to naively query for everyone in the company 3. Realizes you can’’t drill down by seniority - There isn’’t a ““seniority”” eld, but age…… 4. Goes back to ““Birthday Search”” form - Figures out senior employees are ~50 5. Adds age range, drills further, nds person
  7. 7. Motivating Example: Expert Bob•• Opens up SQL Console to employee DB 1. SHOW TABLES; // reads…… 2. DESC TABLES; // reads more…… 3. SELECT emp.project, COUNT(*) AS c, AVG(emp.age) AS a FROM emp JOIN dept ON (emp.deptID = dept.ID) GROUP BY emp.project ORDER BY c ASC, a DESC LIMIT 3 4. SELECT emp.name,emp.cubicleID FROM emp JOIN dept ON (emp.deptID = dept.ID) WHERE dept.name=‘‘Research’’ AND emp.project=’’DatabasePrj’’ AND emp.designation=’’Manager’’
  8. 8. Motivating Example•• Both users spent more time constructing and issuing sub queries•• Issued redundant / wrong queries•• On standard server, most queries take < 1 min •• Session takes several minutes –– hour!•• Most time was spent in constructing the right query
  9. 9. Outline•• Motivating Example•• Challenges•• Guided Interaction
  10. 10. Outline•• Motivating Example•• Challenges •• User’’s lack of Knowledge •• Dependency of Information •• Iterative and Incremental Querying •• Imprecise User Query Intent•• Guided Interaction
  11. 11. ChallengesLack of Knowledge•• Both users didn’’t know about the •• Schema •• Data•• Naïve user Alex did not know about •• Query Language either•• All 3 are needed to effectively issue queries•• Otherwise, most time is spent issuing trial-and-error queries to learn more about the DB
  12. 12. ChallengesDependency of Information 3. Realizes you can’’t drill down by seniority - There isn’’t a ““seniority”” eld, but age…… 4. Goes back to ““Birthday Search”” form - Figures out senior employees are ~50SELECT emp.project, COUNT(*) AS c, AVG(emp.age) AS aFROM emp JOIN dept ON (emp.deptID = dept.ID)GROUP BY emp.project ORDER BY c ASC, a DESC LIMIT 3
  13. 13. ChallengesDependency of Information•• Finding out what age ““Senior”” meant required a secondary query•• Cannot really write as a subquery•• Dependency exists between nal query and intermediate query results
  14. 14. ChallengesIterative & Incremental Querying•• Observation: Users construct queries by rst executing smaller parts •• Cognitive capacity of users is limited•• Query may be declarative, but users prefer iterative / incremental construction•• Leads to a lot of requerying
  15. 15. ChallengesImprecise Query Intent•• SELECT emp.project, COUNT(*) AS c, AVG(emp.age) AS a FROM emp JOIN dept ON (emp.deptID = dept.ID) GROUP BY emp.project ORDER BY c ASC, a DESC LIMIT 3•• DB Expert Bob was looking for some notion of ““group”” of small people•• Hard to translate imprecise intents unless we’’re aware of data•• Only solution is to execute and see if answer worked
  16. 16. Challenges•• Our example was a simple one•• Challenges become much harder with complex needs •• n-way JOINs, Nested queries, complex aggregates……•• Any database use-case with a human in the loop will face these problems
  17. 17. Solutions so far•• Application-level •• Slick UIs, customized to use case•• No principled approach to solving overall user needs •• Where are my standardized operators for overall data interaction? •• Set of rules I can follow when building such a system?•• Related work: •• QBE, VizQL(Tableau), AQUA, CONTROL, Telegraph and more •• Solve thin slices of the overall problem
  18. 18. Outline•• Motivating Example•• Challenges•• Guided Interaction
  19. 19. Guided Interaction•• Principled Approach to solving these problems•• More holistic thinking•• To be included inside database Interact Interact Optimize Execute Intent Query Query Plan Result
  20. 20. Guided Interaction•• Set of 3 design principles •• Enumeration •• Insights •• Responsiveness•• Database systems that keep these in mind can avoid the challenges discussed
  21. 21. Guided InteractionEnumeration•• The database is responsible for effectively enumerating all possible valid interactions with the data.•• Removes burden of schema / data / language knowledge off the user
  22. 22. Guided InteractionEnumeration: Example•• What does an enumeration-enabled query system look like?•• Important •• One possible implementation •• Focus on the concepts, not the idea! •• Portray simple use case •• Can have many, far more complex systems built using these principles
  23. 23. Guided InteractionEnumeration: Example•• Consider SQL query interface •• With Partial Query Completion•• Typing in ““em”” has exposed projection, join, and selection options.
  24. 24. Guided InteractionInsights•• The database must attempt to surface as many insights from the data as possible.•• Removes informational dependencies•• Aids expression of query intent•• Note: Should not overwhelm the user
  25. 25. Guided InteractionInsights: Example WHERE emp.age > 60•• Consider SQL interface with range / numeric value selection•• Visual / interactive feedback saves dependent query•• Does my DB let me build something like this?
  26. 26. Guided InteractionResponsiveness•• All interactions must be instantaneous even if inaccurate.•• Fluid data interaction is key to getting insights•• Tradeoff accuracy for near-instantaneous responses (i.e. <100ms*)
  27. 27. Guided InteractionResponsiveness: Example•• SQL query interface, Partial Query Completion•• Need to deliver results in <100ms
  28. 28. Summary•• Shortcomings in the Query-Result Model •• Challenges•• Proposed Solution: Guided Interaction •• Enumeration •• Insights •• Responsiveness•• Designing DBs that abide by these principles overcomes these shortcomings •• Many fundamental building blocks already exist
  29. 29. Thanks! Questions?Join me at theOSU DatabaseGroup! http://arnab.org

×