Monday, April 30, 2018

Scarborough Fair

The main melody is from an old song. The canticle refers to the counterpoint added to harmonize the main melody.

In Medieval times, the herbs mentioned in the song represented virtues that were important to the lyrics. Parsley was comfort, sage was strength, rosemary was love, and thyme was courage.

The things the singer asks for in Scarborough Fair are all impossible. A shirt with no seams. An acre of land between the sea and the seastrand (beach). To harvest grain with a leather blade (leather isn't very sharp), and bundle the stalks with heather (a fragile twig-like flower; doesn't make for very good rope or string).

Saturday, March 3, 2018

JDBC Connection

The early version of JDBC provided a Driver class with a GetConnection method for application.  Underneath Driver uses Java Socket class to get a connection to the database.  Later, DriverManager class provide the connection using an url.  Using a generic interface saved the application the need to know which specific driver to use.  The connection returned is a physical connection (a socket) which is adequate for a 2-tier client-server architecture as each client will create and use its own connection and seldom sharable.

JDBC v2.0 uses DataSource to support Java Transaction API and a 3-tier architecture.  An intermediate layer (application server) sits between client and the database.  DataSource returns a logical connection from a connection pool which improves performance by avoiding set up time for every JDBC connection request.