Recalling back to when my best friend owned a dog and a hamster she had the dog way before she got the hamster but I remember she kept her hamster upstairs in her room where the dog couldn't get to it. So if it's possible you can try keeping the hamster in a safe place away from the dog. Nothing may ever happen but if you really want a hamster that much then I suggest keeping it safe away from your dog. Good Luck!!