resolve db on demand