Add sorting to database names

Add sorting to database names