1. Integrated database into MainActivity and ScanActivity.