Functional Database Connection and Querying with DAOs