I have few client local application which will insert data into a local table called as tblTransaction where I have transactionID,transactionDetailsID,outletFromID,outletToID ,stockID,transactionDate,transactionTime,transactionType and some other fields. So after some interval all this data will be copied into a central database with same name tblTransaction so the primary key I have set as transactionID,transactionDetailsID,outletFromID,outletToID and transactionType. So now the problem is in the central server I would like the order the data all by the sequence of occurrences. So now I depend on the date and time. So what I foresee is the local client maybe able to change their date and time and secondly due to cmos battery they can sometimes date and time becomes slower etc. So in order to avoid date and time is there any other method to maintain the sequence at the central server of all the transaction from all the clients.
the sequence of transactions from each individual client will be preserved
however, the accuracy of the timestamps might be incorrect
Ok let me give one example two data one from outletID=2 and outletID=3. So in this scenario I will see that the data from outletID=3 is after from outletID=2 but in reality let say the exact date for outletID=3 is 2010-01-05 but it was change by the client pc. So how to maintain this scenario ?
Data from outletID=2
transactionID (5),transactionDetailsID (15),outletFromID(2),outletToID(2) and transactionType(s),transactionDate(2010-01-11),transactionTime(20:00:00)
Data from outletID=3
transactionID (6),transactionDetailsID (26),outletFromID(3),outletToID(3) and transactionType(s),transactionDate(2010-01-12),transactionTime(20:00:00)
i guess you will need to synchronize the clocks on the remote computers
Any idea how can I synchronize all the clocks is it via mysql or other methods? Thx.