database access implemented