Question: I studied the solubility of compounds in water. I have found that [calcium carbonate](http://en.wikipedia.org/wiki/Calcium_carbonate) doesn't dissolve in water. The teacher stated that the ionic compounds dissolve in water except some carbonates. What would be a clear elaboration of this phenomenon?

Answer: 
As someone said here, this:

> 
> The teacher stated that the ionic compounds dissolve in water except
>  some carbonates.
> 
> 
> 

Is indeed an oversimplification. First of all, the distinction between an "ionic compound" to other compounds isn't too defined. What your teacher probably said, or didn't say but wanted to, is that some ionic compounds easily dissolve in water. Salt (halite - NaCl) is the best example.

Calcium carbonate, in nature, also commonly dissolves. It's just not as immediate as dissolution of the more soluble ionic compounds. You are probably familiar with this phenomenon:

![picture of a cave](https://i.stack.imgur.com/FMZlp.jpg)

This forms *because* calcium carbonate dissolves. The rock is limestone, which is usually composed of pure calcium carbonate. Acidic water greatly enhances the solubility of calcium carbonate, and it doesn't even need to be highly acidic. Rain or river water that come into contact with the atmosphere absorb the $\ce{CO2}$ as $$\ce{H2O + CO2 <=> H2CO3},$$ which then facilitates calcium carbonate dissolution with $$\ce{CaCO3 + H2CO3 <=> Ca^2+ + 2HCO3-}.$$
Solubility of salts is not a prediction that I like to make. It all comes down to $\Delta{G}\_{sol} < 0$. That condition is fulfilled when $\Delta{H}\_{sol} < 0$ and $T \Delta{S}\_{sol} > 0$ or one factor outweighs the other.

There's two problems. Lattice enthalpies are large, as are solvation enthalpies, and the common observation is that $\Delta{H}\_{sol}$ in most cases is small. We are calculating differences of large numbers, and the one fact we can confidently assert is that the difference is impossible to predict and generally meaningless.

Same thing for $\Delta{S}\_{sol}$. Lattice entropies are small, but entropies of solution are lower than one would think thanks to the short-range order the solvated cation imposes on the solvent. You are gaining translational entropy from dissolving the lattice and losing translational entropy from the solvent through the inner coordination shell. You are calculating differences of numbers of equal magnitude again, and just by staring at reagents it's impossible to tell which way the pendulum is going to swing and if the result is positive or negative.