Click here to Skip to main content
15,893,381 members
Home / Discussions / Database
   

Database

 
AnswerRe: Product of Salary Pin
RyanEK16-Mar-11 15:04
RyanEK16-Mar-11 15:04 
GeneralRe: Product of Salary Pin
Anubhava Dimri16-Mar-11 18:28
Anubhava Dimri16-Mar-11 18:28 
GeneralRe: Product of Salary Pin
RyanEK16-Mar-11 18:45
RyanEK16-Mar-11 18:45 
GeneralRe: Product of Salary Pin
Anubhava Dimri16-Mar-11 21:24
Anubhava Dimri16-Mar-11 21:24 
AnswerRe: Product of Salary Pin
Wendelius19-Mar-11 10:55
mentorWendelius19-Mar-11 10:55 
Questionhow to user OPENXML and relate information of two different table data..... [modified] Pin
Sasmi_Office14-Mar-11 21:01
Sasmi_Office14-Mar-11 21:01 
QuestionHow to send data from DB to all running application X's... Pin
Sander Rossel14-Mar-11 11:30
professionalSander Rossel14-Mar-11 11:30 
AnswerRe: How to send data from DB to all running application X's... Pin
Wendelius14-Mar-11 11:56
mentorWendelius14-Mar-11 11:56 
Hi,

There are really many ways to do this, for example:
- If you want to check that no-one has made modifications after reading the data include optimistic locking. In this case include a column into the table which is modified every time the row is changed and include the value from this column in UPDATE/DELETE statements.
- If you want to prevent changes from another session after you have read the data until you release it, then take advantage of the pessimistic locks, i.e. lock the row the user is editing for example with a simple update. However this is typically not the best solution since transactions should never include user conversations.

But in any case do not include edit-state information in the table. In order to do that you would have to commit the change into to database and you would be in trouble in no time since you would have 'locked' rows left in the db.

You didn't mention the DB vendor, but for example in SQL Server there's a special datatype rowversion (timestamp in older versions) for optimistic locking.
The need to optimize rises from a bad design.My articles[^]

GeneralRe: How to send data from DB to all running application X's... Pin
Sander Rossel14-Mar-11 12:36
professionalSander Rossel14-Mar-11 12:36 
GeneralRe: How to send data from DB to all running application X's... Pin
Wendelius14-Mar-11 12:42
mentorWendelius14-Mar-11 12:42 
GeneralRe: How to send data from DB to all running application X's... Pin
Sander Rossel14-Mar-11 13:24
professionalSander Rossel14-Mar-11 13:24 
GeneralRe: How to send data from DB to all running application X's... Pin
Luc Pattyn14-Mar-11 13:43
sitebuilderLuc Pattyn14-Mar-11 13:43 
GeneralRe: How to send data from DB to all running application X's... Pin
Wendelius14-Mar-11 19:24
mentorWendelius14-Mar-11 19:24 
JokeRe: How to send data from DB to all running application X's... Pin
Sander Rossel14-Mar-11 21:15
professionalSander Rossel14-Mar-11 21:15 
GeneralRe: How to send data from DB to all running application X's... Pin
Wendelius14-Mar-11 19:23
mentorWendelius14-Mar-11 19:23 
AnswerRe: How to send data from DB to all running application X's... Pin
jschell15-Mar-11 7:59
jschell15-Mar-11 7:59 
GeneralRe: How to send data from DB to all running application X's... Pin
Sander Rossel15-Mar-11 8:21
professionalSander Rossel15-Mar-11 8:21 
GeneralRe: How to send data from DB to all running application X's... Pin
jschell16-Mar-11 8:21
jschell16-Mar-11 8:21 
AnswerRe: How to send data from DB to all running application X's... Pin
Klaus-Werner Konrad16-Mar-11 8:00
Klaus-Werner Konrad16-Mar-11 8:00 
QuestionMySql connector and VS2010 SP1 Pin
Daniele Fusi14-Mar-11 4:59
Daniele Fusi14-Mar-11 4:59 
QuestionHow to create user 'sa' on Sql Server Pin
AmbiguousName12-Mar-11 4:25
AmbiguousName12-Mar-11 4:25 
AnswerRe: How to create user 'sa' on Sql Server [modified] Pin
Wendelius12-Mar-11 6:14
mentorWendelius12-Mar-11 6:14 
AnswerRe: How to create user 'sa' on Sql Server Pin
jschell13-Mar-11 10:19
jschell13-Mar-11 10:19 
QuestionConverting to a Relational Database [modified] Pin
Dominick Marciano11-Mar-11 17:26
professionalDominick Marciano11-Mar-11 17:26 
AnswerRe: Converting to a Relational Database Pin
Wendelius12-Mar-11 6:38
mentorWendelius12-Mar-11 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.