Factor out common SQL functions into a storage package.  This will aid when more tables are added.