db erm and create script