SQL as a queue/event store