Question: I am in the process of writing a message queue system.

My question is... Is it better to do this queue with files or in a database?

If I were to choose the database, it needs to check for new jobs every second and that just seems a bit of an overhead to me?

If it's files I guess you just constantly monitor the folder and execute based on that?

BR,

Answer: 
Don't [reinvent](http://www.rabbitmq.com/) [the](https://msdn.microsoft.com/en-us/library/ms711472(v=vs.85).aspx) [wheel](http://www.nservicebus.com/).

[Edit: updated for 2014, now linking to rabbit MQ as Ayende has moved on to making document databases and not message queues but then again RabbitMQ has come on. I would not be writing this but now posts need 30 characters so I need to blabber a bit.]
what are your criteria for deciding "Better"? performance? scalability? reliability? cost? 

The basic tradeoffs are:

Database - transactional support, integrity guarantees (via constraints), richer query support, *probably* will scale better (depending on implementation)

filesystem - cheaper, simpler, less moving parts (at least initially)

You may want to look at existing solutions first - MSMQ, SQL Server broker, open source libraries such as Rhino queues (<http://ayende.com/Blog/archive/2008/08/01/Rhino-Queues.aspx>)