Example
?{ hotel.price | hotel ? ?{ h | c ? Cities, h ? c.hotels,
?{ r.bed_num = 3 | r ? hotel.rooms } }
= ?{ hotel.price | c ? Cities, h ? c.hotels,
?{ r.bed_num = 3 | r ? hotel.rooms } }
= ?{ h.price | c ? Cities, h ? c.hotels,
?{ r.bed_num = 3 | r ? h.rooms } }
= ?{ h.price | c ? Cities, h ? c.hotels, r ? h.rooms,
c.name = “Arlington”, r.bed_num = 3 }
Notes:
For example, our example query that finds all hotels in Arlington with at least one room with 3 beds is normalized into a completely flat comprehension by applying both normalization rules.