Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to figure out how difficult/time consuming it would be to add the following feature:

We have a database with our subscribers and we want to send updates to paying subscribers. The catch is that we want these updates to be date dependent. Let me clarify.

Joe signed up in June last year. He has been receiving monthly newsletters since June. Now Fred signed up in April, cancelled in May and resubscribed in August. We want to send an update to Joe regarding his June newsletter. Fred was no longer a subscriber in June and we don't want him to receive the same update for various reasons.

Is this a feature that you would expect to cost 100's, 1000's, 10,000's dollars to implement?

**Edit: I should've been more clear, I was looking for a magnitude not an exact cost. It's evident, I know very little about programming which is why I came here. If someone asked me what it would cost abandon a well, I could easily give them an order of magnitude. I appreciate all of the responses; this is an incredible resource.

share|improve this question
See temporal databases on wikipedia. – Oded Jan 24 '12 at 20:01
@Oded: I think that solution would be a bit of an over-kill for this problem. – FrustratedWithFormsDesigner Jan 24 '12 at 20:02
How could the cost even be basically estimated without knowing what tech they are using and 1000 other important pieces of information. As others have said if its just a matter of the DB part and assuming some familiarity with RDM's it would cost close to nothing. Use open source DB (postgres, or mysql for example), read up on the date or datetime fields. – Ominus Jan 24 '12 at 23:12
@Ominus: Good point. Someone with a poor background and poor skills could take years. Someone who has already done this once could download a good example from SourceForge in a few moments. – S.Lott Jan 24 '12 at 23:40
up vote 2 down vote accepted

This can easily be done with a database that is free like MySQL or one of the free edition of Microsoft's SQL Server provided you are not talking about hundreds of millions of records.

As for the programming to set this up, I would guess this could be done in one day or less. Cost is a function of your local wage rates and negotiating skills.

share|improve this answer
I don't think the cost can be easily separated from cost of the rest of the system that this feature resides in. And the simplest system to implement this feature would probably not be very useful in a real business context. – FrustratedWithFormsDesigner Jan 24 '12 at 20:21
Frustrated: Perhaps, but I am attempting to answer the question as written, not infer issues and problems not stated. So for example how the newsletters are written, and if they contain photos may or may not be relevant, but there is no clear evidence that this information would influence the database decision. – JonnyBoats Jan 24 '12 at 20:26
I began reading about MYSQL databases - this very well could be the solution to my problem. Thank you! – Dan Jan 25 '12 at 0:49
Dan: There are many fine database products, the "best" one for you is a function of operating system and use. For example a Windows desktop app might call for a different solution than a Unix webserver. – JonnyBoats Jan 25 '12 at 1:11
Slawek: You obviously did far more in your 7-8 days than what was asked in the question. His question was "to create the following database", not setup cloud services, handling bounces etc. I stand behind my estimate that the database only can be done in a day or less by a seasoned developer who has done this before. – JonnyBoats Jan 25 '12 at 4:57

Your database is not really "date-based" - your logic is. Most databases have a date or datetime data type. Your program needs to look at the dates that users subscribed and look at the current date and then look at which users are currently subscribed... using that information, your program should be able to figure out who gets a newsletter. As for cost, it's impossible to say for sure (not knowing what other systems you have and need to integrate with), but this feature should not be very complex based on how it's described here.

share|improve this answer

The logic is not difficult. I recommend reading the book "Developing Time-Oriented Database Applications in SQL." While this book is out of print, the author has graciously made available the PDF of the book as well as the associated CD on his website. (look for the first item under "books").

share|improve this answer

It is not easy to estimate the cost: it depends on the complexity of your system. It also depends on your development process.

Storing dates and filtering according to these dates is not difficult to implement in a database. But still, it needs to be well designed. You might choose between an implicit and an explicit storage of the user subscription history.

In some databases, you can let the dbms store versions of a row, with change dates being stored automatically. For example in Sql Server (starting from 2008), you might use Change data capture ( ).

As an example of an explicit storage of the history, you might read this question : .

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.