TCP/IP server + client (or use a webserver and webrequests). Make the client send requests to the server, the server then checks the request, validates it and pulls data from the database. Afterwards the result is sent back to the client. There are a "few" articles about TCP/IP server + client connections. I can't really recommend one because I did not do anything TCP/IP related for a while