Abstract: A computer implemented method of obtaining a dataset which answers a main query from a relational database comprises providing a first real result table and one or more further real result tables. The first real result table contains a first dataset obtained from the database which answers a first subquery that forms part of the main query, and the or each further real result table contains a respective further dataset obtained from the database which answers a respective further subquery that forms part of the main query. A dataset is obtained from the first and one or more further real result tables which answers the main query. The computer implemented method obtains a dataset which answers a main query in a reliable and consistent manner.