Tuesday, June 23, 2009

For data synchronization I was able do the following tasks :
  • Accessed data from source and target databases.
  • Mapped the matching and non-matching tables in the source and target databases.
  • Saved the data difference.

I yet have to apply the data difference on the target database. For all the work I have done till now source and target databases resides on the same server.

Problem that hindered my work was that data could not be retrieved by $_REQUEST and $_POST if require_once is there in the file. Therefore, the code written so far is hard coded for values of servers.

I have mailed the first patch to my mentor and am waiting for suggestions for the work done till now.

Coding and testing the corresponding queries required to apply the data difference between the target and source databases. Start to code GUI 2.

Saturday, June 13, 2009

Key Accomplishments This Week!

I had planned 9 days to code the first GUI and put it in the pma code. But luckily I was able to put the "Synchronization" tab and the first GUI in pma code by Wednesday 10th June. This was a great accomplishment and now I have more time for data synchronization, my next milestone.

Screenshots of the GUIs with Synchronization tab are:






Now I am analyzing the source code for functions I will be needing for data synchronization. Function for making connection, for queries etc.

Thursday, June 4, 2009

Planned interface for phpmyadmion Synchronization

GUI 1

On pressing the synchroninzation tab at the top, this GUI will be shown. Here the host, username, password, port and database name for the databases to be synchronized will be given.
On the basis of the given information, connections of databases are established with their respective servers.

On pressing "Go" the next GUI will be shown.


GUI 2

In this GUI, corresponding tables of sourcedb and targetdb will be shown.
Red, blue and green color indicates structure difference, type difference and data difference respectively. In front of the table name the presence of red, blue or green button will indicate that there is a difference in structure, type or data. The colored buttons are clickable and on pressing the green button in front of table name 'Person', the data of target table will be synchronized with that of source table.
Also the corresponding query generated for the required synchronization, will be shown in the text area at the bottom. Color of the button(data sync, structure sync or type sync) will change after it has been clicked to confirm that the command has been saved for execution. This way any type of synchronization user want, will be saved.
I am also thinking to add a remove button after each query in the text area, to facilitate the user to revert any synchronization selected previously.
Once the "Execute All" button is pressed all the saved synchronizations will be executed. This way user can synchronize selective tables from the databases.
The presence of the "+", "-" signs with source and target table Organization shows that this table is present in the source and not present in the target.
The "Synchronize databases" button will synchronize the target database with the source database and this comprises of applying all the differences on the target database.






























Tuesday, June 2, 2009

Activities after my exams

I was busy with my final exams from 18 May to 28 May. I was unable to give time during that one and a half week.
As coding started from 23 May and I am behind the schedule so I have planned to cover up that time.

Firstly, I am working on the plan till the mid evaluation. The plan will include my weekly milestones and soon I will be sharing that.

I am setting the environment these days. I have downloaded SVN and have checked out phpmyadmin code. Also I have planned to use Eclipse and Xdebug or Nusphere for debugging.

Currrently I am looking at different tools available for synchronization, which could give me an idea about the UIs. I have analyzed some tools which includes Navicat, SQL Yog and Spectral Core. After analyses I have identified some UI which should be there in the synchronization process.
Also I thought about where to place the synchronization button or tab in the original phpmyadmin page. Most appropriate place I could find was with the other tabs like "Databases, SQL, Variables,..." on the phpmyadmin page.

Other than the UI, I have also started to work on the backend logic. I took two tables from the same database on the same server and found structural differences. I yet have to apply those differences on the target database.

I also went through the code of phpmyadmin. I looked at the files db_create, db_printview and index.php.