refactor on By show fragment database retrieving.