for linking database