Rats and hamsters should never be housed together. They have different nutritional requirements and environmental needs, and they can be aggressive toward each other. Rats are inquisitive and may see a hamster as prey, while hamsters are territorial and may feel threatened by a rat. Additionally, rats can carry diseases harmful to hamsters. If you are considering two small pets, it is best to get two of the same species.