Denormalizing data into a flat schema for read/query purposes