Adding Database and Shared preference.