For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.
Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!
I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Which database should I use? MySQL v SQLite
Which SQL Database would I advise newcomers with a new application to use?
Five years ago, MySQL would have been the obvious choice in many circumstances. But these days, MySQL has grown into a much bigger product and there are very serious licensing and other commercial issues that need to be considered; whilst it remains open source, it's a very long way from having a license that's close to public domain.
The answer these days may, still, be MySQL. Or it may be PostgreSQL. Or it may be SQLite. But the answer will certainly include a caveat to warn the newcomer to write his SQL in such a way that it's not impossible to change at a future date. A wrapper - a set of functions that hides the actual database - is a good idea. And that may be quite thin, or it may include lots of extra facilities. Such a wrapper is included, for example, in your model classes in Ruby on Rails via Active Records and a host of other methods and facilities.
Reduced to SQL commands, SQL doesn't vary as much as you would expect; the admin, logging in, and control of multiple appications differs but the actual tables and table commands are remarkably similar ... with SQLite typically offering the most restricted set. It's therefore a logical approach to code for SQLite
if it provides everything you need, in the knowledge that you can move on to MySQL or PostgreSQL or something else later.
By way of example, I wrote a series of SQL commands in MySQL earlier today, and then sourced them though the mysql client program. I then edited that series of commands to see how much needed changing for SQLite to be sourced through the sqlite client program. The answer was "not very much". Apart from the removal of the database stuff (and replacing database level flushes with table level flushes), the only thing that caused an issue was a right join ... and that could easily be rewritten as a left join.
The SQLite file is [here]
and the MySQL file I started with is [here]
And here is the full difference report:
trainee@brugges:~/ruby$ diff seeds.mysql seeds.sqlite
< #%% MySQL example - table joins
< drop database if exists jamie;
< create database jamie;
< use jamie;
> #%% SQLite example - table joins
> drop table aisles;
> drop table products;
< select * from aisles right join products on aisles.aid = products.aid;
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articlesS200 - MySQL - SQLite 
The future of MySQL - (2010-01-03) 
PyQt (Python and Qt) and wxPython - GUI comparison - (2010-04-28) 
Connecting Python to sqlite and MySQL databases - (2010-04-28) 
Model - View - Controller demo, Sqlite - Python 3 - Qt4 - (2010-04-29) 
Factory methods and SqLite in use in a Python teaching example - (2010-05-29) 
Perl - database access - DBD, DBI and DBIx modules - (2010-12-22) 
Steering our Python courses towards wxPython, SQLite and Django - (2011-01-19) 
Files or Databases? MySQL, SQLite, or Oracle? - (2011-04-28) 
Ruby / SQLite3 example program, showing JOIN v LEFT JOIN - (2013-02-16) 
SQL databases from Python - an SQLite example - (2013-03-02)S152 - SQL Primer as Used in MySQL 
MySQL - LEFT JOIN and RIGHT JOIN, INNER JOIN and OUTER JOIN - (2004-12-20) 
NULL in MySQL - (2005-04-06) 
MySQL - a score of things to remember - (2005-11-12) 
SELECT in MySQL - choosing the rows you want - (2005-11-22) 
MySQL - an FAQ - (2005-12-03) 
Key facts - SQL and MySQL - (2006-02-04) 
How do I query a database (MySQL)? - (2009-06-15) 
INSERT, DELETE, REPLACE and UPDATE - changing the content of SQL tables - (2010-11-19) 
Databases - why data is split into separate tables, and how to join them - (2010-11-20)
Some other Articles
From SalfordReally Simple RailsClear, concise examples - Ruby classes and objects.Reading and checking user inputs - first lessons - RubyWhich database should I use? MySQL v SQLiteNew guest ... becoming returning guestAnnual Accounts - a big job for a small businessWeb and console - same principle, same code - Ruby exampleImages of Melksham you havent seen before
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page
This is a page archived from The Horse's Mouth at
the diary and writings of Graham Ellis.
Every attempt was made to provide current information at the time the
page was written, but things do move forward in our business - new software
releases, price changes, new techniques. Please check back via
our main site for current courses,
prices, versions, etc - any mention of a price in "The Horse's Mouth"
cannot be taken as an offer to supply at that price.
Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).