Javascript Database Management Class