India is a democracy because elections are generally free and fair. Incumbent governments do not have the power to rig elections and frequently lose elections. Hence, India is a democracy.
Mexico is a less perfect democracy. It is very difficult to remove existing governments from power. Elections are rigged and are not free and fair.
China is not a democracy. There are no elections in China. The communist party is the only party in China.