A method for processing related datasets, the method including: receiving over an input device or port records from multiple datasets (502, 504), the records of a given dataset having one or more values for one or more respective fields; and processing records from each of the multiple datasets (502, 504) in a data processing system, the processing including: analyzing at least one constraint specification (114, 115, 602) stored in a data storage system to determine a processing order for the multiple datasets, the constraint specification specifying one or more constraints for preserving statistical consistency among a group of related datasets that includes the multiple datasets (502, 504), applying one or more transformations to records from each of the multiple datasets (502, 504) in the determined processing order, where the transformations are applied to records from a first dataset of the multiple datasets before the transformations are applied to records from a second dataset of the multiple datasets, and the transformations applied to the records from the second dataset are applied based at least in part on results of applying the transformations to the records from the first dataset and at least one constraint between the first dataset and the second dataset specified by the constraint specification, wherein at least one constraint for preserving statistical consistency specified by the constraint specification is based on an equivalence between a field of the second dataset and a field of the first dataset, the field of the first dataset and the field of the second dataset being keys in a join operation (400, 1002, 1204), and wherein the equivalence is an association between the field of the second dataset and the field of the first dataset that represent a common entity or that comprise values of equivalent meaning, and storing or outputting results of the transformations to the records from each of the multiple datasets (502, 504). receiving over an input device or port records from multiple datasets (502, 504), the records of a given dataset having one or more values for one or more respective fields; and processing records from each of the multiple datasets (502, 504) in a data processing system, the processing including: analyzing at least one constraint specification (114, 115, 602) stored in a data storage system to determine a processing order for the multiple datasets, the constraint specification specifying one or more constraints for preserving statistical consistency among a group of related datasets that includes the multiple datasets (502, 504), applying one or more transformations to records from each of the multiple datasets (502, 504) in the determined processing order, where the transformations are applied to records from a first dataset of the multiple datasets before the transformations are applied to records from a second dataset of the multiple datasets, and the transformations applied to the records from the second dataset are applied based at least in part on results of applying the transformations to the records from the first dataset and at least one constraint between the first dataset and the second dataset specified by the constraint specification, wherein at least one constraint for preserving statistical consistency specified by the constraint specification is based on an equivalence between a field of the second dataset and a field of the first dataset, the field of the first dataset and the field of the second dataset being keys in a join operation (400, 1002, 1204), and wherein the equivalence is an association between the field of the second dataset and the field of the first dataset that represent a common entity or that comprise values of equivalent meaning, and storing or outputting results of the transformations to the records from each of the multiple datasets (502, 504). analyzing at least one constraint specification (114, 115, 602) stored in a data storage system to determine a processing order for the multiple datasets, the constraint specification specifying one or more constraints for preserving statistical consistency among a group of related datasets that includes the multiple datasets (502, 504), applying one or more transformations to records from each of the multiple datasets (502, 504) in the determined processing order, where the transformations are applied to records from a first dataset of the multiple datasets before the transformations are applied to records from a second dataset of the multiple datasets, and the transformations applied to the records from the second dataset are applied based at least in part on results of applying the transformations to the records from the first dataset and at least one constraint between the first dataset and the second dataset specified by the constraint specification, wherein at least one constraint for preserving statistical consistency specified by the constraint specification is based on an equivalence between a field of the second dataset and a field of the first dataset, the field of the first dataset and the field of the second dataset being keys in a join operation (400, 1002, 1204), and wherein the equivalence is an association between the field of the second dataset and the field of the first dataset that represent a common entity or that comprise values of equivalent meaning, and storing or outputting results of the transformations to the records from each of the multiple datasets (502, 504).