I have to store a duration in a SQL Server 2008 database. How is this usually done?
For example I will have to be able to store values like: 5 minutes, 8 hours, 10 days,
What I would do is have 2 columns one being the last time an event was fired and the other being how long between fires of the event. That way you could do a query of the dateDiff between the last time fired and now() and see if that value is greater then the duration between fires.
As for the value of the duration I would have it be the minimum value of time that you need. Such that if you have a min value of 5 minutes then the column should be in minutes. if you have a min value in seconds then it should be in seconds.