Made changes to student profile

added a class and functions to check if database is open before
completing database ops.