× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



That's what I thought - we on the S/38-i5 have often used "primary key", if we've used the term at all, to mean the key of the PF. As we've been saying, this is not the "official" meaning in relational discussions. BTW, my apologies if this seems too theoretical - I'll be done soon.

The question of shared access paths is not theoretical - the space and performance implications are important. I saw the "consumption" process when I added a primary key constraint on the PF with a key. Then I tried taking it off. Other than the fact that it took forever for the system to bring up the CPA32B1 message, I was intrigued that it gave me the choice of removing the key completely or keeping (restoring) the original key.

I'd not thought of the primary key coming from a logical with unique key. Interesting. And, since sharing is dependent on the order of creating the keys, a few experiments would be interesting. When I have some time. ;-)

Thanks
Vern

At 07:17 AM 4/3/2005, you wrote:
True. I may not have been precise enough in my language there. My fault.

Generally in dealing with iSeries shops, when they say primary key, they
aren't usually refering to a "real" SQL DDL primary key constraint, but
either a logical file's or the physical file's key specification that
they consider to be primary.

No matter. What I was getting at was is this a mixed DDS and SQL DDL
schema/library or completely SQL DDL schema?

In the case of the former, I know that unique keys in physical files are
"consumed" by the process of adding a primary key constraint to the file
if that access path can provide the constraint. What I don't recall is
the "sharing" of access paths if the so called "primary key" is actually
in a logical file when the DDL primary key constraint is applied. (Is it
shared or not?)

And in the case of the completely SQL DDL schema... is it managed by a
tool or at least by a member/file of DDL statements?

Now, as I read back... I dunno... maybe I'm still confusing? <VBG>


On Sat, 2005-04-02 at 22:37, Vernon Hamberg wrote: > I think maybe I'm confused - what DDS keyword establishes a primary key? > AFAIK, the key of a PF is not the same thing as the primary key. For one > thing, the primary key has to be unique and the key of a PF does not have > that requirement. And in a DSPFD TYPE(*CST), the key of a PF will not be > listed, unless you've used SQL DDL or ADDPFCST to add it. And in DSPFD > TYPE(*ACCPTH), the PF key is listed with "Constraint type = NONE". > > Vern > > At 06:32 PM 4/2/2005, you wrote: > >Right. But primary key constraints, in a typical iSeries environment are > >actually specified in the DDS. > > > >If you are using SQL DDL and specify the primary keys as constraints, > >separate from the definition of the table, then, again, you can apply > >them from the DDL source. That's just a learned thing. > > > >I'm not implying that there isn't some other underlying problem with the > >save and restore, but, with full SQL DDL sources, you should be able to > >readily repair any constraint damage caused by the save restore, and > >only have to rely on the table data making it back. > > > >Managed DDL sources have everything ordered by drop, create table, > >create primary keys, create unique keys, create inversion keys, create > >foreign keys, create value constraints. They can then be applied by > >range, even in the CA SQL execution utilities. > > > >Question, did you ever resolve if the save was done with ACCPTH(*YES)? -- "Bigamy is having one wife too many. Monogamy is the same." -- Oscar Wilde

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.