Brief Description:
I have a table that stores articles. Articles are listed on table and sorted – DESC – by dateCreated.
dateCreated column represents the date and time user has posted/created the article. It is fixed and must not be changed.
Problem:
By the days, old articles usually ends up in far pages. However, the user has the chance of bumping his article back to the top of the table on first page. Since i’m ordering the articles by dateCreated, which mustn’t be changed, how can i bump the article without changing dateCreated?
My Solution – I’m not sure if its a good one or not (i need suggestions):
Create another column called bumpDate. When user posts an article, date/time will be inserted into dateCreated and bumpDate. The articles on the gridview will be sorted by bumpDate. When user bumps his article, i only update bumpDate. Therefore, user’s article ,regardless of dateCreated date, will be on top. Gradually, the article will go down by the days depending how many new articles posted by other users.
Do you see any glitches in this design/solution?
What you have outlined is how those things are typically done. While
BumpDatemight not be the best name (does this truly represent the action of “bumping”, or did they do something else like modifying it?), that’s what you should use.