Star Trek: Voyager
Episode: VOY 202 - Thirty Days

A race of people on a planet that is comprised entirely of water. The Moneans live inside modules and engage in deep-sea mining for food and oxygen. However, their activities cause an ancient computer to decay, threatening the loss of containment that keeps the "ocean" from scattering into space. Tom Paris violates the Prime Directive in trying to help the Moneans, which results in Captain Janeway reducing him in rank from lieutenant to ensign.