[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libquran in embedded environment



On Wednesday 25 May 2005 10:11, Mete Kural wrote:
> >As an aside, my personal opinion is that XML is great for transporting
> > data between applications, but is poor for the internal representation of
> > data in the vast majority of applications. I prefer to have a simple
> > native object-oriented view of the data in my apps, and import and export
> > to XML as and when it's required.
>
> Actually there is an XML schema called OSIS
> (http://www.bibletechnologies.net/) that is perfect for storing the Quran
> and all translations in. I checked it out a while back. It is originally
> intended for the Bible but the way it is designed it can be easily used for
> the Quran too. I talked to the OSIS people and they supported the idea of
> using OSIS to store Quran'ic data. They are also planning to build a plugin
> for OpenOffice in order to edit OSIS documents out-of-the-box.
>
> For your information,
> Mete

The important aspect of any schema is that its structure  mirrors sufficiently 
accurately the real-life data so that the real data can be stored in it, 
searched etc. I haven't looked at OSIS but I don't doubt the the schema is 
well suited to Quranic data.

However, my point is that rather than having this schema in XML, I prefer to 
have it in my native language's objects or a database - for instance, an ayat 
would be, in C++, an instance of an Ayat class rather than  a DOM XML 
element. It could also be a row in a table of aayaats.

With some languages, like java using JDOM, there isn't much difference in ease 
of use between XML and native objects. However, compared to using C and 
libexpat, an sqlite database seems like a much simpler solution to code up 
and maintain.

Perhaps I'm biased, after all my background is large databases with many 
tables. One definite advantage to using a database is that the database 
engine has been optimised for searches. When XML is used as the data storage 
format then search algorithms have to be hand-crafted, which could be 
difficult (to do efficiently) for complicated queries that cross entity 
types. Databases can also have indexes to make searches faster, which would 
have to implemented by hand in the XML world.

The schema in the database would match that in XML  - it's just the data is 
easier and quicker to search and maintain in a database.

Anyway, each developer has to choose his own favourite poison! It's just an 
option to consider,

wassalaam
abdulhaq