That statement is false
As soon as a hacker successfully penetrate your system, that hacker could obtain access to every part of your computer, including all your personal databases. So, not opening your database while online will not protect you from the potential of intrusion.