1. A method comprising: receiving an integration rule; accessing a first data set; generating a first representation of the first data set based on the plurality of integration rules, the first representation being flat and comprising a plurality of records; generating at least one index, the index encoding at least one hierarchical relationship among the plurality of records; generating a second representation of the first representation based on the at least one index, the second representation comprising nested data.