i can't understand what you are trying to do.....what do you intend for "desired results"??....anyway it seems that you need to learn something about "feature extraction" and "information retrieval" arguments. in other hands you must
- process your data in order to find relevant information that describes univocaly your multimedia contents (see "feature extraction")
2.set a distance metric to search over your DB the item which is more "similar" (behind this word there are so many concepts to explain....see "information retrieval") to user-submitted content
3.implement a speed search over your data
this is a simple resume of a complex branch of computer science.....if you already know these things and/or need something more specific, make your question more specific!