Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Alternative access solution

Alternative access solution

From: Miha <miha.znidarsic_at_ixtlan-team.si>
Date: 9 Nov 2001 04:31:12 -0800
Message-ID: <8c69a0da.0111090431.3fe3f665@posting.google.com>


Hello.
We are looking for alternative access solution for our current data structure: Simplified:

ACCOUNT              - Account data (ACC_ID)
ORGANIZATION         - Organization data (ORG_ID) - hierarchical structure
ACCOUNT_ORGANIZATION - Which organizations can access accounts (ACC_ID, ORG_ID)
USER                 - User data (USR_ID)
USER_ORGANIZATION    - Which organizations user can access. (USR_ID, OGR_ID)

So we want 2 that user is able to see all of his accounts. Currently we do it like this:
SELECT *
  FROM ACCOUNT ACC
 WHERE EXISTS (SELECT 1

                 FROM ACCOUNT_ORGANIZATION ACO
                WHERE ACO.ACC_ID = ACC.ACC_ID AND
                      ACO.ORG_ID IN (SELECT ORG_ID
                                       FROM USER_ORGANIZATION
                                      WHERE USR_ID = USER)
              )

We tried all possible ways of this structure but is not good enough. What we would like is to get rid of ACCOUNT_ORGANIZATION table.

Any ideas.

Thanks in advance.
Miha Received on Fri Nov 09 2001 - 06:31:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US