According to the Vedas, he is a legendary entity associated with Surya (the sun) and Usha (the dawn), and is believed to reside in the middle region of the cosmos. The Rig Veda (X.95.18) states that he was a son of Ilā and was a pious ruler. However, the Mahabharata states that Ila was both his mother and his father. According to the Vishnu Purana, his father was Budha, and he was ancestor of the tribe of Pururavas, from whom descended the Yadavas, Kauravas, and Pandavas of Mahābhārata.
Traditionally, the authorship of the Mahābhārata is attributed to Vyāsa. There have been many attempts to unravel its historical growth and compositional layers. The bulk of the Mahābhārata was probably compiled between the 3rd century BCE and the 3rd century CE, with the oldest preserved parts not much older than around 400 BCE. The text probably reached its final form by the early Gupta period (c. 4th century CE).