[Tutor] Creating and storing objects from a GUI...
Mon, 25 Feb 2002 08:18:35 -0500
On Thursday, February 21, 2002, at 11:00 AM, Israel Evans wrote:
> I was thinking SQL would be nice, but due to my ignorance, databases,
> feel a little like a black box to me. I'll have to do a little more
> research into them.
Pick up MySQL and set it up on a Linux box if you can, after a few days
of playing it will feel like an old friend. The MySQL mailing list is
also very helpful. You can take it further and learn all of the
advanced SQL queries too if you want.
> What's your opinion on the mixing of XML and RDBMS? Would data stored
> in a
> Database be saved in table/cell format and then extracted to an XML
> through XSLT in order to be displayed elsewhere, or would the database
> the data already in XML? I like the promised flexibility of XML but
> the multitudes of specifications and formats and so on is overwhelming!
> Would you in your right mind mingle XML and an RDBMS?
Keep in mind that RDBMS and XML are fundamentally dissimilar storage
formats. The strengths of one are negated by the other. I'm just
learninga bout this myself, so I don't know everything -- but the point
of a RDBMS is to have a relational, normalized structure that can be
searched based on arbitrary relationships between objects, so that the
database is not dependent on trees (tree-style databases are always
under development but cannot match the speed of a RDBMS when they to a
certain size). XML's strength (in terms of information storage) is in
its hierarchical, tree-like storage structure. So they're really not
very complementary technologies.
This is too bad, since I have easy access to a MySQL server and want to
play with Python and XML myself! But it doesn't mean you can't try to
find a clever way to work around this. For instance, if your XML
documents are not terribly deep, you could just use MySQL's data storage
abilities and do exactly what you have suggested. It's only with large
applications that you need to consider whether or not a RDBMS can help
you. I'm not sure what the intendede application is for your wife's
dance studio, but maybe storing flat XML files will be more
appropriate. Is speedy searching for data something that you will need
to do? You could store the filenames in a database, if you knew that
the data was in a particular file, or you could store attributes of
files into a database and use a RDBMS to do searches and then the
results could point to the file's name or location. In this fashion,
you wouldn't really be storing the actual data you want in the database,
Please post your discoveries, if you pursue the RDBMS + XML. I found
the following links to be somewhat helpful: