More About English Query Domains

A domain is a collection of information about the database objects and the semantic objects in a Microsoft English Query application. Initially, English Query knows about English and how to generate SQL, but it does not know anything about your database. In particular, it does not know how to connect its knowledge of English with specific elements of the database. For example, the system knows the word “employees” and knows that employees are people and that they typically work for someone or something, but it does not know whether your database contains employees, and if so, what object in the database represents employees.

Consequently, English Query must be “taught” about the structure of your database and how objects within the database correspond to questions in English. A similar process would be required, for example, when hiring a new SQL developer. Knowing English, this programmer could understand the request “How many customers ordered books last month?” but would be unable to translate the request into SQL until learning something about your database design and how that design corresponds to the concepts present in the question. In particular, the programmer (and similarly, English Query) would need to know which table contains customers, which table contains products, which field contains the names of the products, how the customers and products are related, and numerous other details about how the orders are stored in the database. The collection of all of this information is known as the domain. When domain knowledge is compiled, you’ve created an English Query application.

Domain Objects

There are two basic types of information English Query needs from the domain before it can translate English requests into SQL:

Most of this information can be read automatically from the database system tables.

An entity is an object, referred to by a noun (person, place, thing, or idea). For example, people, cities, products, shipments, and political affiliation are all entities. In English Query applications, important entities are typically represented by tables and are known as major entities. For example, Salespeople and Customers are important entities associated with the Salespeople and Customers tables, respectively. Sometimes entities are represented by fields. In this case, they are known as minor entities. For example, in a Salespeople table, there may be a Branch field. The corresponding branch entity is important for answering questions about branches, but it is not associated with its own table. The least important entities are known as traits and are associated with fields as well. For example, the height of a building, the blood type of a person, and the name of a movie are all traits.

English Query needs information about the relationships between entities, what those entities have to do with one another. Entity relationships can be described in English as concise statements, for example, customers purchase products or people have ages. Each relationship has one or more phrasings. A phrasing is a way of expressing a relationship in English. For example, salespeople sell products to customers and customers buy products from salespeople are two phrasings that express the same underlying relationship.


(c) 1996-1998 Microsoft Corporation. All Rights Reserved.