An ecosystem describes all the living organisms (biotic components) with their physical surroundings (abiotic components) in a given area. A community describes only the living organisms and their interactions with each other.
Abiotic Components of an Ecosystem
The non-living parts of the ecosystem, such as nutrients, temperature and water availability, constitute the abiotic components of an ecosystem.
Biotic Components of an Ecosystem
All the living organisms of an ecosystem, such as plants, animals and microbes, constitute the biotic components of an ecosystem.
The interactions between populations within an ecosystem are described by the benefit or harm caused to each species in the interaction. These interactions relate to the niche which the species occupies within the ecosystem.
A niche describes the specific role a population plays within an ecosystem. This may be defined by their interaction with other organisms (such as predator or prey), or in the role they play in nutrient cycling (such as primary producer or decomposer).
Niche and Biodiversity
Ecosystems rich in biodiversity (many different species) tend to have very specialized niches. Low biodiversity results in few species available to fill each niche. Hence, in a rich ecosystem, a loss or reduction of one organism may have a lower impact on the overall ecosystem as other organisms fill the void than in a poor ecosystem, where another population may be unavailable to fulfill that role. For example, if a particular species of prey is reduced in number, it has a reduced effect on predators if there are other prey species available.