Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unlocking database ?

 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reader,
Is it necessary to unlock the entire database once it has been locked ?. As far as instructions says it has not specified about unlocking the database. However, please tell me that shall I go with unlocking or simply lock the database and document.
Thank you,
 
Stephane Weber
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think what they wanted at SUN is that you implement the unlock method that matches the lock method.
In the case of a whole database lock however, it could only be used in case of database maintenance or so.
So I would say that if you just implement these methods and specify in your doc that they are there for maintenance reasons, that would be enough.
If I'm wrong, please anyone correct me
Stephane
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gurpreet,
As for unlocking the database, there seems to be two schools of thought. About half think it is unnecessary and the other half that it is. I chose to allow unlocking due to my overall architecture. My server could in theory handle multiple tables and could handle multiple connection types like automated table updaters, so in those cases it would be necessary to temporarily lock the database for the update and then unlock when updating was complete. Of course that is not a requirement for this assignment so you have no obligation to allow for unlocking the database.
Hope this helps,
Michael Morris
 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
H morris,
I am Still
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am Still

I think what Michael is telling you is that it is up to you if you want to implement (or not to implement) unlock(-1). The requirements are silent on that issue, and therefore it is your design decision (which you need to document). I happen to be in that "other school" that Michael mentioned and I chose not to implement unlock(-1) and got a full score for the server design. However, if your overall design implies the use of lock(-1), implement it by all means.
Eugene.
 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi konovo,
I got it and I will not implement unlock(-1). But tell me how shall I document my design.txt file. Do I have to defend my design and besides that document my designs drawback's ?. I am not sure how to document in Design.txt ?. And is there any specific guidlines set by sun while defending your design choices or can I simply write in my own words ?.
Thank you,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic