In Gotham Series Salvatore Maroni was killed by Fish Mooney when bruce wayne was so young but in the film 'The Dark Knight' the Salvatore Maroni is showcased as one of the villain. How can it happen - whether the series was deviated from the original story?
It's true that the movie and series adaptations of the comic differ from the original plot in a lot of ways throughout.
For example, as an article from cinemablend.com points out:
in an early scene in The Dark Knight, Harvey Dent is questioning a witness about the crimes of Sal Maroni and suddenly finds himself staring down the barrel of a gun that misfires. This was Nolan’s fun little way of playing with Two-Face’s origin story from the comics, where Dent was horribly scarred when Maroni, while sitting on the bench, threw a bottle of acid into the district attorney’s face. The director would give the villain a new origin later in the movie, but this was a nice little gift for the long-time readers.
Another example would be the scars of Joker in the The Dark Knight, which otherwise is not very prevalent in the comics. It was introduced by Nolan/Ledger to render a dark theme to the character.
Similarly, in the series Gotham, the writers/directors have come up with these 'deviations' from the original story, just to add a new perspective to a character or to the whole plot.
Unlike Marvel, DC seem to be keeping their TV and cinematic universes separate.
Since Gotham is not a prequel to the Nolan 'Dark Knight' film trilogy this gives the creators the freedom to kill off characters seen in the films, comics and other media set further into the future.