Precaution: The following may contain spoilers from Magi
This was too long to be posted in comments so I had to make it here and since it serves the purpose too, why not.
So I did a bit of research after the few pointers given out by Dimitri.
On the reference manga page given by Dimitri, I found this:
After looking up the two names David and Solomon, I found the interesting:
Solomōn), also called Jedidiah (Hebrew יְדִידְיָהּ), was, according to
the Book of Kings, the Book of Chronicles, Hidden Words and the
Qur'an[2] a king of Israel and the son of David. 1
Book of Chronicles are the final books of the Hebrew Bible.
When you search about Solomon in Islam, the first line you see in wikipedia:
Solomon (Arabic سليمان Sulaymān) was, according to the Qur'an, a king
of ancient Israel as well as the son of David. 2
Solomon in Islam is more usually called as Sulaymān and David as Daud or Dawud.
The name Jehoahaz also seems to have a reference in the Bible, but not the Quran. So judging from the names used in the anime, they might be relating it more to Christianity.
More information about the names here
And about the Ilah:
ʾIlāh (Arabic: إله; plural: آلهة ʾālihah) is an Arabic term meaning "deity". , it simply means deity in Arabic. So you might be confusing it with Allah who is the God of Muslims.
Summing it up, we can say that Solomon's identity and his Father, David's identity has been taken from religion (more like Christianity) but most part of Magi is derived from fictional characters.
References
1 Solomon reference from Bible
2 Solomon reference from Quran