Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [transactions]

A transaction is a set of operations that must all succeed; failure in any of the operations results in a rollback, such that none of the operations takes effect. (For questions about financial transactions that do not have this all-or-nothing property, use the [finance] tag instead.)

Filter by
Sorted by
Tagged with
1 vote
1 answer
62 views

Updating multiple database tables when products are shipped back by customer

So, in this example I have to make these changes in my tables: Select Product Data => SKU, QTY Insert into shipping_back table Update in shipping_back to current date Update in customers to ...
user avatar
0 votes
0 answers
20 views

Trying to secure a payment transaction with mysqljs2

In my web app, I am trying to secure a payment transaction, that is: prevent users spending more than they have, especially in the case of concurrent execution and prevent partial execution. ...
user avatar
-1 votes
1 answer
59 views

IF SELECT statement will break SQL ACID Compliance? [closed]

My QA told me that I should not use IF SELECT before doing an UPDATE statement because it will breaks the atomicity of a ...
user avatar
  • 141
4 votes
2 answers
171 views

Using a transaction to create account records

This is my first time using commit and rollback. I just need to know if this is a proper execution of the functions for this particular situation: ...
user avatar
0 votes
0 answers
43 views

Is my implementation of connection scope for Dao right?I have Dao and Service where I implement connection and transaction scope

I have DaoFactory that returns DaoImpl and can make connection/transation scope ...
user avatar
2 votes
1 answer
67 views

Reducing Inventory Quantity When Order Is Being Processed

I've got a method which removes quantity from inventory when an order is completed. If there is not enough inventory quantity available, the order completion fails and the sql transaction is rolled ...
user avatar
  • 143
2 votes
0 answers
24 views

Correct way of doing transactional queries [closed]

I am trying to do multiple queries in one call, so I organized my code as below: ...
user avatar
3 votes
1 answer
106 views

Updates or creates an entity based on if a value is present in an Optional

I need to get car info from a 3rd party web service and persist the data in my application DB. If my DB already has the car, I only update property values that may have changed. Otherwise, I create ...
user avatar
  • 299
1 vote
0 answers
686 views

SQL transaction management in Node.js with MySQL: use the existing transaction or create a new one if none exists

I'm trying to implement a SQL transaction management in Node.js, that would append queries to an existing transaction if available, or create a new one if none exists yet, thanks to an optional ...
user avatar
  • 111
3 votes
0 answers
42 views

Separation of database and network calls

I have a API and the corresponding service method is like this: ...
user avatar
1 vote
1 answer
1k views

Thread Safe Bank Transaction: Deposit, Withdrawal, Check Balance and Transfer in Java

I have made a class which is a thread-safe implementation supporting Deposit, Withdrawal, Check Balance Querying and Transferring of money. I have a class Account: ...
user avatar
  • 21
3 votes
1 answer
141 views

Deleting millions of logs in batches

I have a fast growing table with logs that I frequently have to delete (the server doesn't have much resources). It grows by at least two million entries every day. The database is a SQL Server 2012. ...
user avatar
  • 43.8k
1 vote
1 answer
824 views

Isolate a Database Change Within Django Transaction.Atomic

I have been typically adding the @transaction.atomic decorator to my endpoints and appreciate if a request fails at any point the data completely rolls back. However, some of my endpoints will make ...
user avatar
6 votes
1 answer
1k views

Transaction manager, supporting undo/redo, using C++ templates

I've implemented a basic TransactionManager class that manages undoing/redoing of arbitrary Actions which have access to the <...
user avatar
1 vote
0 answers
2k views

Transaction integrity in asp.net core with entity framework and generic repository

I am not very experienced in Entity Framework, I previously used ADO.Net and Dapper for data persistence. For now, I only read Microsoft docs and watched a few video tutorials. I tried to stick to ...
user avatar
  • 131
4 votes
0 answers
87 views

Swift framework that facilitates making atomic changes to several objects at a time

For the purposes of an app I work on I have created a separate framework that abstracts away the mechanism of making atomic changes to the complex object structures. Each class that has to ...
user avatar
1 vote
0 answers
3k views

Transactional Stack

It is about Stack of numbers, that can have transaction. If you begin transaction, you need to commit it in order to actually add numbers to stack. Transactions can be nested. ...
user avatar
  • 19
7 votes
2 answers
197 views

Synchronization of transaction processing

There's a server which does the following: Receive request with transaction id Load corresponding transaction from storage. New transaction object is returned each time Process transaction Save ...
user avatar
  • 73
1 vote
1 answer
1k views

UnitOfWork without repository and transaction

I've created the unitofwork class below: ...
user avatar
  • 131
4 votes
1 answer
2k views

Data Access Layer method with transaction handling

I just want to know whether I've done transaction handling well. Also what about the other types of transactions available in .NET with regard to this code snippet? Also are there any redundant ...
user avatar
  • 1,733