Deviation from object-relational mapping (pySQLFace)

sulyokpeti at sulyokpeti at
Wed Oct 15 08:10:27 CEST 2008

On okt. 14, 13:26, Paul Boddie <p... at> wrote:
> On 14 Okt, 00:43, sulyokp... at wrote:
> > It is not convincing to look at an XML file alone. Let me give you an
> > example. Glade is a GTK+ application for creating GTK+ GUI. It
> > generates an XML file, that can be loaded in every programming
> > language that has libglade binding. Similarly, there could be a
> > database design tool to create a database, and save SQL/DML
> > expressions into an XML config file. Then you create the RDB command
> > objects by loading the XML in your favourite language.
> I'd agree that XML makes a good interchange representation which saves
> everyone from having to parse various things, but having worked a bit
> with relational databases and having had to actively manage their
> schemas, I have to say that my primary representation for a schema is
> SQL/DDL, and that my primary representation for queries is also SQL.
> Now, there's a lot to be said for making that SQL more consumable, and
> I've done a little work on converting SQL to XML (as have many others)
> in order to make life easier for, say, tool authors, and I'd even go
> as far as saying that it should be possible to convert XML back to
> SQL, but in doing so there would potentially remain a need for the XML
> dialect to be as expressive as SQL, which then means that you have to
> replicate SQL in XML.
> > I think programming languages are intended for describing neither relational
> > databases nor GUIs.
> The above discussion is somewhat tangential to what you've done,
> though, and I certainly didn't mean to say that the use of XML was in
> any way "wrong", especially in the way you've been using it. I suppose
> that when you state the above about programming languages, you
> actually mean languages other than SQL. Even so, I'd much rather use
> SQL to describe a database table than one of the many different Python-
> based, class-plus-attributes representations so beloved of the various
> object-relational mappers.
> I look forward to seeing where you take your project in future,
> however.
> Paul

I agree more than you thought. I do not want to replace SQL with XML
either. I only use XML to interchange data (SQL/DML) between the
database designer (tool) and the application interface in order to
create a specific database interface for a certain database. It is the
focus of database design using different RDBMS-s and different
programming languages. There is an other reason for XML. At this point
my XML structure contains the SQL/DML expressions as you use it in sql
clients, and some metadata to generate documentation using XSL
transformation. That's why I provided that sqlface.xsl in the src
directory. Yes I have to relocate DTD and XSL from the python source
Relational stuff stays in the relational language SQL. Data
processing, and business logic goes into a programming language like
python. Otherwise I plan to support other languages with such an SQL


More information about the Python-list mailing list