How to ensure that simultaneous usage will not corrupt data

Hello

i ' am, developing financial application that will have cca. 600 concurrent users.
My poor table presentation that holds financial data is

Date J C balance
1 10.01.2010 10 0 10
2 12.01.2010 20 0 30
3 12.01.2010 70 0 100
4 12.01.2010 0 15 75
5 12.10.2010 0 25 50
6 12.10.2010 200 0 250

Very important column is the Balance that is recalculated at each insertion. So if insert us a line between the first and second rows, it would be like this:

Date J C balance
1 10.01.2010 10 0 10
-> 500 0 510 10.01.2010
2 12.01.2010 20 0 530
3 12.01.2010 70 0 600
4 12.01.2010 0 15 575
5 12.10.2010 0 25 550
6 12.10.2010 200 0 750

Problem is when two users at the same time wants to insert a new line. In my example if they want to insert a date line 10.01.2010 each of them would get previous balance 10,00. And we mistake in the balance.

Date J C balance
1 10.01.2010 10 0 10
-> 500 0 510 10.01.2010
-> 200 0 210 10.01.2010
2 12.01.2010 20 0 230
3. ...

How can I ensure that it won't happen. Help, please.

Kind regards
Igor

I think that per query is much better, because

-There will be no impact on performance when inserting
-No locking while insertion
-the data will be always compatible

Tags: Database

