A computer-implemented method for extracting test data from a database comprising one or more tables, the method comprising: receiving a test data query that specifies at least one selection parameter and identifies a domain associated with the at least one selection parameter, the domain corresponding to a column, wherein the domain is represented by a domain data structure that stores all unique values corresponding to the column and a corresponding entity identifier associated with each unique value; selecting one or more entity identifiers in the domain data structure corresponding to one or more unique values in the domain data structure that satisfy the at least one selection parameter; generating a primary entity selection map corresponding to the domain based on the one or more selected entity identifiers, the primary entity selection map comprising a bitmap that stores a bit sequence corresponding to a set of entity identifiers in the domain data structure and identifies all unique values in the domain that satisfy the at least one selection parameter; applying the primary entity selection map to a table of the database that includes the column associated with the domain to generate a row selection map, the row selection map comprising a bitmap that stores bits corresponding to each row of the table and identifies each row in the table that satisfies the at least one selection parameter; generating a driving entity selection map based on the row selection map by identifying a primary column in the table and identifying each entity identifier in a driving domain data structure that is associated with a value included in a row identified by the row selection map, wherein the driving domain structure being associated with the primary column; creating a test data definition object including the driving entity selection map and the at least one selection parameter; executing the test data definition to extract the test data by applying the driving entity selection map to the table that includes the primary column associated with the driving domain data structure. receiving a test data query that specifies at least one selection parameter and identifies a domain associated with the at least one selection parameter, the domain corresponding to a column, wherein the domain is represented by a domain data structure that stores all unique values corresponding to the column and a corresponding entity identifier associated with each unique value; selecting one or more entity identifiers in the domain data structure corresponding to one or more unique values in the domain data structure that satisfy the at least one selection parameter; generating a primary entity selection map corresponding to the domain based on the one or more selected entity identifiers, the primary entity selection map comprising a bitmap that stores a bit sequence corresponding to a set of entity identifiers in the domain data structure and identifies all unique values in the domain that satisfy the at least one selection parameter; applying the primary entity selection map to a table of the database that includes the column associated with the domain to generate a row selection map, the row selection map comprising a bitmap that stores bits corresponding to each row of the table and identifies each row in the table that satisfies the at least one selection parameter; generating a driving entity selection map based on the row selection map by identifying a primary column in the table and identifying each entity identifier in a driving domain data structure that is associated with a value included in a row identified by the row selection map, wherein the driving domain structure being associated with the primary column; creating a test data definition object including the driving entity selection map and the at least one selection parameter; executing the test data definition to extract the test data by applying the driving entity selection map to the table that includes the primary column associated with the driving domain data structure.