create all table models and generate database with a simple function