I am thinking of writing a database management module....

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
User avatar
duclet
Forum Members
Forum Members
Posts: 187
Joined: Fri Jun 23, 2006 12:55 pm

I am thinking of writing a database management module....

Post by duclet »

(For goodness sake, please response II) :(
Now that I got your attention, let me hear your ideas. I am thinking of writing a database management module that can backups, restore, copy, and most importantly merge and synchronize databases together. Backups, restore, and copy is easily done but the merging part is quite complicated especially when I don't know for use the structure of each table in the database.

I am toying with the idea of maybe adding an index and a last updated timstamp column to each of the table in the database to help monitor each row modifications. Then when the time comes to merge, check each table last modification date and if there are different, we check the individual rows. Obviously, this is going to take a lot of time because we have so many table and most web hosts sets a limit on the execution to be 30 seconds. So, to bypass that, I will probably implement some kind of AJAX mechanism that stops what it is doing after it has run for more than 25 seconds but remembers where it was at so it can continue from where it left off. When it is done, it would allow the user to select the action to take if it.

Not perfect by any stretch but it is at least an idea. There are a lot of edge cases because of all the references and associations we have with CMS Made Simple but I think for the most part, this should do pretty well. I love to hear some other ideas on how to tackle this merging database situations though.
Last edited by reneh on Sun Jun 01, 2008 11:55 am, edited 1 time in total.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: I am thinking of writing a database management module....

Post by Russ »

You could copy the database locally and do it there and then put it back. Google MySQL diff.
Not sure why you are trying to do this though?
Post Reply

Return to “Developers Discussion”