Jump to content

Please read the Forum Rules before posting.

Photo

Computer Science: e-Sword and Databases. Part 1


  • Please log in to reply
26 replies to this topic

#1 APsit190

APsit190

    e-Sword Tools Developer

  • Members (T)
  • PipPipPipPipPip
  • 2,861 posts
  • LocationLand of the Long White Cloud (AKA New Zealand)
Offline

Posted 06 April 2012 - 08:24 PM

*
POPULAR

Sort of an Introduction

Primarily and basically e-Sword is a Database Reader, in that it reads only database files. The database file format it reads are SQLite (*.sqlite) files which have been given their own extensions. These extensions are:
  • anlx - Common file
  • bblx - Bible files
  • cmtx - Commentary files
  • dctx - Dictionary files
  • devx - Devotional files
  • harx - Harmony files
  • illx - Sermon Illustration file
  • jnlx - Journal Files
  • lanx - Language file
  • mapx - Map/Graphic Files
  • memx - Memory Verse files
  • notx - Study Note files
  • ovlx - Markup files
  • prlx - Prayer List file
  • refx - Reference Library files
  • topx - Topic Note files
A few of them are generated by e-Sword at first start up, and they reside in the user's My Documents\e-Sword folder.
  • common.anlx
  • journal.jnlx
  • markup.ovlx
  • memory.memx
  • prayer.prlx
  • study.notx
  • topic.topx
All the database files generated by e-Sword are user files which are editable. Topic, Study, and Journal Note files are used in the editors. The language.lanx database file is used by e-Sword for language configuration of different non English speaking countries.

All the above files are used by e-Sword. It can and does handle multiple database files.

With the exception of the e-Sword generated files and the Illustration.illx file, all the other files are Read Only and cannot be edited in e-Sword. Where these files are unsecured they require an external database application or a database extension application to edit these files. The Database application required is SQLite, SQLite Browser, and SQLite Manager. Database extension application used for e-Sword are T4, and SQLite Regexer.

Conversion tools such as BeST and eSword9Converter are database file conversion programs. All they do is convert a file from one format to another. Ben's e-Sword Tool converts html, csv, MS Access files to SQLite database files, and eSword9Converter converts previous e-Sword 9x (MS Access) files to the current format.


How does e-Sword read Database files

The short answer to that is, its been programmed to do that. OK, now for the long answer.

To understand how e-Sword does this, one has to have a bit of an understanding of Databases. Basically all databases follow the same principle irrespective of the type they are (and that we will go into later). A database is made up of the following
  • 1 or more Tables
  • 1 or more Fields
  • 1 or more Records.
And that is basically what are database is comprised of, and not much more than that.

A Table is what holds all the Fields and Records where data/information is place in it. In SQLite, an e-Sword Bible database file has a Table called "Bibles," and in this Table there are several fields.

A Field is the place where data of different kinds/values goes in. So each field has to be setup with its own value for the kind of data that goes into it. Not all data that goes into it is the same. Some Fields are numerical and they have their own values such as, Date, Integer, Float, Decimal, and etc. Then there are the Text Fields, and they too have their own values such as Memo, Text, and etc. Also a Field can be given a value as to how many digits or characters can fit in a Record.

The Fields (with their values) in an e-Sword's Bible files are:
  • Book - Integer (which is a whole number)
  • Chapter - Integer
  • Verse - Integer
  • Scripture - Text
So, in the Fields Book, Chapter and Verse only numbers go in them. In the Scripture Field only the text of a particular verse of the Bible goes in there.

When e-Sword was using Microsoft Access database files, these kind of Tables and Fields were in them. So principles of a database is basically the same right across the board. So it doesn't matter what the name of the database program is, the way its set up is basically the same.

When e-Sword reads the information in each Field of the Table, it has to interpret what is in it. Each number in the Book Field represents the name of the Bible. So where the number 1 is read, That is shown as Genesis, and so it goes right through the Table getting all the information it in to display it.


