Google Summer of Code: 9th week


9th week  is gone  and I explored XML for MS Visio Schema, EPS Schema format and issues for making PDF, SVG and Dia Exports downloadable. I had coded pdf,svg and dia exports that these will be prompted for download. It was working on my local wamp installation but not on demo server. Unfortunately that issue is still not resolved and after putting a lot of time on it I forget it and moved on.

For EPS schema, I found php extension pslib but unfortunately its DLL is not available. Though I can use this extension with Linux environment but I decided to use hand coded lib for Encapsulated Post Script files. Lots of information notes are available here about Post Script documents plus programming commands. So, I am going to code it from Monday.

For MS Visio Schema, I consulted MSDN and will code the library class for generating its XML schema like I did for SVG Schema.

Hope for best !!



Google Summer of Code: Mid Term Evaluations

Hi, I am very delighted that I have passed the mid term evaluations of my project. So far, I have done PDF, SVG and DIA export relations schema’s. SVG and DIA export is done by using  [0] extension of php. It was not easy to use that library because there was not much support tutorials or documentation available even at [1]. But I worked hard on it to make it work finally. [0] gives us a superb support when we have to write/generate long length XML files. Continue reading “Google Summer of Code: Mid Term Evaluations”

Google summer of code | 6th week

During the 6th week of Google Summer of Code, I finally completed the structure of Relation Schema and PDF is successfully working now with the new OOP structure of Relation Schema.  SVG Schema structure is also ready to implement now. Dia structure is also inline ..  I documented some classes and renamed the methods/code according to PEAR standard naming conventions. I tried my best to do the best documentation. However, If I left anything I will ready to fix it.

I got welcome package from Google and very happy for their gifts + specially designed payment card. They actually motivated me to write more Open Source code. I am learning a lot during this Project.

In next week – I will try my best to implement the Dia and Svg Relational Schema Exports. So, I could ready for mid term evaluations.

5th week

5th Week is over and I have committed what I have done so far. Following is the demo server URL

where you can see it in action. PDF is working fine with rewrite of some of its structure. while SVG is in process. waiting to hear the structural comments about my code from my mentor. In this weekend , I am exploring the DIA’s XML. so, I could finally make all these 3 Export Schema’s in action till the mid-terms. I am putting my days and night to achieve it.

Google summer of code 3rd week ended !

3rd week of the coding period has been ended and I am feeling a bit comfortable now that I will be able to make the SVG and PDF Export with a better classes structure in next coming week. But I have my mid term exam at 15th June , So I will try my best to achieve it.

I explored SVG (Scalable Vector Graphics) . It’s elements that are used to draw the images etc .. There are two great references from where I studied about SVG .. w3schools and another is a book of Cristian Darie on PHP and AJAX

I also explored a lot the pdf_schema.php containing the classes for Drawing Tables,Relations and etc ..

I created a userSchema Class that will handle the front end HTML manipulation. It contains creating a page and the selection of type of relations i.e foreign key or internal relations,   scratchboard and select the type of export relations section with options ..


Muhammad Adnan

Google Summer of Code 2010, 2nd Week !

In this week, I have finally started getting my hands over with REAL OOP in php. I have developed a class structure named Abstract Factory Pattern that will be more enhanced as I move forward.

Currently, the class structure includes an Abstract Relation Schema Class which will be the extended by PDF,DIA,VISIO,SVG and EPS Schema classes. There is a User Schema Class that contains almost all the User Interface elements.

well, I am not yet able to implement the PDF Export in this class structure yet. But I am sure, In next week. I will be able to do so. I have pushed export_branch in my git repo at

I learned a lot in this week, Thanks to Google Summer of Code and phpMyAdmin !

Summer of Code – First week ended !


Today is end of the first week and In this week, I tried my best to figure out the following things !

1. Forked my git repo from

2.  Played with Git Commands and still learning it.

3. Explored OOP techniques for coding the base class structure and sub classes for each Exporting Type. I will come up with the sample code in next week.

Looking forward 😉

[export relations schema project] Google SOC 2010

Hi Guys, I am posting my proposal  that was recently accepted for Google Summer of Code 2010 at phpMyAdmin. It is a great chance for me to do something really honorable in my life 😉   I will try my best to do everything according to plan. Following is the original proposal.

Exporting Relations schema to SVG,EPS,PDF,MS Visio and Dia’s XML file formats


I will introduce very magnificent features to help the demonstration of dynamic view of database structure by using PHP,MYSQL and XML, having ability to export Relations schema
in SVG,EPS,PDF,MS Visio and Dia’s XML file formats. The features, I am catering will possibly be available in phpMyAdmin schema tab along with other tabs.

Benefits to the users:

Just a couple of clicks away from the fabulous demonstration for any type of project related to databases. Dia,SVG and Visio formats store its diagrams as XML documents while Pdf and Eps are also widely used document formats. So, all these formats are much more suitable for the inclusion in the documents.

1. SVG is a language for describing 2D-graphics and graphical applications in XML.

2. The EPS file can contain any combination of text, graphics, and images,and it is the same as any other PostScript language page description with only a few restrictions.

3. Each Adobe PDF file encapsulates a complete description of a fixed-layout 2D document that includes the text, fonts, images, and 2D vector graphics which compose the documents

4. You could even edit the dia XML diagrams by hand. It can be used to draw many different kinds of diagrams. It currently has special objects to help draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and simple circuits.

5. All types of Visio documents (drawings, stencils, and templates) can be saved in the XML for Visio format.

Project Details:

I have planned to do the exporting relations schema (without Data Dictionary) to 5 formats including the rewrite of PDF schema that is currently bounded to just pdf. So, I will basically create a base class for rendering the schema and then implement subclasses for each format including the rewrite of PDF.

My efforts will actually be a PHP script which takes the database structure in phpmyadmin and exports the proposed formats. It will be Object Oriented Module that can be extended with other formats in future.

My game plan is to use XML Writer extension (This extension represents a writer that provides a non-cached, forward-only means of generating streams or files containing XML data) for generating XML in native format of Dia’s XML Program,SVG and Microsoft Visio’s Formats. I will not use any existing library for these formats because I will program them myself. However, for PDF , I will use tcpdf existing library and at last for EPS I will need to create Post scripts file manually by using pslib provided by php. Specification of all the formats are available. So, it will not be problem to create the files manually.

EPS Specification

MS Visio


Users will be able to put the title of the documents at the time of exporting schema. There is an option that this feature should be available with the tabs at top or it should be in Operations tab.


Results will be a module of phpmyadmin that produces relational schema of database structure without data dictionary in SVG,EPS,PDF,Visio and Dia Formats.

Project Schedule:

During Community bonding period I will study the internals of PMA though I will feel better understanding after doing couple of patches. when coding session will start following will be my schedule and I will give u updates every week. I will also stay online in IRC during working on project.

week-1 : code the base class and subclasses structure

week-2 : implement PDF export

week-3 : code the SVG structure subclass

week-4 : implement SVG export

week-5 : code the Dia structure subclass

week-6 : implement dia’s XML format

week-7 : code the Visio structure subclass

week-8 : mid-term evaluation

week-9 : implement Visio format

week-10 : code the EPS structure subclass

week-11 : Implement EPS format

week-12 : Final Evaluation

I will keep posting the updates to the community to get some feedback.