db shared hook