My functions in DBMS.cpp