[db] adds automatic typing