On Tue, 3 Mar 2009, inZania wrote: > The situation is this: there are two tables, one called "objects" (fields: > object_id[int] and object_name) and properties (fields: object_id[int] and > property_name and score[int]). Objects have one or more properties.
Why have the ID columns? If each Object_name and Property_name is unique, they don't need a surrogate/artificial integer primary key. I'm not trying to sound pompous, but your schema may be causing your difficulties in writing quick running queries. > For example, I might look for the object_id of an object who has the > property "green" scored above 3, the property "hot" scored below 2, and the > property "bright" scored above 0. It might have other properties, too, but > it must have these 3. Can an object also have the properties of "yellow," "cool," and "dull?" If you are concerned with query running times it's often good to look at the DDL and see if it's as efficient as can be. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users