Output all the sql commands necessary to generate a database row and its associations.