Software Testing and Analysis for Database Applications