The themes typical of a folk or fairy tale are present throughout the novel, notable in both Stanley and Elya's narratives. Elya must go on an adventure to win his love's approval and prove his own worth and he is eventually placed under a witch's curse. Stanley's bad luck is blamed on the curse left on his great-great-grandfather and the Yelnats family easily believes in the power of this curse. Both Stanley and Elya are similar to fairy tale characters and are morally good, heroic protagonists who must overcome the challenges predestined for them. Both story lines are accompanied by a magic that is seen in the mountain stream, Madame Zeroni's song, and the healing power of the onions. Each of these elements in Holes mirror elements frequently found in fairy tales. 
Throughout the novel, names act as a theme that allows the characters to disassociate their lives at Camp Green Lake from their lives back in the real world. Names also demonstrate irony-- Camp Green Lake is not actually a camp, it's located in a desert, and there is no lake. The "campers" all label themselves differently and identify with names such as Armpit and X-Ray and the guards are referred to as counselors. One of the counselors is referred to by the boys as "Mom", representing the absent parents at Camp Green Lake. Only the woman in charge is referred to in a prison-like way and is called "Warden". The different names allow the boys to bond and form a team based in their hatred for their work and the counselors. Many of the characters also have names that connect them to their family history, like the passing down of "Stanley Yelnats" and Zero's last name of Zeroni, and remind them how the actions of their ancestors affect their modern-day lives.  Stanley is the fourth "Stanley Yelnats" in his family, a name that is passed down due to its palindromic nature and adds to the connection to family history.