integrating database with gui