I am new to both network programming and MySQL. I am currently trying to make a server/client model. Under the sturcture, the client would be able to interact with a remote database (namely, add, delete, and update entries) sitting on the server end.
So what's the best approach of doing this? I was thinking, at first, that the clients would connect to the server, and the server would interpret what the client wants and do the query or other related database process for the clients and pass the result back if necessary.
However, I am afriad that the server's resource might be eaten up rather fast if many clients connect to the server at the same time. So maybe a ODBC connection directly between clients and the database might be better?
If ODBC is the way to go, how does it really work? does it work over TCP/IP with the socket? If that's the case, could I easily pass the socket from ODBC and my own server program?
(Because the client might request server to do something which is not database related, so I need to be able to pass the socket back and forth between my other parts of the program and the database.)
I realize that this is a rather vague and long question, sorry for it. But I amr really confused at this point about the way remote database connection works and if it's just only one part of a bigger "web application", how does the whole thing fit together?