473,737 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Online system & transactions

Hello ppl,

Imagine some online system, based on PgSql. There are 'many' parts which
depends on each other. I will give small example, but instead of simple
table imagine changing tenths various tables (editing). So, 'change table A'
can be work for hours.

There are tables tableA and tableB. Changes are made by thin client. If
you change tableA, you have to also change tableB to 'finish' operation.
Between starting changing tableA until tableB is finished, data are 'not
valid'. Record may be changes, deleted, inserted, whatever.

Is there any simple way, how to create 'transactions' over database
connections ? These relations are really complex in real live and doesn't
fit table foundaries, so, it is basically not realistic to make it on
application layer and need to be done somehow on DB layer....

The best solution should be possibility to 'begin' transaction, 'store'
somehow on server, and next time, instead of begin new transaction return to
stored one. Transactions solves all these problems, but they don't work
across various/multiple connections....

Any ideas/references please ?
Thank you,

Best regards,
Lada 'Ray' Lostak
Unreal64 Develop group
http://www.orcave.com
http://www.unreal64.net
--------------------------------------------------------------------------
In the 1960s you needed the power of two C64s to get a rocket
to the moon. Now you need a machine which is a vast number
of times more powerful just to run the most popular GUI.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
3 1837
ra*@unreal64.ne t ("Lada 'Ray' Lostak") writes:
Imagine some online system, based on PgSql. There are 'many' parts which
depends on each other. I will give small example, but instead of simple
table imagine changing tenths various tables (editing). So, 'change table A'
can be work for hours.

There are tables tableA and tableB. Changes are made by thin client. If
you change tableA, you have to also change tableB to 'finish' operation.
Between starting changing tableA until tableB is finished, data are 'not
valid'. Record may be changes, deleted, inserted, whatever.

Is there any simple way, how to create 'transactions' over database
connections ? These relations are really complex in real live and doesn't
fit table foundaries, so, it is basically not realistic to make it on
application layer and need to be done somehow on DB layer....

The best solution should be possibility to 'begin' transaction, 'store'
somehow on server, and next time, instead of begin new transaction return to
stored one. Transactions solves all these problems, but they don't work
across various/multiple connections....

Any ideas/references please ?


You probably should look at the documentation for this.

<http://www.postgresql. org/docs/current/interactive/sql-begin.html>

PostgreSQL supports _exactly_ this notion, in exactly the way you
describe.

If you need to have multiple transactions active at once, you will
just need to establish multiple connections.
--
let name="cbbrowne" and tld="cbbrowne.c om" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/linuxxian.html
A VAX is virtually a computer, but not quite.
Nov 23 '05 #2
Hello,

You probably should look at the documentation for this.

<http://www.postgresql. org/docs/current/interactive/sql-begin.html>

PostgreSQL supports _exactly_ this notion, in exactly the way you
describe. But this is normal 'transaction' - and I didn't find way, how can I 'store'
transaction to disc storage and 'reopen' later. So, begin/commin works
within ONE connection and doesn't help in my general problem. Or is there
some way to do that with normal transactions ?

My problem is that related data changes are done in 'longer' time - e.g.
hour or so (it take hour to change all datas together) and within various
database connections.

Thx
Best regards,
Lada 'Ray' Lostak
Unreal64 Develop group
http://www.orcave.com
http://www.unreal64.net
--------------------------------------------------------------------------
In the 1960s you needed the power of two C64s to get a rocket
to the moon. Now you need a machine which is a vast number
of times more powerful just to run the most popular GUI.
----- Original Message -----
From: "Chris Browne" <cb******@acm.o rg>
To: <pg***********@ postgresql.org>
Sent: Monday, October 18, 2004 7:22 PM
Subject: Re: [GENERAL] Online system & transactions

ra*@unreal64.ne t ("Lada 'Ray' Lostak") writes:
Imagine some online system, based on PgSql. There are 'many' parts which depends on each other. I will give small example, but instead of simple
table imagine changing tenths various tables (editing). So, 'change table A' can be work for hours.

There are tables tableA and tableB. Changes are made by thin client. If you change tableA, you have to also change tableB to 'finish' operation.
Between starting changing tableA until tableB is finished, data are 'not
valid'. Record may be changes, deleted, inserted, whatever.

Is there any simple way, how to create 'transactions' over database
connections ? These relations are really complex in real live and doesn't fit table foundaries, so, it is basically not realistic to make it on
application layer and need to be done somehow on DB layer....

