sorting data which 've one more field sorting with a database

hello,i have a project about cuda programming

and i need some idea ,if you help me i will be happy i
i) i have some data for example

id number_max number_min type
1 100 5 a
2 106 6 b

i want to sort this data on cuda c using radix sort with max_number and
ii)then i want to search some data among number max and number_min

question is how can i sort datas which have one more field i have already read thrust documents but i can not imagine how can i sort datas which have one more field and how can search data.,i need some code or ideas.

Not sure whether this is applicable to your problem, but sorting of larger data structures on a single key can be reduced to sorting of (key,value) pairs by making each value a reference to the full data, for example a pointer to a structure or an index into an array.

I have a radix sort library that supports a key and up to six attached value streams. The data you want to sort is the key of course… De-interleave everything else and pass those as values:
http://www.moderngpu.com/sort/mgpusort.html