I've got a dataset containing a very high number of documents, let's say a comment and an author. Because of the high number of documents and storage requirements, the author is represented by a author_id and looked up in a translation table (short author_id <--> text author_name). So far so good, saves many many GBs/TBs.
There's a new wish to include sorting by author_name. For a single author_name this is easy: filtering on the author_id and done. However if I want to show a result that contains >1 author_names, things go wrong since the author_names are not in alphabetical order. So let's say the translation table contains:
{0:alex, 1:alison, 2:john, 3:michael, 4:aaron, 5:tim}
I'd like to see aaron on top, but because of his author_id he isn't.
What's a good approah to sort alphabetically on author_name using a the author_id field that doesn't represent alphabetical sorted content? Thank you.