generate pieces of code by mysql database schema