Yeah, what you're talking about, playing a C major scale starting on G, is a mixolydian scale. So it goes like this, in the key of C:
C D E F G A B C - Ionian (natural major)
D E F G A B C D - Dorian (starting on D, the second scale degreee.
E F G A B C D E - Phrygian
F G A B C D E F - Lydian
G A B C D E F G - Mixolydian
A B C D E F G A - Aeolian (AKA natural minor)
B C D E F G A B - Locrian
So that's the modes of the major scale. Generally speaking, you can play an ionian or lydian scale over a major 7 (C ionian or C lydian, NOT F lydian, which would be C ionian in that case anyway), dorian over a minor 7, mixo over a dominant 7, and locrian over diminished. I know I'm missing a bit of stuff here, and I'm not even touching the other minor or bizarre scales.
It depends on what key your in. If you're playing over a D chord in D major (F#, C#), and you play E dorian (which is indeed the second mode of the D major scale), you're basically just playing a major scale starting on E. That is the fundamental principal of the modes. Playing E dorian over D major really isn't doing anything but playing a major scale from E.
However, take for instance a B minor 7 chord in the key of D. This is the VI chord, but you don't normally play an Aeolian scale over it. Dorian is far more commonly used because a flat 6 often conflicts with tensions being played by a guitarist or keyboardist. In this case, and in most cases, you don't take key into consideration when playing over a chord. Instead, you look at what the chord actually is, and play the mode that compliments it.
Starting on G is only mixolydian in C. In Bb, it would be Aeolian because of the accidentals in the key signature. In Ab, it would be locrian. When your talking about straight diatonic harmony, you do look at the key, and how each note relates to the tonic. For each key, it breaks down like this:
2nd scale degree - dorian (starting on D in they key of C, or E in the key of D)
3rd - phrygian (E in C, or D# in B, etc etc.)
4th - lydian
5th - mixolydian
6th - aeolian
7th - locrian
Hope that helped. I'm really tired right now.
ALSO:
Introduction to Chord/Scale Theory, by Jazzbo(article)
http://www.talkbass.com/forum/showthread.php?t=125519
Tonal Centers and Modes (BG)
http://www.talkbass.com/forum/showt...2073#post472073
Scales/Modes: What's the Difference? (BG)
http://www.talkbass.com/forum/showt...20&pagenumber=1
Modes in Minor Keys
http://www.talkbass.com/forum/showt...&threadid=54213