The best solution should be possibility to 'begin' transaction, 'store' somehow on server, and next time, instead of begin new transaction return to stored one. Transactions solves all these problems, but they don't work
across various/multiple connections....

Any ideas/references please ?
You probably should look at the documentation for this.

<http://www.postgresql. org/docs/current/interactive/sql-begin.html>

PostgreSQL supports _exactly_ this notion, in exactly the way you
describe.

If you need to have multiple transactions active at once, you will
just need to establish multiple connections.
--
let name="cbbrowne" and tld="cbbrowne.c om" in String.concat "@"

[name;tld];; http://www.ntlug.org/~cbbrowne/linuxxian.html
A VAX is virtually a computer, but not quite.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #3
On Tue, Oct 19, 2004 at 01:29:41PM +0200, Lada 'Ray' Lostak wrote:
But this is normal 'transaction' - and I didn't find way, how can I 'store'
transaction to disc storage and 'reopen' later.


That you can't do. The usual recipe for this is something like
optimistic locking -- for instance, set an int8 column to
nextval() of some sequence, and then later, when you're ready to
commit, check to make sure the value hasn't changed and do all your
work in an SQL transaction. If the value has changed anywhere, you
know you have to throw away the work you did (or present the
intermediate changes to the user, or whatever).

A

--
Andrew Sullivan | aj*@crankycanuc k.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.
--Brad Holland

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2048
by: princevejita1 | last post by:
Hello I have problem with my MySQL server and transactions. I installed MySQL server 5.0.11 with MySQL administrator & MySql Query Browser on Win XP Prof. I would like to use transactions, so I have read the manual ana I thought I knew how to do it. I set the tables type to InnoDB (i can't use BDB) and change the default mysqld.exe to mysql-max (or mysql-max-nt). I even used : SET AUTOCOMMIT=0. I'm doing more less this: 1. START...
9
7806
by: Lara | last post by:
Hello freaks, we have many problems with our online reorg and no idea how to resolve it. We had to do an online reorg beacause of 24 h online business. We start the reorg-statements (table by table) in a loop with the following statement: reorg table xxx.yyy inplace allow write access.
2
1353
by: Ketchup Please | last post by:
I'm looking to create a Web site that accepts credit card payments. On another news group I was told that I'd have to go to a bank to set up the ability to do online transactions. Is this really true? I thought there were many online financial transaction processing companies I could work with. Any pointers would be greatly appreciated.
1
1998
by: Jim Bancroft | last post by:
Hi everyone, I'm running into a problem with my ASP.Net application. I've just created a new aspx page which uses some new components of mine that inherit from ServicedComponent and are designed to run under COM+. This page works fine, unless I get fancy and hit my browser's refresh button quickly, as a test. Then, what I see happen is the transactions pile up and my ASP.Net "current requests" do the same. This happens even with two...
4
1914
by: Lada 'Ray' Lostak | last post by:
Hello there, I am thinking how to solve another typical problem of online systems with combination of thin client... Imagine simple case, 2 users are going to edit 'same' datas. Both see on the 'screen' the same, after they started edit them. First one changes datas and submit changes (sucessfully). Database (set tables - inserts/updates/deleting) was changed. At this point, datas which second user is watching are not valid anymore. They...
0
1299
by: Ben Dewey | last post by:
Guys, I am new to the System.Transactions namespace, but I am trying to use it to process powerpoint document into a database. I have a strongly typed DataSet with Talks and Slides. Both tables have a table adapters that use have StoredProcs following stored procs added: ALTER PROCEDURE dbo.save_talk
1
1848
by: RAM | last post by:
Hello, I am learning .NET 2.0 (ASP.NET, ADO.NET). I would like to ask experienced programmers when to use System.Transactions. One programmer told me that he never used System.Transactions, he only uses database transaction (SqlTransaction) and recommended me this method but he did not explained why. I have read a few pages about both transaction types in MSDN but I have little experience I don't know what are practical usages of...
3
1381
by: Ken | last post by:
I used the classes (SqlCommand, SqlConnection) of part of System.Data namespace. I got an error which mentioned "Could not load file or assembly assembly 'System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089 or noe of its dependencies. What should I do to fix this issue? Strange enough, this application works fine other boxes except one box
16
3511
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for renaming the duplicate records? My thinking was to take the results of the duplicate query, and somehow have it number each line where there is a duplicate (tried a groups query, but "count" won't work), then do an update query to change the duplicate to...
0
8786
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9467
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9331
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9204
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6749
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4567
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3278
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.