Similar Questions

  • How to ensure that certain information is not duplicated in a table

    Hello

    I have a table 'demand' with columns < person and status >. Now I can have any number of records in this table for a particular person, but not more than 1 with status = pending.

    Can someone help me on this.
    CREATE UNIQUE INDEX one_pending_status
       ON request( (CASE WHEN status = 'PENDING' THEN person ELSE NULL END) );
    

    This takes advantage of the fact that Oracle indexes not NULL values. If the index will be only an entry for an individual if the status is pending.

    Justin

  • How to open a document illustraor silently, so that the user will not see it

    Hi all

    I work with Illustrator CS5 and you want to import a picture (files HAVE) documents Illustrator in another document. When I tried event file-> place work file converted to pdf object. Are there other ways to import the work as it is in another file.

    A work around is: to open files in Illustrator, copy content to the Clipboard, paste it into the desired document layer, close document.

    But I need to open these documents in silent mode so that the user will not see them. Is there a method to open the illustrator silently files?

    Please report a solution or any suggestions would be welcome.

    Thanks in advance.


    D.

    Ok. To open a document in your own format in silent mode, you register your file using AIFileFormatSuite::AddFileFormat format. Then in the GoFileFormat Manager, you treat the document, and then return an error code, e.g. kBadParameter. The document never appears and Illustrator shows no error, but you treated the file data. You then extend this technique to work with the files have.

  • How to ensure that my computer has microphones and then use them for talking to Cortana?

    How to ensure that my computer has microphones and then use them for talking to Cortana?

    Hi Walter,

    Please start by http://windows.microsoft.com/en-us/windows-10/cortana-privacy-faq

    Also, try to review this tutorial: http://www.tenforums.com/tutorials/4026-cortana-turn-off-windows-10-a.html

    They should help you get started.  Problems specific to the micro (existence, activation, volume,...) will be addressed (more than the troubleshooting steps if Cortana doesn't) that you go through the above; However, a "one-stop-shop" for microphones & recognition recording & speech covering all peripheral aspects are versatile control panel page (see the path in the blue header at the top of the screenshot pictured below for W10Pro 11102).

    Best wishes

    Kosh

  • When I try to send an e-mail with attached pictures, I am told that the photos will not appear in the e-mail message.

    When I try to send an e-mail with pictures, a pop-up window appears when I hit SEND and says that the photos will not appear in the e-mail message.  How can I fix it?

    original title: e-mail problems.

    Hello

    I suggest that ask you your question on the following link.

    http://answers.Microsoft.com/en-us/windowslive

  • I just wrote about firefox 3.6 with 5.0 for my mac OSX and discovered that my mac will not support it. Is there a way I can recover my lost files and recover the old version?

    I just wrote about firefox 3.6 with 5.0 for my mac OSX and discovered that my mac will not support it. Is there a way I can recover my lost files and recover the old version?

    You can download and install Firefox 3.6 http://www.mozilla.com/firefox/all-older.html

  • I just bought the rest of photography, then a message popped up on the screen saying that my computer will not support the program. Will I have to pay?

    I just bought the rest of photography, then a message popped up on the screen saying that my computer will not support the program. Will I have to pay?

    Please check the terms of System. Photoshopand unresponsive to your material, please update your computer or cancel the order, for this you can contact customer service

    [Note: make sure that you are connected to the Web site with the valid Adobe ID under which the product is]

    For more information on cancellation: cancel your creative cloud membership

  • LTR6.2.1: import function: I imported the 4 JPGs from my iphone. the photos were black. After a while, I found that I had read in the metadata and then had the photos. How to ensure that the metadata is read in the always?

    LTR6.2.1: import function: I imported the 4 JPGs from my iphone. the photos were black. After a while, I found that I had read in the metadata and then had the photos. How to ensure that the metadata is read in the always?

    1. Turn off apply tone auto under Lightroom preferences settings
    2. Restart Lightroom and then import images again.
  • It seems that wrapped text will not host photo resizing without cutting and pasting the image resized, is - what the Muse way is suppose to work?

    It seems that wrapped text will not host photo resizing without cutting and pasting the image resized, is - what the Muse way is suppose to work?

    It would be the default path to wrap the text with the image when you work in Design view.

    This document explains more:

    https://helpx.Adobe.com/Muse/using/wrapping-text-image.html

    Thank you

    Sanjit

  • Adobe starter edition has the photo of the image as DSCO0283 number. JPG, where can I find this number on the photos in PHOTOSHOP ELEMENTS 12 - reason being that photoshop elements will not convert my catalogue in version 12. If I had this number I neck

    Adobe starter edition has the photo of the image as DSCO0283 number. JPG, where can I find this number on the photos in PHOTOSHOP ELEMENTS 12 - reason being that photoshop elements will not convert my catalogue in version 12. If I had this number that I could manually reconstruct that my collections in photoshop 12 items, but everything I see in photoshop elements is dates and I have several images from the same dates. Help! I have

    Hello

    If you look at the thumbnails in the Organizer, try going into the menu display and check that the Details and file names are checked. The name of the file and the date must appear below each thumbnail. If they do not appear, you may need to increase the size of the thumbnail using the slider to zoom (lower-right).

    Good luck

    Brian

  • How to ensure that the new RAM will be compatible with my computer?

    Hello

    I have a PC that I want to put a new RAM in. I know how to insert the RAM. But y at - it a chance it will not work and will not work.

    The PC is a desktop computer and Win XP Home. I hope that upgrade to Windows 7 if it is successful. 512 MB of ram currently.

    JK

    Kingston and have all two Crucial fairly complete memory configurators

    http://www.kingston.com/worldwide/default.asp - use the drop-down list upwards to the right called "research paper."

    http://www.crucial.com/?click=true - start with the drop down "select the manufacturer."

    You have your motherboard manual? That should tell you what memory is compatible.

    Or failing that get back to me with your motherboard brand and model or brand of PC and model and I will be able to help.

    Tricky

  • 18 Firefox now prints a page using extended fonts so that the information will not fit on an A4 page. How can this be repaired?

    When you try to print a page as a bank statement, Firefox 18 prints now in a large font size so that the information does not fit into the page (A4). Previously, there was no problem and the information printed exactly as on the screen. There is no problem when printing from Google Chrome. In previous versions of Firefox, there is no problem. What has changed and how it can be corrected?

    See:

    Try to adjust the print scale: file > Page Setup > "Format & Options": scale (deselect: "Shrink to fit page width")

  • How to ensure that "" is not creating a studio ODI data store. ?

    Hi Expertise,

    While I creates a store of DATA (TABLE) in the studio of the ODI, I have created a table name with quotes Double for the table as example 'TABLE_NAME'.

    Is there a method to get rid of this. ?
    At the studio of ODI, it does not show the name of the table with the quotes, but when I'm trying to see a TOAD, I get the quotes.

    Can someone help me on this. ?
    I can't do "' to the table I create in the studio of ODI.

    Thank you

    Shakur

    Hi Shakur,

    Go to the topology-> Oracle technology-> language (tab)-> delete quotes under object delimiter, and advance to the next field to ensure that the change is made, then save.

  • How to check that the variable 'does not contain' value?

    Hello

    I use CP 7.0.1.237.

    We want to use the widget text box for a custom quiz and verify a response. While we understood how to check the existence of certain key words, we are not able to find a way to check that the content does NOT contain certain keywords. For example, we want to ensure that the text entered in this widget does not contain a "Transformation" and "Non-compliant.

    Is this possible at all?

    Thank you

    Anthony

    Anthony, it works perfectly. Created this conditional action with 4 decisions. I used the interaction of training text scrolling in CP8 (because now you can control the variable - which means I might have a Reset button):

    First decision:

    Second decision (the third is similar to the following)

    Fourth and final decision

    I put the variable words (v_first... v_fifth), it's a reflex I use since I shared actions that much. The variable associated to the ETB (you can now reset an empty var in CP8) is v_TextArea and the Boolean value that will decide if positive feedback (StarOK) should be shown is v_TA_OK. If you want to display a negative feedback, put this in the ELSE part of the final decision.

    FYI: it took 15 minutes, including the creation of assets and the variables and tests. Personally I would have needed more time to do it in JS, but that's just me.

    Lieve

  • How to ensure that the graph xy plots are present?

    Hello community,

    Since the update to LabVIEW 2014 this week, I have a problem with the code that worked (or didn't, but the problem was unnoticable).

    As example the llb I created to present the question, I'm graphic xy filling with quiete some data and then color programmatically plots.

    The problem is that if there are too many plots then the property nodes that are to color the mistakes of Mr. thow plots as if the corresponding plots were not present in the graph still - even if I used a single flat sequence structure to try to ensure that the data is written in the plot before trying their color.

    Maybe this wouldn't be in LabVIEW 2013 too - but the threshold for the number of plots was higher. All I can say is that I have observed this with data sets that worked well in 2013 of LabVIEW.

    To reproduce simply run 'color of the graphs.vi' with values high enough to 'numerisch' and ' numerisch 2 "(50 on my machine can be more about yours).» I left the terminal nodes property unwired error so you get caught up in the right position when the error occurs.

    Somehow check if all parcels are in the charts again? This way I could introduce a delay that ensures that I don't have the color of the graphics that do not exist yet - regardless of the speed of the target computer.

    Xy graph behavior has changed in 2014 of LabVIEW? Or maybe his performance?

    Best regards

    Florian

    HM, your addendum somehow answered my question. We are indeed an against the user interface thread race condition.

    Unfortunately, I do not know a method to wait than the UI thread to have access to all plots. In addition, the waiting time that you need depends on the ability of the system, which is dynamic, you know not all processes background or in parallel, running applications.

    That being said, I recommend a work around:

    1. create the data for the plots

    2. how many plots you have in query data

    3 write short dummy data in the terminal, and not the data of the whole plot

    4 Recolor plots

    5. write the correct field data

    Norbert

Maybe you are looking for