It's all about the answers!

Ask a question

RTC Project Area Database table


Jeremy Upright (2145) | asked Jul 22 '16, 2:54 p.m.
 I know that it is not recommended to query directly on RTC database tables, but sometimes we have a need to do this.  In this case, I want to query for All users within a project area.  Specifically in my case, I want to be able to grab no only the users name, but also their user ID.  Any advice on which tables I would join to be able to pull these details?  Looks like CONTRIBUTOR_RECORD_USER_IDS and CONTRIBUTOR_RECORD get me partially what I need.  Just missing the Project Area table.

One answer



permanent link
sam detweiler (12.5k6195201) | answered Jul 22 '16, 3:34 p.m.
don't see why you would need to use the database to get that info.

from a utility I have


for (IContributorHandle member : iprja.getMembers())
                {
                    IContributor user = (IContributor) auditableClient.fetchCurrentAuditable(member, ItemProfile.createFullProfile(IContributor.ITEM_TYPE), null);
                }


Comments
Jeremy Upright commented Jul 22 '16, 4:36 p.m.

 I appreciate the feedback.  I guess the reason I am looking for the db table is because I am more comfortable with SQL.  If I am being honest, I am not sure how to use the information provided above.


Kevin Ramer commented Jul 22 '16, 5:23 p.m.

I can affirm what Sam has said.  There are many things going on in the database that are better accessed through tooling other than SQL [ I'm a competent DB2 admin ].  If you want to do something one-off, RTC eclipse can export information about a given project into a collection of (local) html pages. 
Alternately for automation, a very small java program can do quite a lot when it comes to ferreting out user information.  This excellent article on examining repository contributors and roles is a good place to start.


sam detweiler commented Jul 22 '16, 5:40 p.m.

this is an object oriented system.
to reduce memory, the objects are 'handles' (persistent pointers) to the data.
you use one of the

auditableClient.fetchCurrentAuditable() 

methods to get back some or all of the data elements of an object. 
(if u only need the name, why get everything?)..

a contributor 'object' has a lot of data elements..  name, userid, email address, etc,etc,etc...

if you look in the javadoc you will be able to look at the methods for retrieving the data from the object (no direct access).

how the data is stored in the database is not disclosed, and is volatile.. the methods are not volatile.

Your answer


Register or to post your answer.