Added functionality to access database file using SQL query