Implemented database in UI