Different Kinds of Databases

Basically there are three types of Databases, and they are:
  • Relational Databases. These are MS Access, Paradox, Oracle, and a few others.
  • Object Orient Database. There aren't many of them floating around, and there is only one that I know of, and that is Jade.
  • Flat Databases. I think databases of this type are SQL Server, MySQL, and similar (if I'm wrong here, someone may be able to correct me). Internet Search Engines such as Google, Yahoo, Bing and etc are flat databases.
All these databases follow the same kind of principles in regards to Tables, Fields and Records, and where the differences lie in these Types Databases are in their capability of what they can and cannot do. Flat and Object Oriented Databases are non relational. Object Oriented Databases have a Method principle where Tables are read. I'm not certain how Flat databases work.

Ok, this is the end of Part 1, and I trust this is helpful to you in understanding how e-Sword works.

Blessings,
Autograph.png

Edited by APsit190, 30 August 2012 - 04:36 PM.

X (formerly Twitter)

 


#2 fbeetge

fbeetge

    New to Bible Support

  • Veterans
  • Pip
  • 2 posts
  • LocationVereeniging, South Africa
Offline

Posted 09 April 2012 - 07:36 AM

At last!! This is just what i had been looking for.
One question:
when I select the 'Scripture field' from the 'Bible' table, it comes back as a BYTE Array. At first i thought the array represented the ASCII values of the characters of the scripture, but then found that it had values representative of the extended ASCII table, so no go there. How do I go about decoding the 'Scripture' blob field to text?

Edited by fbeetge, 09 April 2012 - 07:57 AM.


#3 APsit190

APsit190

    e-Sword Tools Developer

  • Members (T)
  • PipPipPipPipPip
  • 2,861 posts
  • LocationLand of the Long White Cloud (AKA New Zealand)
Offline

Posted 09 April 2012 - 08:27 PM

How do I go about decoding the 'Scripture' blob field to text?


You don't! Where you see the Scripture records as having been "blobbed out" (good way to put it) in the Database, is that it has been secured. Only e-Sword official files have been blobbed out. All third party Bibles are open, in that they haven't been blobbed out.

Sorry I can't help you out on that.

Blessings,
Autograph.png
X (formerly Twitter)

 


#4 fbeetge

fbeetge

    New to Bible Support

  • Veterans
  • Pip
  • 2 posts
  • LocationVereeniging, South Africa
Offline

Posted 10 April 2012 - 11:19 AM

Thanks for the prompt reply. Pity, but not the end of the world. I am writing an application that combines Scripture, my own text, graphics, real time handwritten notes and annotations, as well as video clips in a presenter/presentation ( dual screen) type display. for the moment I can cope with my 23 3rd party .bblx's, but I will be looking for a 3rd party version of the KJV, Message as well as God's Word translation. I have been attempting to do this from the time that e-Sword uses Access as their database, but could not get anybody to help me with the passwords (silly me, I thought that because the KJV was Public domain, it would be open to everybody)

This Web site, and your tutorials have really been a blessing to me.

Francois J Beetge

#5 jonathon

jonathon

    e-Sword Fanatic

  • Contributors
  • PipPipPipPipPip
  • 753 posts
Offline

Posted 10 April 2012 - 10:17 PM

I thought that because the KJV was Public domain, it would be open to everybody


At least until 1961, and possibly even after that, the Bible was not public domain in South Africa. It is distributed under Letters Patent. Copyright belongs to the Crown (Monarch of Great Britain.).


jonathon

#6 patchworkid

patchworkid

    Resource Builder

  • Members (T)
  • PipPipPipPipPip
  • 1,554 posts
  • LocationOld England
Offline

Posted 11 April 2012 - 02:59 PM

hi
please follow my instructions:

1. download Tool Tip Tool NT and open it. http://www.biblesupp...ooltip-tool-nt/
2. download (any, or most) bibles from this site http://www.biblesupp...egory/2-bibles/
3. click on Modules (at the top list)
4. scroll down to bible and click on Read Bible File.

This is one but main way to have a bible in rtf.

you can use this tool http://www.biblesupp...dule-dumper-30/ It creates the bible in plain Text or CSV for excel (used with BeST2 http://www.biblesupp...ile/2524-best2/ )

Thank You
Patchworkid
Merismos the Scriptures with Patchworkid's Study Bible Set<p>http://www.biblesupp...tudy-bible-set/, MySword -http://www.biblesupp...tudy-bible-set/

#7 APsit190

APsit190

    e-Sword Tools Developer

  • Members (T)
  • PipPipPipPipPip
  • 2,861 posts
  • LocationLand of the Long White Cloud (AKA New Zealand)
Offline

Posted 11 April 2012 - 05:04 PM

hi
please follow my instructions:

1. download Tool Tip Tool NT and open it. http://www.biblesupp...ooltip-tool-nt/
2. download (any, or most) bibles from this site http://www.biblesupp...egory/2-bibles/
3. click on Modules (at the top list)
4. scroll down to bible and click on Read Bible File.

This is one but main way to have a bible in rtf.

you can use this tool http://www.biblesupp...dule-dumper-30/ It creates the bible in plain Text or CSV for excel (used with BeST2 http://www.biblesupp...ile/2524-best2/ )

Thank You
Patchworkid


Niobe,
This only works with third party resources and not locked modules. Where official e-Sword modules have been blobbed out in the database, they are secured, and cannot be edited by any external application let alone SQLite Database Application, SQL Manager and SQLite Browser unless one has the password for it. Only data that has been left open, such as the Details table and the sqlite_master table are editable in e-Sword's official database files. Please note the blobbed out field in the Screenshot of a locked Bible file in SQLite Manager.

Attached File  Cannot be Edited.jpg   188.92K   165 downloads

Blessings,
Autograph.png
X (formerly Twitter)

 


#8 kriegshn

kriegshn

    New to Bible Support

  • Veterans
  • Pip
  • 12 posts
Offline

Posted 30 August 2012 - 08:54 AM

Primarily and basically e-Sword is a Database Reader, in that it reads only database files. The database file format it reads are SQLite (*.sqlite) files which have been given their own extensions.
Blessings,


hi, if I open a bblx-file with sqlite-dsatabasebrowser which I downloaded on biblesupport and go in to the table "Bible" it shows just silly signs in the collom <Scripture>.
Where is my fault?

#9 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,890 posts
  • LocationGallatin, TN
Offline

Posted 30 August 2012 - 10:30 AM

hi, if I open a bblx-file with sqlite-dsatabasebrowser which I downloaded on biblesupport and go in to the table "Bible" it shows just silly signs in the collom <Scripture>.
Where is my fault?


It could be that the bblx you downloaded is encrypted/compressed. Those cannot be viewed through a SQLite editor. Without knowing which Bible, I can't know for sure.

#10 APsit190

APsit190

    e-Sword Tools Developer

  • Members (T)
  • PipPipPipPipPip
  • 2,861 posts
  • LocationLand of the Long White Cloud (AKA New Zealand)
Offline

Posted 30 August 2012 - 04:21 PM

hi, if I open a bblx file with sqlite database browser which I downloaded on biblesupport and go in to the table "Bible" it shows just silly signs in the collom <Scripture>.
Where is my fault?


Usually that is because the bblx file has been locked (passworded), and the only thing you will see is "BLOB: (size 128) or something like that, or that you may have downloaded a Hebrew or Greek file. If that is the case, and you see those silly signs, they are either the rtf or the UTF in rtf code for those letters, e.g., if you see something like \u123 ? and etc., that is rtf in UTF code. If you see something like \'e0 and etc., that is an rtf code for either a Greek or Hebrew letter.

This document may help you to understand what I am talking about (http://www.biblesupp...ebrew-chartpdf/) and I trust this will help you.

Blessings,
Autograph.png
X (formerly Twitter)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs