Added fetch function to display database contents.