Suppose a database table contains information about a search term in each row. The table has an integer "rank" column to dictate the order in which the search-terms are to be presented on a web site.
How do I best implement and maintain this rank order?
The problem I want to avoid is having the term numbered 1,2,3,4,..,100 and when for example, rank 50 suddenly becomes interesting it gets its new rank set to 1 and then all terms between them must have their sort number increased by one.
Sure, setting initial sort numbers to 100, 200, 300, 400 etc. leaves some space for moving around but at some point it will break.
Another approach can be spacing the ranks with some fixed offset but it may also get break at some time in real world scenario.
so is there any other different approach to handle this.... (it may be relevant to how search engines maintains the ranking and reordering but i can not find any luck)