Here is small and quick tip. Couple of Days ago I helped a developer to get Dependent out of worker.
Microsoft provide a View DirPartyRelationshipsUnionView. Here Worker Party Id is saved as “otherParty” and dependent Party id can be found as ” SELFPARTY”.
Quick SQL query is below,
select name from DIRPARTYTABLE where recid in (
select SELFPARTY from DirPartyRelationshipsUnionView where OTHERPARTY =5637146826)