The Dominant chord, with its inner tension to resolve to the tonic, is the real core of the tonal system.
The reason for this tension is the presence of the tritone interval in the chord structure.
Improvisers and composers have been increasingly stressing this tension by adding extensions and alterations to the basic 1-3-5-b7 structure.
The first of the extensions is the ninth, which can also be altered, either by lowering or rising it by a semitone.
In functional “European” harmony, ninth chords were first built on the V degree of the scale (the Dominant). Just like the minor seventh, the ninth also served the purpose of making the resolution to the Tonic of the Dominant chord more powerful.
Let’s remember that, every time we are talking about harmony, we are also dealing with voice leading and so with melodic development. Alterations should follow a “linear logic” leading to the next chord.
Let’s see what scales contain a 7(b9) chord. (All examples are in A)
Harmonic minor scale
where we find a 7(b9) chord on the V degree:
(in this case, we are dealing with a symmetrical scale, and there are four 7(b9) chords, a minor third apart):
the seventh mode of the melodic minor scale.
Back to the diminished scale, the four Dominant chords also have the sharp ninth.