I had my cat about 10 years before I got my yorkie. My cat,Tigger, is getting old and "tolerates" Lily as best he can. I'm sure if I had got her when he was younger they would be the best of friends by now.
The best thing I found to gurantee a happy household for all of us....a babygate between them!

Good luck! I'm sure things will be fine!