Implemented database connection and missing data tables check.