Focal Point
[CLOSED]Metadata and Primary Keys

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6577052306

May 04, 2011, 10:40 AM
dburton
[CLOSED]Metadata and Primary Keys
I am new to WebFOCUS and FocalPoint.

I am trying to figure out how WebFOCUS pulls over the tables from the database to create metadata. The reason for this is that most of my metadata files are not pulling the proper Primary Keys. In fact, the columns it is choosing are not keys at all.

Does WebFOCUS try to pick Primary Keys only or does it try to match Primary Keys and Foreign Keys?

Please help.

Thanks.

This message has been edited. Last edited by: dburton,


WebFOCUS 7.7.03
Windows Web Server 2008
MS SQL Server 2000
Excel,CSV,PDF,HTML
May 04, 2011, 05:32 PM
N.Selph
If WebFOCUS can find Keys information from the database definition, it is "n" of the first fields in the table definition, and places that number in the acx file as KEYS=n.
If it cannot find the information (ie for views), then there will be a KEYS=0 in acx file.
If the key fields are not first, then it should be KEYS=0.

Are you saying that you are getting a KEYS=x number in ACX file, and the first x fields are not a possible key? It must be misreading some primary index in your SQL Server database then.

You can correct that manually. Infact if your keys are not first, I would place them first in the mas file and then correct the acx to the right number. Otherwise you will have difficulty with the optimizer on joins.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
May 05, 2011, 08:46 AM
dburton
Thanks for the reply.

Yes, I am getting KEYS=x in the acx file and the fields are not possible keys. The fields that are being chosen are fields that have alphanumeric characters in them and are not unique at all. WebFOCUS does pick up the Primary Key field as being Readonly but doesn't make it the Primary Key. It is very strange.

I also took a look at the tables and noticed that the Primary Keys are listed as the first column in the table.

I have started to do some manual editing, however, this is going to be a large scale project with 500+ tables.

Any idea if there is a fix for this? Aside from the manual way.

Thanks.


WebFOCUS 7.7.03
Windows Web Server 2008
MS SQL Server 2000
Excel,CSV,PDF,HTML