You wouldn't usually use TCP etc and a database together for something like this, it is basically more sensible to use one or the other.

The exception to that would be if all the clients communicate with a server based program via TCP etc, and the server based program then does the work with the database as needed (and the clients don't work directly with the database). This would allow you to keep the database secure, so that people can't steal each others login id's etc.