design related update and db query where and where in