Re: PostgreSQL - regularly sync.ing remote and local data - Mailing list pgsql-general
From | Ma Siva Kumar |
---|---|
Subject | Re: PostgreSQL - regularly sync.ing remote and local data |
Date | |
Msg-id | 02041407291200.01530@Bharathi Whole thread Raw |
In response to | Re: PostgreSQL - regularly sync.ing remote and local data (Frank Hilliard <frank@frankhilliard.com>) |
Responses |
Re: PostgreSQL - regularly sync.ing remote and local data
|
List | pgsql-general |
Fortunately, this particular situation involves simpler relations. It is more like this. Buying companies place orders to their supplier companies. Supplier companies maintain the status of orders in the system. Buyer companies can login and get information about the order status. Thus, most of the update of information comes from the internal working of supplier companies and the relationship is strictly one to one (what one buyer buys from a supplier does not affect any one else in the system). If everyone uses the central server to update the transactions that is ideal. However, atleast in the initial stages, supplier companies may like to conduct their day to day operations on the local server (due to connection speeds, costs etc) and update the transactions to the central server several times a day. The information flow from the buyer is in the form of new orders, approval of samples, payment information etc. Hope now it is clearer. Even though there will be hundreds of companies in the system, each one will have a strictly one to one relationship with others. What is the best possible way to do this using Postgres and PHP? Best regards, Siva, Chennai, Tamil Nadu. > I think this is a logic question they haven't worked through. Let's say > company A and B are using the on-line server and company C is not. All > three start the day the same way with company A offering 500 shoes for > sale. Company B likes the shoes and buys 400 of them. The database on > the central server now says there are 100 shoes left. But Company C, > which also likes the shoes, thinks there are 500 since they haven't > updated their version of the database. They put in an order for 200 > shoes and only find out later they have been shipped 100, with 100 back > ordered. > > This is just a simple example with three companies. Multiply that by > hundreds of transactions and hundreds of companies and you get a real > nightmare. > > The solution is pretty simple. The companies who don't want to be > connected all day only connect when they want to conduct a transaction. > The data is updated the moment they log on, they conduct their purchase > and then they log off. > Frank Hilliard > http://frankhilliard.com/ > > Ma Siva Kumar wrote: > >We are developing an application for leather industry using PostgreSQL > > with PHP scripting. The program will be run from a central server and > > buyers and sellers will login using internet connection and > > update/exchange information through the system. > > > >Some companies do not want to be connected to the internet throughout the > >day. They want to use the system from a local server during the day and > >update the data to the central server (and get the updated data from the > >server) once or twice a day. > > > >Can someone please advise me, how this can be accomplished? That is, to > > make the two databases hand shake and exchange the changes effected since > > they last met. > > > >Best regards, > > > > > >Siva, > >Chennai, Tamil Nadu > > > >---------------------------(end of broadcast)--------------------------- > >TIP 5: Have you checked our extensive FAQ? > > > >http://www.postgresql.org/users-lounge/docs/faq.html > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
pgsql-general by date: