Think about it for a moment. Why do we need to lock? If we lock a door then we prevent others from accessing that door. But if we were the only person in the world would we then need to lock it, we can be sure anyway that noone else will use it? This is what in my opinion local mode represents, a one user system. Hope this helps. \Aron
Aron, What about the the scenario wherein pc A contains both the server and the client code. Then another pc (pc B), tries to access the data in pc A. IMO, in pc A. there should also be some lock..unlock sequence to have have some database consistency..If pc B, made a booking, it should reflect the seat count (if valid) to pc A (client) when pc A refreshes (search again) with the same record. I think, when we consider about running the apps locally, the server and client code reside in one machine. The implementation of the client in pc A and pc B is different sice pc B need to use a kind of constructor that will acceept any network specific parameters. Of course if pcB tries to run locally, it will not accept since the db and possibly the server is not available in their pc. Does it makes sense? Regards, Luis
Aron J. Skantz
posted 19 years ago
Luis, As i see it this is a question about assuming and how to interpreted the instructions for the assignment. The scenario you talked about could very well be valid _if_ you assume that one user could be running in local mode using the same db-file as a remote user is accessing at the same time. I, however, don't think this is a scenario that will occur. And i presume in my documentation that it will not occur. Either the system is used as a one user booking application _or_ as a server with clients that connect, not both at the same time. But this is a design matter, just be sure to document why you choosed one way or another. \Aron
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Devious Experiments for a Truly Passive Greenhouse!