basic entity and database access