Close database connections after use
Use longs, not ints for batchID
Include date in events
Use prepared statements