Implemented the general behavior of the database interface.