Answer:
Well, it depends on the book, the tense, and the mood/tone. However, as a reader, I think that "Did you have a dog?" appeals to me more. You could try saying it like "Have you ever had a dog? Then..." to make it sound more formal/professional.
Step-by-step explanation: