"Do you have a family?
Yes I do, there are five people in my family. 是的，我有家，我家有5口人。
Do you have a family?
For native speakers the family has always been the extended family. That probably came because they had lots of contact many of my relations when I was very young.
They wouldn't ask "Do you have a family?" if I were referring to parents or other extended family, unless I were a foster child or something.
如果真的想问对方的父母或亲戚时，是不会用“Do you have a family?”来问的，除非背景是你在和一个收养的孩子聊天。
"Do you have parents nearby?"
"Do you have brothers and sisters?"
"Do you have a family?" 的隐含义其实是"Do you have a spouse/partner and children?"(你有伴侣或者孩子吗?你组建你自己的家庭了吗?)
Yes，I'm married. 嗯，我结婚了;如果你没有结婚, 你就回答：
NO. I'm single. 我单身。