Grouped Phrasings Examples

English Query

English Query

Grouped Phrasings Examples

Phrasings are a way to talk about a relationship in English. Choose phrasings that most closely reflect how users would ask their questions.

The following examples show when phrasings need to be grouped to correctly specify the relationship.

Example 1: Consider a database that contains information about people and their hair color. One phrasing that describes this relationship is the trait phrasing, such as people have hair color. However, this phrasing will not answer questions such as, "What is the color of John's hair?" For this, you need the phrasings people have hair and hair has color.

Note  "Hair", in this case, is an entity that is not represented by a database object.

These two phrasings collectively describe the relationship between people and hair color. In order for English Query to treat these two phrasings as one logical unit, they need to be grouped.

Example 2: You have a table containing ages, sexes, and part counts that indicates how many parts were bought by people of each age and sex. You want to ask questions such as, "How many parts did young women buy?" This is a relationship among ages, sexes, parts (an entity not represented in the database) that have quantities, and people (another entity not represented in the database).

You must group the following phrasings: people have ages (a measurement adjective phrasing); people have sexes (a dynamic adjective phrasing); and people buy parts (a verb phrasing). These three phrasings collectively describe a single relationship.

Example 3: Consider a table containing suppliers, parts, and colors. You want to answer questions such as, "Who sells green parts?". This is a single relationship among suppliers, parts, and colors. You would need the following phrasings in a group: suppliers supply parts (verb phrasing) and parts have colors (adjective phrasing). Although you might consider creating separate relationships for these two phrasings, this would not supply the correct answer. In this table, the colors of the parts are inherently dependent on who supplied them. If you were to create independent relationships for these two phrasings, then the question, "Who sells green parts," is necessarily interpreted as, "Find all of the suppliers and parts in the sales table such that the part also appears in the sales table with the color green" (in other words, "Who sells parts (in any color) that are also sold (by any supplier) in green").

Individual phrasings in a phrasing group can be used separately from the group. In the example above, a user could ask, "Who sells parts?" without referring to colors at all. However, it may not make sense to ask about some phrasings in the group without also including other required phrasings. For example, you may want the question "List the colors of the parts" to always be interpreted as "List the colors of the parts which suppliers supply." That way, the user clearly understands that colors of parts are known only in the context of suppliers supplying them. To do this, simply mark the required phrasings in the Phrasing dialog box.

Example 4: You have a table containing people and lunch times. You want to be able to ask, "What time did John eat his lunch?". This is a relationship between people, lunches (an entity not represented in the database), and lunch times. You need to group the following phrases: people have lunches (a trait phrasing) and people eat lunches at lunch times. People each lunches at lunch times is sufficient to answer, "What time did John eat lunch?". Because you also want to refer to "his lunch," you need the additional phrasing in the group.

See Also

Defining Relationship Phrasings

Expanding an English Query Model