DNS (Domain Name System) uses which protocol? and Why?

DNS (Domain Name System) uses both TCP or UDP or both. UDP can handle only 512 bytes. If data size is within 512 bytes UDP is used, otherwise, TCP protocol is used.