Use of object oriented programming for database access