When retrieving data from the Web one takes it for granted that the result to your query (using e.g., Google) is presented in a ranked or ordered way. This ranking is obtained in an automated way using ranking functions (PageRank in the case of Google) and is based on the contents of the retrieved pages as well as the structural properties of the web graph.
When retrieving the result of a query on a relational database or XML document, however, elements in the results are presented in an arbitrary and unordered way.
We present a general ranking method which gives a way of ranking tuples in answers to relational algebra queries on relational databases. Our method is inspired by the ranking methods used on the web.