The selected records may then be analyzed to generate statistics characterizing the complete set of records in the database. In order to ensure that the resulting statistics accurately characterize the database, stratified sampling techniques may be used. In stratified sampling, the database records are separated into sub-groups or 'strata,' and one or more records are then randomly selected from each of the sub-groups for analysis.