| Author |
Q on Concurrent Accessing
|
Walter Tang
Greenhorn
Joined: Aug 13, 2004
Posts: 25
|
|
Hi all, Can I assume that only one program can access the database file at a time. In that case, we only need to handle the concurrent accessing on server side but not database file, which is much easier. But I dont really like this way to program, 'cause it is way less efficient than the way to asscess database file by mutilple threads (clients). What do you think? [ August 27, 2004: Message edited by: Walter Tang ]
|
SCJP
|
 |
Nathaniel Stoddard
Ranch Hand
Joined: May 29, 2003
Posts: 1258
|
|
|
You should read your requirements carefully. I did the URLyBird project a very long time ago and it specifically said that we could assume only one program was accessing the database file at a time.
|
Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
|
 |
Walter Tang
Greenhorn
Joined: Aug 13, 2004
Posts: 25
|
|
Originally posted by Nathaniel Stoddard: You should read your requirements carefully. I did the URLyBird project a very long time ago and it specifically said that we could assume only one program was accessing the database file at a time.
Hi Nathaniel, Thanks for your reply. Yeah I read that too. But I am just alittle confused. In the database interface, it asked me to implement the lock and unlock record. I am just wondering if we handle the concurrent accessing of multiple clients at server level, why should we implement the lock and unlock on database record since only one client program will acess the file.
|
 |
Walter Tang
Greenhorn
Joined: Aug 13, 2004
Posts: 25
|
|
Originally posted by Nathaniel Stoddard: You should read your requirements carefully. I did the URLyBird project a very long time ago and it specifically said that we could assume only one program was accessing the database file at a time.
Hello again, I just solved my question by searching an old postpost
|
 |
Omar Kalaldeh
Ranch Hand
Joined: Jun 08, 2004
Posts: 58
|
|
Hi Walter, They said you can assume one program can access the database, and that dose not mean one thread only can access the database, those tow things are completely different. When they say one program can access the data file that mean there is only one server accessing the database, and there is no other program accessing that data file in the same time, for example you can assume there is no editor program accessing that file or there is no other server accessing that file. But still in your server program it will handle concurrent client�s (multi threads).
|
Best Regards <br /> <br />Omar F. Kalaldah<br />---------------------<br />SCJP, SCJD, SCBCD
|
 |
Walter Tang
Greenhorn
Joined: Aug 13, 2004
Posts: 25
|
|
Originally posted by Omar Kalaldeh: Hi Walter, They said you can assume one program can access the database, and that dose not mean one thread only can access the database, those tow things are completely different. When they say one program can access the data file that mean there is only one server accessing the database, and there is no other program accessing that data file in the same time, for example you can assume there is no editor program accessing that file or there is no other server accessing that file. But still in your server program it will handle concurrent client�s (multi threads).
Hi Omar, I see the difference. Thank you very much for your help
|
 |
 |
|
|
subject: Q on Concurrent Accessing
|
|
|