Skip to end of metadata
Go to start of metadata

Query Descriptions

To keep query descriptions as data model agnostic as possible, they will be described from the abstraction level of the application domain. Query descriptions will take the following structure.

Query Description Structure

Summary textual description of the query

  • Description
    • Textual format - plain English
    • Detailed description of the query
  • Parameter
    • List of input parameters
  • Result
    • Formal format - see ???
    • Description explaining expected content and format of the query result
  • Functionality
    • Textual functional description of the query, from the abstraction level of the database (not the application domain)
  • Relevance
    • Textual description - plain English
    • Reasoning for including this query in the workload
    • Description of Choke Points targeted by the query (possibly external reference to ???)

Result Description Syntax

NameRuleExampleExample Description
Entity
  • One word (or multiple words appended together)
  • Uppercase first character
  • Each appended word has uppercase first character

FamousPerson

Entity of type "FamousPerson"
Relationship
  • One word (or multiple words appended together)
  • Lower case first character
  • Each appended word has uppercase first character
  • Surrounded by "arrow" to communicate direction

-worksAt->

Directed relationship of type "worksAt"
Attribute
  • One word (or multiple words appended together)
  • Lower case first character
  • Each appended word has uppercase first character
  • May apply to either Entity or Relationship
  • Dereferenced by a "." prefix

.firstName

Attribute with name "firstName"
Unordered Set
  • Surrounded by "{}"
  • Unordered
  • May have duplicates
{FamousPerson.firstName}Unordered set of all unique "firstName" values belonging to "FamousPerson" entities
Unordered Collection
  • Surrounded by "()"
  • Unordered
  • May have duplicates
(FamousPerson.firstName)List of all "firstName" values belonging to "FamousPerson" entities
Ordered Collection
  • Surrounded by "[]"
  • Ordered
  • May have duplicates
[FamousPerson.firstName]Ordered list of all "firstName" values belonging to "FamousPerson" entities

 

Query Description Example

Simple Person Search

  • Description
    • Given a person’s first name, return up to 10 people with the same first name sorted by last name. Persons are returned (e.g. as for a search page with top 10 shown), and the information is complemented with summaries of the persons' workplaces and places of study.
  • Parameter
    • firstName
  • Result (for each result return)
    • Person.firstName
    • Person.lastName
    • Person.birthday
    • Person.creationDate
    • Person.gender
    • Person.language
    • Person.browserUsed
    • Person.locationIP
    • (Person.email)
    • (Person.language)
    • Person-isLocatedIn->Location.name
    • (Person-studyAt->University.name,
       Person-studyAt->.classYear,
       Person-studyAt->University-isLocatedIn->Country.name)
    • (Person-workAt->Company.name,
       Person-workAt->.workFrom,
       Person-workAt->Company-isLocatedIn->Country.name)
  • Functionality
    • Simple lookup query 
  • Relevance
    • Choke Points: CP1.7 CP2.3 CP7.1
    • The optimizer is expected not to get stuck in comparing different permutations of single valued attributes, all will be fetched, order does not matter.
    • The optimizer is expected to place the functionally dependent (on the person) scalar subqueries  after the top k, as these do not enter into the sort and do not change cardinality.
    • The literals should be translated from internal representation after the top k order by.
    • Interesting mostly for throughput.
  • No labels