Lo and behold! The bible database contains two full translations of the bible, King James and Basic English, as well as the Apocrypha. Verses are on one row each, with cap/book/verse columns to find your way around.
So if you want to get God into your database, and have MySQL 4.1 or higher, then get downloading.
| contents | gzip file | plain file |
|---|---|---|
| Bible | bible.mysql.gz 3 MB |
bible.mysql.txt 11 MB |
Once you've done that, you might wish to look at the Instructions to get it all working esp. if you're a mysql noob. Otherwise get with the Holy SQL.
Much faster than I anticipted, a bunch of goodies arrived in the post from MySQL. They said allow 4 - 6 weeks for the certificate to arrive, but it actually took a mere eight days, not bad considering it had to be mailed from America to London. It's a little surprising when an organisation I normally deal with electronically actually sends a letter. A real-live employee even filled in the custom declaration on the front of the envelope.
So what was in the envelope?
And it came to pass. Or rather I just passed the second test in the MySQL Developer exam. One of the nice things about doing Pearson Vue's system is you get instant feedback, so when I clicked the 'End Exam' button the next screen said 'You passed'. No congratulations or any namby-pamby stuff like that though. I'm a little sceptical whether the next stage will work: the folks at Sun/MySQL HQ have to realise that I passed both tests and send 40 naked virgins er, sorry, I mean a certificate to my home address.
I just took part one of my MySQL 5.0 Developer test and I'm delighted to say I passed.
I was a little apprehensive before taking the test because, try as I might, there was general information about the test I just couldn't find out about. For example
To be sure, the word God occurs a fair few times in the bible. 4117 times at least.:
In fact 4117 is a tad on the low side. The count(*) query scores 1 point for each line with the word 'god' in it, but plenty of lines mention god twice or more. Not to mention all the other ways of naming God: Lord, Jehovah, our Father etc.
A quick quiz on some of the basic MySQL stuff: where the conf files are kept, types of connection. Relates to Chapter One in the Certification Guide.
Hope you like the site's new theme. It was created by Joe Thompson of Ventura Cottage. He used Michelangelo's painting from the Sistine Chapel, God Creates Adam, blended in with a screen shot from a mysql client. The theme is a modification of Drupal's Garland theme.
The bible is essentially a read ony database. Users really shouldn't go around updating verses to suit their own purposes. So how about using MySQL's triggers to do a little snooping on anybody trying to tamper? The idea is anyone who attempts to update a row in the bible will have their change reported in the meddlers table.
First we'll create the meddlers table.
CREATE TABLE meddlers
(
autokey INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
user VARCHAR(255),
`DATE` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
Fulltext Indexes were a new feature in MySQL 5.0, and they're meant to be a wonderful way of searching through large tables with Text column types (or Varchar, for that matter).
I was curious to see how a Fulltext search differed from a regular pattern match search. So I set up Fulltext Indexes on the line column (i.e. the bit with the text in). The syntax for searching through Fulltext Indexes involves the keywords MATCH and AGAINST. Let's find out how times Abraham is mentioned in the bible, first using the Fulltext Index:
People love to know where all the juicy stuff is in the bible. So how about we create a table which points in the right direction? Note the use of the SET data type, on one of its rare outings.
CREATE TABLE juicybits(
book VARCHAR(32),
cap TINYINT UNSIGNED,
verse_start TINYINT UNSIGNED,
verse_end TINYINT UNSIGNED,
title VARCHAR(255) NOT NULL,
class SET('prostitution','virgin',
'insults','rape','slavery',
'willy','bear-maul','stoning')
);