Message-ID: <1466847272.7454.1711622034288.JavaMail.confluence@ip-172-30-4-17.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7453_409428964.1711622034284" ------=_Part_7453_409428964.1711622034284 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Selecting the Data Source

Selecting the Data Source

Stored Workplace data is distributed to projects through the exi= stence of independent databases (in SQL Server) or schemas (in Oracle). The= se will be referred to in the rest of the document as the "persiste= nt storage location" or PSL. These PSL's are orga= nized so that the data from two metadata representations can be merged to a= "Super" data set. While a person is working on a specific project, they wi= ll be directed to data in a PSL associated with that project.
In order to support the i2b2 project distribution stra= tegy, the user is enrolled in numerous projects recorded within the i2b2 pr= oject management cell. The projects available to the user are returned in t= he web service call to the Project Management cell. The logic of selecting = the correct PSL for the project is embodied in the following table.

DB_LOOKUP

 

 

PK

C_DOMAIN_ID

VARCHAR(255)

PK

C_PROJECT_PATH

VARCHAR(255)

PK

C_OWNER_ID

VARCHAR(255)

 

C_DB_FULLSCHEMA

VARCHAR(255)

 

C_DB_DATASOURCE

VARCHAR(255)

 

C_DB_SERVERTYPE

VARCHAR(255)

 

C_DB_NICENAME

VARCHAR(255)

 

C_DB_TOOLTIP

VARCHAR(255)

 

C_COMMENT

CLOB

 

C_ENTRY_DATE

DATE

 

C_CHANGE_DATE

DATE

 

C_STATUS_CD

CHAR(1)



The = logic for selecting the PSL is as follows:

  1. There are two methods to select the correct PSL, an implicit one, and a= n explicit one. Both rely only on information available within the i2b2 hea= der.
    1. The implicit one relies upon the data within the <domain> tag, th= e <username> tag, and the <project_id> tag.
    2. The explicit one relies upon the data only within the <project_id>= ; tag. It has the format represented as the following string:


"DOMAIN"

"PROJECT"

"USER_ID"



  1. The table is meant to provide a series of default locations if ones are= not specifically listed. If a project is listed in the _C_PROJECT_PATH_ co= lumn, then that PSL may be used, otherwise a domain source will be used.
  2. If a username is listed in the _C_OWNER_ID_ column, and the project als= o matches the PROJECT_ID, the PSL in that row may be used otherwis= e a project PSL will be used. If the project PSL does not exist, the domain= PSL will be used.


For example, only if the domain \ = project \ user_id is an EXACT match to the entries in the database wil= l that PSL be used.


  1. The project may not have an entry in the table and in that case any pro= ject  would be designated the PSL of the domain.
  2. If a general domain PSL is not available in the table and only a specif= ic project is associated with the domain in the table, then any incoming me= ssages not associated with that project will return an error.
  3. In the table, the "@" character is used to represent the absence of an = entry (rather than a blank or a null).
  4. In the explicit string and in the <project_id> an "@" can be used= to optionally represent a blank column.



Othe= r columns are specified as follows:

  1. The column _C_DB_FULLSCHEMA_ is used to contain the path to a table whe= n the data source is used. Software is written so that the absence of the d= elimiter (usually a ".") does not need to be explicitly stated.
  2. The column _C_DB_DATASOURCE_ is used to contain a short string that rep= resents a data source configured in some other location.
  3. The column _C_DB_SERVERTYPE_ can be "ORACLE" or "SQLSERVER".
  4. The column _C_DB_NICENAME_ is a string that can be used in the client s= oftware to describe a data source.
  5. The column _C_DB_TOOLTIP_ contains a longer (hierarchical) representati= on of the nicename.



To r= estate, many cells need to access some kind of persistent storage, and thes= e cells will organize their persistent storage so that it is self-contained= and can be apportioned in a way consistent with the project-based requirem= ents of i2b2 that are described above. To that end, a table exists in many = cells to make the decision of what persistent storage location to which a s= pecific user will be directed, depending on the project and domain to which= they are associated.

------=_Part_7453_409428964.1711622034284--