cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine from which table in the Database elements are taken?

SOLVED
Highlighted
Pearl

How to determine from which table in the Database elements are taken?

Hello everyone, please tell me how to determine from which table in the Database the elements are taken to build a table on the site Windchill? I have full access to the files and the Database.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to determine from which table in the Database elements are taken?

Hi VladiSlav,

 

As far as I know, there is no clear documentation supplied by PTC about the database schema. You may find some bits and pieces in different parts of Query Builder, JavaDocs, Windchill help and here in the Community (maps created by users).

 

Personally, I would recommend you to start with Query builder.

It will allow you to visually build the required objects and their relationships:

Query Builder Classes.PNG

 

Define all the fields you want to get from those objects:

Query Builder Constrains.PNG

 

And then have a peek at the SQL query that builds the resulting table:

Query Builder SQL.PNG

 

That should give you a good start.

 

 

Kind Regards,

Dmitry.

View solution in original post

8 REPLIES 8

Re: How to determine from which table in the Database elements are taken?

Your question is too generic to try to answer.

Please give an example of what you are trying to do.

How are you programming your access to the DB?

What DB are you using, SQLServer or Oracle?

What version and build of Windchill are you using?

 

Re: How to determine from which table in the Database elements are taken?

 

ello, I am using MS SQL and Windchill_11.1, I want to learn how to determine which table in the database the items were taken from. For example, for the table " Promotion Request"

Re: How to determine from which table in the Database elements are taken?

Hi VladiSlav,

 

As far as I know, there is no clear documentation supplied by PTC about the database schema. You may find some bits and pieces in different parts of Query Builder, JavaDocs, Windchill help and here in the Community (maps created by users).

 

Personally, I would recommend you to start with Query builder.

It will allow you to visually build the required objects and their relationships:

Query Builder Classes.PNG

 

Define all the fields you want to get from those objects:

Query Builder Constrains.PNG

 

And then have a peek at the SQL query that builds the resulting table:

Query Builder SQL.PNG

 

That should give you a good start.

 

 

Kind Regards,

Dmitry.

View solution in original post

Re: How to determine from which table in the Database elements are taken?

Hi @VladiSlav ,

 

What information @DmitryC shared is also useful, in that way you can also find DB relation.

 

To add to this, what I learned from my Windchill experience is:

1. Go to information page for a object type, for example: Promotion Request

2. Capture URL, in the url you will see something like this: oid=OR%3Awt.maturity.PromotionNotice%3A123456789

3. So Object type for Promotion Request is wt.maturity.PromotionNotice

4. Now in database, you will see a table with name PromotionNotice which Promotion Request data.

 

5. Similary for Part Object Type it is: wt.part.WTPart and database table name is WTPart.

6. And for Change Request, it is: wt.change2.WTChangeRequest2 and database table is WTChangeRequest2.

 

In addition to this, if a object is version controlled (objects having Check in & Check out functionality), they have corresponding Masters tables as well. For example: WTPartMaster, WTDocumentMaster, etc.

Master > child relationship is defined with IDA2MasterReference or some similar column name (sorry there are hell lot of columns, I don't exactly recall exact column name, but it is on similar line, but you will find it there). 

Iteration > Container relation is IDA3ContainerReference and so on...

 

I hope this helps you. Good luck to further your exposure.

 

Best Regards,

Shirish

 

Re: How to determine from which table in the Database elements are taken?

DmitryC  and ShirishMorkhade , thank you for your answers, you helped me a lot

Re: How to determine from which table in the Database elements are taken?

DmitryCplease tell me, is there a way to form tables in this way to display on the page of the Windchill site?

Re: How to determine from which table in the Database elements are taken?

Hi VladiSlav,

 

Can you elaborate a little bit?

What exactly are you trying to do/solve?

 

If you just need to show something within Windchill interface - there are other tools for that. I would recommend you to use direct SQL queries only as a last resort if nothing else helps.

Re: How to determine from which table in the Database elements are taken?

DmitryCI would like to create a custom table with items from one table from a database.

I'm also looking for information on how to create a new page where I can add the same custom table

Announcements
LiveWorx Call For Papers Happening Now!