A detective was a person who investigated crimes so as to solve them, usually as part of an official police force. A private investigator was a freelance detective.
In the Victorian era, in London, the Silurian Vastra was known as "the Great Detective" (HOMEVID: The Great Detective) for solving crimes, sometimes alongside the Doctor, one of her oldest friends. (TV: The Snowmen, The Crimson Horror, Deep Breath)
In 1920, detective Merrivale Carr investigated the apparent murders of Sebastian Marten and Paul Steiffers at Lord Farthingale's country retreat. The Ninth Doctor and Rose helped in the investigation. (PROSE: Doctor vs Doctor)