A method for generating an approximate answer to a query in a database environment
in which the database has a plurality of base relations. A query relating to a
database is received, and an approximate answer to the query is generated such
that the approximate answer is based on at least one join synopsis formed from
the database. The method further includes steps of forming a sample-tuple set for
at least one selected base relation of a plurality of base relations of a database
such that each sample-tuple set contains at least one sample tuple from a corresponding
base relation, and forming a join synopsis set for each selected base relation
such that each join synopsis set contains a join synopsis for each sample tuple
in a sample-tuple set. A join synopsis of a sample tuple is based on a join of
the sample tuple and at least one descendent relation of the sample tuple. All
join synopsis sets form a statistical summary of the database and are stored.