According to liberal Bible scholarship, the Bible was not written down until the 6th century B.C., after the Babylonian captivity. Some liberal scholars deny that Israel existed before that, rejecting the historicity even of King David, as well as the Exodus from Egypt and the conquest of Canaan. But now archeologists have discovered Hebrew writing on a piece of pottery from the 10th century B.C., during what would have been the reign of King David. This means scholars will have to redate the Old Testament. See Bible Possibly Written Centuries Earlier, Text Suggests for the details. What gets me, though, is that the text consists of Bible-like moral and religious injunctions, with a reference to the King (the numerals being the line numbers):
1 you shall not do [it], but worship the [Lord]. 2 Judge the sla[ve] and the wid[ow] / Judge the orph[an] 3 [and] the stranger. [Pl]ead for the infant / plead for the po[or and] 4 the widow. Rehabilitate [the poor] at the hands of the king. 5 Protect the po[or and] the slave / [supp]ort the stranger.