adding bookstore example, always flattening recursive queries