1. A computer-readable storage medium storing computer-executable instructions for controlling a computing system to provide results for a query by performing a method comprising: receiving a query having a non-type query triple and a type query triple, the non-type query triple having a subject, a non-type predicate, and an object, the type query triple having a subject, a type predicate, and an object, the subjects and objects being entities; retrieving, from a fact table of triples, triples that match the non-type query triple; for each retrieved triple, when a type for an entity of the retrieved triple is specified by the query and a type table indicates that that entity is not associated with that type, indicating that the retrieved triple does not match the query; and providing as the results of the received query based on the retrieved triples except the retrieved triples that have been indicated as not matching the query.