Implemented a part of logic responsible for a read/write operations from the database