SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    873
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Maintaining Central Db Sequence of Data

    Dear All,
    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.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    the sequence of transactions from each individual client will be preserved

    however, the accuracy of the timestamps might be incorrect
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    873
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear r937,
    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)

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    i guess you will need to synchronize the clocks on the remote computers
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    873
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear r937,
    Any idea how can I synchronize all the clocks is it via mysql or other methods? Thx.



    Quote Originally Posted by r937 View Post
    i guess you will need to synchronize the clocks on the remote computers

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by newtomysql View Post
    Any idea how can I synchronize all the clocks
    sorry, no
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •