Querying a tree covered by multiple databases