Real time database management for production control