SQL to generate DB.