Video 6 of 8

added database queries and defined functions.  I have not tested this
yet and I think something is missing.  Not sure what yet.