ذي - ذات - ذا- ذو ... all are used in (formal) speeches . and have the same meaning .
they mean ( have ) ... you can also use the words (صاحب ) or (لديه ) instead of them to give the same meanings . anyways here are some examples :
Ex: كل تلميذ متفوق في الدراسة يكون ذا أخلاق حسنة
Ex: مصر دولة ذو حضارة عريقة
Ex: تسلق احمد الشجرة ذات الأفرع العالية
Ex: كل ذي علم يستطيع ان ينفع وطنه