select correct sql template for db when creating objects