Nearly finished the assigned functions in DBMS.cpp