I am currently working on a database ad rotating system where some of the ads have higher impression (or rank) than others and should be shown more often.
What is the best way for calculating the impression rank while still keeping the appearance of “random” ads? What would the table structure for the database look like? Should the calculation be done in the database or in the code?
Some related Questions that may be helpful as well: