Hermione Granger, a witch at Hogwarts School, is accomplished at spells.
The core of this sentence is Hermione Granger is accomplished at spells.
(A witch at Hogwarts School is an appositive noun phrase that gives us additional information about Hermione Granger.)
In relation to these examples, do we omit commas when the sentence structure is reversed in a) and does b) require commas as there could be multiple detectives working a case?
The examples contain names we are familiar with and associate with the descriptions through popular culture, but is that cause to use commas?
A) Talented Hogwart's School witch Hermione Granger has been awarded for her efforts.
B) Determined detective on the Jack the Ripper serial killer case, Chief Inspector Abberline, has failed to solve the mystery.