Python Stochastic Optimization Methods In Dbms