Abstracting database access using the DAO pattern