yes, the format field is your friend, but in the statistic you will have double result, the CD and the MP3. But this is not an error because you have cd and mp3 for real.
If you do not want this, you must have 2 different database.