The earliest books in the Old Testament are the Pentateuch. These are the first books of the Bible (Genesis, Exodus, Leviticus, Numbers, and Deuteronomy) and are attributed to Moses but appear to come from four different sources.
Jean Astruc noticed that some passages used the name Yahweh for God and others used Elohim. He believed that Moses used two different documents for his sources. Later, a man named Julius Wellhausen extended this theory by identifying four different sources that date from different periods and emphasize different concerns. Along with the two sources mentioned above are the Priestly source and the Deuteronomic source.
In the parts that use “Yahweh” for the name of God, His name is known to Adam but in the parts that use “Elohim” and the priestly source, His name isn’t known to man until He reveals it to Moses (in Exodus). He says, “I appeared to Abraham, Isaac and Jacob as El Shaddai, but I did not make myself known to them by name, Yahweh.”
The Deuteronomic source is basically Deuteronomy. Instead of telling a story, it is a book of speeches. Although these speeches were supposed to be ones that Moses delivered to his people after they had been wandering as nomads for years, its laws are ones for an agricultural society. For example, Deuteronomy 19:14:
The Priestly source is mostly in Leviticus and parts of Numbers. The concerns expressed in this source are about worship: sacrifices, the Sabbath, holidays, circumcision, rituals, and what is pure and impure (food, behavior).
The Yahweh texts are thought to have been originally written about 1000 BC and the Elohim, about 900 BC. They were combined around 800 BC. The Deuteronomic texts were also written about that time and then combined with the first two after another hundred years. The Priestly texts were added in during the 6th Century BC.
The stories in the Bible are older than the dates they were written because they were part of an oral tradition and many of them have similarities to older Babylonian stories. Despite similarities, the Bible introduced some revolutionary religious ideas.
The most revolutionary was the idea of a single God who is all-powerful, all-knowing, and exists everywhere. In polytheism gods lived in a special place where only they existed (although they would come to Earth to visit people…mostly to get up to no good.) The gods represented things in nature – the sky, fertility, crops, or the sea. In polytheism, religious stories (myths) told about the lives of the gods, in monotheism the Bible tells the stories of people and their relationship to God.