Implemented database handling for adding orders