Further updates to database function - created abstract with database and column names as constants