Yes you can connect to a database over the internet. Now, are you asking how? This gets a little more complicated and will require that firewalls are configured appropriately. for example, if it is an oracle database you would generally open ports 1521/1526 to the world (scary), domain, or machine specifically.
The simple answer is that if you use an ODBC connection, you can develop on a database on the local machine, then change the ODBC connection to connect to the live system for implementation (then if you can't connect it is usally a firewall issue). Basically, if you can develop to an ODBC connection database, the database can be anywhere.
I use ODBC as an example, I know that there are other connection methods that can be employed.
Hope this helps.