The status of locality in quantum mechanics is analyzed from a nonstandard point of view. It is assumed that quantum states are relative in the sense that they depend on and are defined with respect to some bigger physical system which contains the former system as a subsystem. Hence, the bigger system acts as a reference system. It is shown that quantum mechanics can be reformulated in accordance with this new physical assumption. Additional laws express the (probabilistic) relation among states which refer to different quantum reference systems. They replace von Neumann's postulate about the measurement (collapse of the wave function). The dependence of the quantum states on the quantum reference systems resolves the apparent contradiction connected with the measurement (Schrodinger's cat paradox). There is another important consequence of this dependence: states may not be comparable, i.e., they cannot be checked by suitable measurements simultaneously. This special circumstance is fully reflected mathematically by the theory. Especially, it is shown that certain joint probabilities (or the corresponding combined events) which play a vital role in any proof of Bell's theorem do not exist. The conclusion is that the principle of locality holds true in quantum mechanics, and one has to give up instead of locality an intuitively natural-looking feature of realism, namely, the comparability of existing states.