MySQL vs XML: pros & cons?

Lewis Balentine lewis at keywild.com
Tue May 17 21:44:43 EDT 2016


HTML = Hyper Text Markup Language
Basicly a page description language developed to display web pages.

XML = Extended Markup Language

Now I am probably make some infuriate some people but ...

HTML and XML are plain text files that were never intended to be 
databases. The fact that XML formatted files can be used as databases, 
and are in fact used as data base, speaks more to the flexibility of the 
specifications than the suitability. A true DB engine such as MySQL or 
SQLite is as more often a much better solution. These engines are better 
at performing DB type operations such as lookups, sorting, indexing and 
batch updates. It also allows the access to the data by other 
applications (/even if only in read only mode/) via standard SQL language.

It is true that GNUcash has not implemented transaction locking or 
foreign keys that would to protect the data in a multi-user/multi-app 
environments. However other applications could still be created to 
access the data as long as the programmer is careful to follow the 
constraints that are implemented within the GNUCash application code. If 
one wants to creating a reporting application that only reads the data 
then there is little if any likelihood of corrupting the data.

As regards backups and roll backs: Personally I have no experience with 
a 'roll back' system built into GNUCash. If using GNUCash in a single 
user environment with SQLIte then backups are a simple as copying a 
single file. 'Rolling back' back to that version is only a matter of 
renaming the file.

I have been creating a number of reports for GNUCash using the SQLite 
command line utility. You could also use your office application under 
in the Windows environment to do reports or male merge via ODBC. Under 
linux getting ODBC to work is a bit more problematic /(thus far I have 
no joy in this regard)/. http://www.keywild.com/gnucash/

ok .... now I am going to duck behind the nearest wall ....

Regards,

Lewis Balentine



On 05/17/2016 07:58 PM, David T. wrote:
> I recall reading a developer a few years back saying that the schema is not fully normalized, and a lot of the data logic is interpreted in code, rather than being reflected in the schema.
>
> Some have created reports that utilize SQL for their data (google: "gnucash sql tutorial site:lists.gnucash.org”). Others are more comfortable managing the data on a db server. Still others like the immediate commit that SQL yields them, although others have lamented the lack of a rollback feature. There has been a lot of discussion over the years on the list about the relative merits of each storage method. The archives of the list would be the best way to catch up on those discussions. I personally use the XML backend, since it is stable, and there is little daily benefit to me to change. Perhaps some of those SQL users can weigh in.
>
> David
>
>> On May 17, 2016, at 8:23 PM, Don Ireland <gnucash at donireland.com> wrote:
>>
>>  From the provided link:
>> "Until GnuCash supports simultaneous multiuser use almost all users are better off with the XML backend."
>>
>> But I've read that before.  My question had more to do with the fact that I've read a number of messages in which people WERE using a true dB backend and I'm curious what benefit that gives them (I'm assuming there is SOME level of benefit--otherwise why would they do it).
>> Don Ireland
>> On 5/17/2016 7:19 PM, David T. wrote:
>>> https://wiki.gnucash.org/wiki/FAQ#Q:_Should_I_use_the_XML_or_database_backend.3F <https://wiki.gnucash.org/wiki/FAQ#Q:_Should_I_use_the_XML_or_database_backend.3F>
>>>
>>>> On May 17, 2016, at 8:08 PM, Don Ireland < <mailto:gnucash at donireland.com>gnucash at donireland.com <mailto:gnucash at donireland.com>> wrote:
>>>>
>>>> Can someone help me understand the pros and cons of a MySQL backend vs XML? The only thing I can think of that MySQL would allow is for external apps to access the data directly.
>>>>
>>>> But an improperly coded app could corrupt the dB so that seems dangerous.
>>>>
>>>> Does a MySQL backend make it easier to use the python bindings or something? TIA!
>>>>
>>>> Don Ireland
>>>> _______________________________________________
>>>> gnucash-user mailing list
>>>> gnucash-user at gnucash.org <mailto:gnucash-user at gnucash.org>
>>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user <https://lists.gnucash.org/mailman/listinfo/gnucash-user>
>>>> -----
>>>> Please remember to CC this list on all your replies.
>>>> You can do this by using Reply-To-List or Reply-All.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list