Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q on Concurrent Accessing

 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic