The code provided for the first assignment consists initially of a single threaded database server handling a single client.
A single threaded approach to extending this to multiple clients might multiplex the clients using the select statement to give each "ready" client a bit of service in turn.
This can work, but is messy and requires identifying the partial service to give to a client before checking other reading clients. Alternatively, if each client request is satisfied completely, this may penalize clients with short requests having to wait for clients with length ones. So to be fair, the more complicated approach is needed.
As in the remote login example, the code would also be complex and prone to errors.