proposal – Export relations scheme to other formats in phpMyAdmin

phpMyAdmin is an open source tool intended to manage the administration of MySQL database. It has functionalities such as creating,deleting or modifying databases,tables,rows or fields. Currently phpMyAdmin has support to export relations scheme to PDF format. This project is to extend the export functionality of relations scheme to other formats such as SVG,EPS,and Dia, which are much more suitable for inclusion in documents.

Short Description : Currently phpMyAdmin has support for creating PDF file format from relations schema. The purpose of this projects is extend the exporting functionality to create SVG[1], EPS[2] or Dia[3] files, which are much more suitable for inclusion in documents.

Benefits for the users : After the implementation of this project, users will be able export schema’s to SVG, EPS or Dia formats. These formats allow to view the database structure more dynamically. These formats are also much more suitable for including in documents. For example, SVG format is Scalable. So by using the Adobe Plug-in, users can zoom-in and out, and because it is vector format, there can be more detail to view when zoomed in, which is not previously visible. SVG is also an XML implementation, so the users can edit and transform SVG files by XML tools and languages.

Project Detail :

Current way of phpMyAdmin exporting relation schema’s to PDF is done on-the-fly without requiring external extensions. But for these formats im going to use two extensions of PHP. Using these external libararies will give an advantage of writing small amount of code for the same purpose. Another important advantage is that these extensions are written in PHP and they are properly maintained and good in shape.

My idea would be to implement a base class for rendering the database schema. This class would consists of methods which would be used for rendering the primitives (line, box, text, etc) and subclasses for each format which would actually implement these methods.

A short description of the formats


According to W3C, SVG is a standard for XML based “Scalable Vector Graphics”. Due its nature being XML, it is easy to generate, debug , read , define own or include details from other namespaces directly in SVG document. The most important use of SVG format is that it is a better solution to image scalability requirement. Because in SVG, the image data represented as vector paths and can therefore be scaled up to a higher resolution without any distortion or quality loss.


Dia file is basically a XML file when there is no compression applied to it. This file is viewed with the Dia program tool which is used to create UML diagrams.


Encapsulated Post Script (EPS) is actually a Post Script file, which describes an illustration or an entire page. It is a standard file format for importing and exporting Post Script files. The purpose of an EPS file is to be included in other pages. An EPS file can contain any combination of text, graphics and images.

Creating SVG and Dia with PHP’s DOM API

PHP DOM [4] extension allows to operate on XML documents through the DOM API. This API allows programmatically to generate a complete well-formed XML document on the fly and save it to disk. An example for creating a XML with DOM API can be found at here [5]. Since SVG is an XML and Dia is also another XML when there is no compression applied, it will be easy and comfort working with DOM for the creation of these files.

Creating Post Script with PHP’s PostScript Document Creation Module

The PostScript Document Creation Module [6] allows to create PostScript documents with PHP. The PostScript Library’s text rendering functions can handle kerning, hyphenation and ligatures which results in much better output of boxed text. After the creation of a PostScript file, then it can easily be converted to EPS format by some modification to it’s text content.


Included options for exporting schema’s to SVG, EPS, and Dia.

Functionality to export schema to SVG, EPS. And Dia formats.

A base class for rendering the schema with set of methods for rendering the primitives for drawing.

Subclasses for each format to implement the above methods.

Time : I would make this project as a full time job during the twelve weeks period.

Bio : I’m Kishanthan Thangarajah from University of Moratuwa, Sri Lanka. Currently I’m reading for my 3rd year as an undergraduate student majoring in Computer Science and Engineering (CSE). I’m very passionate about open source software. I have worked with open source software like WordPress and developed a plug-in for that. I’m very competent in technologies like PHP, Java and Java Script. I’m familiar with MySQL because I have been using MySQL as the database for all of my projects.

Experiences & Open Source projects :

I have worked on a number of web site projects using PHP. I have developed a data base project in PHP for coordinating the sponsorships for events which are annually organized by the CSE Department. I have used MySQL as the database [7].

I have developed a Custom Search plug-in for WordPress with PHP [8].

phpMyAdmin contributions : I have resolved this [9] issue. Patch for this issue at here [10].

References :









About kishanthan

I’m currently working as a Software Engineer at WSO2, an open source software company. I hold an Engineering degree, majoring in Computer Science & Engineering field, from University of Moratuwa, Sri Lanka.
This entry was posted in GSOC and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s