[Phpmyadmin-devel] Suggestions for Import/Export Changes
Derek Schaefer
derek.schaefer at gmail.com
Mon Jun 29 21:35:33 CEST 2009
Hello everyone,
I have a couple matters that I wanted to get input from you all on.
First, possibilities for the new import interface. For those who don't
know much about my GSoC project, one of the goals was to create an
intermediary interface for editing the structure of a new
database/table set that was deduced from some import data. Via this
interface the structure is to be altered and changed as necessary
(dropping tables, changes keys, etc.) and once the user is satisfied,
it is created and the data (now adapted to the new structure) in
inserted. This involved storing all the data from the import in a PHP
session so the source wouldn't have to be reanalyzed after the user
made edits to the structure. I have been having some second thoughts
regarding such an interface. Depending on the size of the import, the
PHP session could take up a considerable amount of memory. Also, all
database and table options are editable after creation via the current
regular db/table interface, therefore I believe the intermediary
interface would be redundant at best, and counterintuitive as worst.
All the while being rather inefficient. I find that directing the user
towards the newly created database and/or tables via a notification
after a successful import is simple, effective, and vastly more
efficient.
Suggestions, thought, comments, concerns, anyone?
Second, I would like to propose a new XML export format to better
support my new import features. This new format will present the
option to export the SQL creation code for each of the exported tables
in the manner outlined below:
<?xml version="1.0" encoding="utf-8" ?>
<!--
-
- phpMyAdmin XML Dump
- ... etc. etc. etc.
-->
<pma_xml_export version="1.0"
xmlns:pma="http://www.phpmyadmin.net/some_doc_url/">
<pma:structure>
<pma:db_name>
<pma:tbl_name_1>CREATE TABLE `tbl_name_1`...</pma:tbl_name_1>
<pma:tbl_name_2>CREATE TABLE `tbl_name_2`...</pma:tbl_name_2>
<pma:tbl_name_3>CREATE TABLE `tbl_name_3`...</pma:tbl_name_3>
</pma:db_name>
</pma:structure>
<db_name>
<tbl_name_1>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_1>
<tbl_name_2>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_2>
<tbl_name_3>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_3>
</db_name>
</pma_xml_export>
...as opposed to the existing format:
<?xml version="1.0" encoding="utf-8" ?>
<!--
-
- phpMyAdmin XML Dump
- ... etc. etc. etc.
-->
<db_name>
<tbl_name_1>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_1>
<tbl_name_2>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_2>
<tbl_name_3>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_3>
</db_name>
If you have any advice, I would love to hear from you.
Thanks for your time and advice,
Derek Schaefer
More information about the Developers
mailing list