Added unified utility for database access