A method to measure the data quality of a dataset including: storing, in a data storage system, at least one dataset including a plurality of records and processing, in a data processing system coupled to the data storage system, the plurality of records to produce codes (114; 316) representing data patterns in the records, the data patterns indicative of at least a population of data, the data corresponding to one or more fields included in each of the records, the processing including: for each of multiple records in the plurality of records, associating, with the record, a code (114; 316) encoding one or more data elements; wherein each data element represents a state, or property, of a corresponding field or combination of fields as one of a set of element values, and, for at least one data element of at least a first code, the number of element values in the set is smaller than the total number of data values that occur in the corresponding field, or combination of fields, over all of the plurality of records in the dataset; wherein, for at least one data element of the first code, at least two element values in the set represent a state of a field as populated, or not populated, respectively, wherein the state of not populated corresponds to a field state of "empty" or "absent" or "NULL", and wherein the state of populated corresponds to a field state of "not empty" and "not absent" and "non-NULL"; and using the at least one data pattern code to measure the data quality of the data set. storing, in a data storage system, at least one dataset including a plurality of records and processing, in a data processing system coupled to the data storage system, the plurality of records to produce codes (114; 316) representing data patterns in the records, the data patterns indicative of at least a population of data, the data corresponding to one or more fields included in each of the records, the processing including: for each of multiple records in the plurality of records, associating, with the record, a code (114; 316) encoding one or more data elements; wherein each data element represents a state, or property, of a corresponding field or combination of fields as one of a set of element values, and, for at least one data element of at least a first code, the number of element values in the set is smaller than the total number of data values that occur in the corresponding field, or combination of fields, over all of the plurality of records in the dataset; wherein, for at least one data element of the first code, at least two element values in the set represent a state of a field as populated, or not populated, respectively, wherein the state of not populated corresponds to a field state of "empty" or "absent" or "NULL", and wherein the state of populated corresponds to a field state of "not empty" and "not absent" and "non-NULL"; and using the at least one data pattern code to measure the data quality of the data set. for each of multiple records in the plurality of records, associating, with the record, a code (114; 316) encoding one or more data elements; wherein each data element represents a state, or property, of a corresponding field or combination of fields as one of a set of element values, and, for at least one data element of at least a first code, the number of element values in the set is smaller than the total number of data values that occur in the corresponding field, or combination of fields, over all of the plurality of records in the dataset; wherein, for at least one data element of the first code, at least two element values in the set represent a state of a field as populated, or not populated, respectively, wherein the state of not populated corresponds to a field state of "empty" or "absent" or "NULL", and wherein the state of populated corresponds to a field state of "not empty" and "not absent" and "non-NULL"; and using the at least one data pattern code to measure the data quality of the data set. wherein each data element represents a state, or property, of a corresponding field or combination of fields as one of a set of element values, and, for at least one data element of at least a first code, the number of element values in the set is smaller than the total number of data values that occur in the corresponding field, or combination of fields, over all of the plurality of records in the dataset; wherein, for at least one data element of the first code, at least two element values in the set represent a state of a field as populated, or not populated, respectively, wherein the state of not populated corresponds to a field state of "empty" or "absent" or "NULL", and wherein the state of populated corresponds to a field state of "not empty" and "not absent" and "non-NULL"; and using the at least one data pattern code to measure the data quality of the data set.