Implemented database access basic structure