register and db