Added relations and direct database access to docs