"Chords have fallen to me in pleasant places." (Psalm 16:6) There are two Torahs, the written Torah and the oral Torah. Rabbi Pinchas said: "Lots were cast for the nations of the world, and my lot fell in pleasant places" (Deuteronomy 32:8), "When the Most High gave nations their homes" (ibid. 32:8), "For the LORD's portion is His people" (ibid. 32:9). Just as one might say, "Ploni's estate fell to Ploni," so too, "The fair portion assigned to me is indeed delightful" (ibid. 32:9), and "For I have received a goodly heritage" (Psalms 16:6). Rabbi Yochanan said: "The reward for performing commandments has fallen to me."
David Claims God Alone as His Inheritance
Midrash Tehillim 16:5