The more familiar you are with a scale, the easier you will find it to play melodies created from that scale, and the easier you will be able to create your own melodies from the scale. One of the best ways to practice scales is through the use of sequences.
A sequence is a repetitive pattern in which the rhythm remains the same while the pitches are repeated higher or lower, usually within a specific scale or key. Practicing sequences is also good for you co-ordination and bowing technique. Here are some sequences within the D major scale.
This example also makes use of sequences.
This G note is written above the top line of the staff.
This G note is played on the E string, with the second finger slightly lower (back towards F#) from where you would place your finger for a G# note.
This piece, in the key of D major, also features the use of sequences. Take it slowly until you can play it easily and then gradually increase the tempo.