xml to sql generation

thread: 7 messages  |  last: about 4 years ago  |  started: thursday, december 27, 2007, 9:42 pm pst


#1  |  bhazzard (Helena, MT) United States of America
Thursday, December 27, 2007, 9:42 PM PST

I love the way Qcodo works. It is absolutely the best ORM and MVC framework in existence for web developers. In my research to find a suitable framework there was only one place where I ended up feeling jealous of symfony/propel users and that was the xml to sql and model objects code generation.

The way it works in symfony is that you define a table structure in xml and then simply set a configuration with the database information and it generates the database, sql create scripts for maintenance purposes and the ORM objects.

This is much easier for a developer to handle when changing database engines because it abstracts the DBMS specific syntax out of the task. Making switching engines truly a matter of changing one or two configuration variables.

In Qcodo, the process is easy, but not quite as smooth. We must write the sql and then generate the ORM objects. But then when changing DBMS engines we may have to rewrite the sql.

#2  |  alex94040 (Seattle, WA) United States of America Qcodo Core Contributor
Friday, December 28, 2007, 8:58 PM PST

I only half-buy that; I don't want to have to design the XML model for my DB. I'm comfortable clicking here and there in phpMyAdmin, or Navicat (or whatever other MySQL GUI). Then, I use MySQLDump to check in the DDL scripts into the source control, works like a charm.

Is there really a need to switch RDBMS engines that often on a project? Even if so, the DDL is vastly compatible between, for example, MySQL and Postgre, so if you use MySQLDump, you can reuse most of your code.

#3  |  bhazzard (Helena, MT) United States of America
Friday, December 28, 2007, 9:24 PM PST

I understand that tools exist that make creating the db pretty quick and easy, but the xml model makes for better independence and an easier “re-deploy” process.

Better Independence: Often times a client knows more about what they need an application to do than they do about what platform it needs to run on and other technical details. the xml model allows you to jump start a prototypical design without paying any mind to the DBMS, then we can just regenerate for any new database model.

Currently Qcodo is pretty darn dependent on MySQL (which many companies have a grudge against for one reason or another), it would be nice to jump from one database to another without a hitch.

RE-Deploy: I know... I sort of made up that term. What I mean is, if I want to start over, I have a more universally understandable model to build from. I simply reinitialize the datamodel and I have a fresh database. (symfony also allows the developer to specify test data).

#4  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Friday, December 28, 2007, 9:32 PM PST

bhazzard, thanks for your input.  And actually, I believe that your post brings to light a much larger / deeper issue within the web-based development community, to the point where I feel there would be a lot of benefit to having a couple of wiki pages up for this (heheh as soon as we get the new qcodo.com with wiki's up there =).

But there's no reason why we shouldn't start the discussion here. =)

I think that the XML vs. DB model approach mostly depends on the way your process is for developing data models.

I know that there are a lot of dev teams (especially within the PHP / MySQL) that work directly with the database in its development process (e.g. via command line tools or something like phpmyadmin)... and because of this more or less lack of formal process, something like propel's XML/YML approach to defining a data model seems a lot more structured.

But in my professional career, I have never seen a development team that, once they've seen ER-diagramming tools used correctly within the software development lifecycle, choose to make ER-diagramming tools a standard within their processes.

I think there is little argument that a visual diagram of a data model as the SOURCE of your data model will beat out any sql dump, web-based admin tool or XML file.

And qcodo's ORM was designed around this philosophy / realization.

By using export-to-sql from your favorite ER diagramming tool (i've got suggestions if you want), then you can switch DB engines whenever you want.

Moreover, by using basic/simple “diff”-based tools from your newly-generated create scripts to existing databases, you can version changes of your database, and thus, keep much better version control of your data model as the application and data model continues to change/modify/grow.

#5  |  bhazzard (Helena, MT) United States of America
Friday, December 28, 2007, 9:53 PM PST

Mike, thanks for a well-worded response. (you can call me Brian if you'd like)

I understand your stance here and cannot rebutt your point about ER tools sql export.

What tools do you suggest that offer a wide variety of SQL dialect exports?

#6  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Saturday, December 29, 2007, 9:46 AM PST

Not sure of what the market looks like for Linux...

Back in the day when I was on the Win32 platform, I was using DeZign for Databases by a company called Datanamic.  It was a slick application back in the 2.0 and 3.0 days... no frills, worked great, and cheap (e.g. it was like $75 or something like that).

Unfortunately, they've gotten considerably more expensive over the years... :-/ -- last time I checked the product, itself, is still good... but for the added $$$ all you get are (IMHO) features that you will never use.

But the ER diagramming market is pretty huge for Win32... so you can easily do as search and look around to see what suits you.

On the Mac OS X side, I highly recommend SQL Editor from a Scotland-based company  Malcolm Hardie <http://www.malcolmhardie.com/>.  It ought to be the standard for ER Diagramming applications.

And avoid MySQL's Open Source WorkBench.  It doesn't work.  Period.

#7  |  fecool (Bielefeld, NRW) Germany
Friday, January 11, 2008, 4:46 PM PST

Let me bring a link:
<http://www.qcodo.com/forums/topic.php/484/1/2/?strSearch=architect>

Here we discussed some weeks ago, which ER-Tools are around. Perhaps you'll find your's. Good Luck!



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.