Modified table classes and completed query in entriesprovider
Finished database classes