Rogers

I'll add a couple synonyms.

There is a CREATE DATABASE function that you might have used. It is a synonym for CREATE COLLECTION. But SQL actually calls these things schemas. So there is also a CREATE SCHEMA function, and it has much more capability then the other 2.

All of them create a library on the iSeries. As others have said, that library resides in a top-level system library called QSYS - that's where all libraries go. With a relatively rare exception using independent ASPs - Elvis mentioned that. But not to worry for now. ;-)

The tables in this "database" are implemented as physical files. Indexes and views are implemented as logical files. These files all reside in the database c u m collection c u m library c u m schema that you created.

Confused now???

HTH
Vern

Tom Liotta wrote:
Laine, Rogers wrote:
My background is DB2 on the z-series, that is why I use the term
database.

It sounds like on the I this is called SCHEMA.

Again my concern is should my application schema's be located in the
QSYS library or some where else?

Rogers:

Your schemas will be located in the QSYS.LIB file system. And yet, when viewed from a different perspective, they will each be in a separate library.

QSYS is a library (is one way of saying it). QSYS.LIB is a file system (is another way of saying something similar from a different perspective).

A schema includes having a "library" as a container object; the name of the library will be the same as the name of the schema.

Library 'objects' always exist as objects in QSYS. But those are merely the library "objects" which are basically just entries in a list maintained by QSYS. Each library object also contains a list of objects within the libraries.

A library object can only exist within QSYS itself, not within other libraries. By extension, that implies that libraries may only be a single level deep (except for QSYS which allows that one extra level). Also, since 'library' and 'schema' are somewhat interchangeable as words, it follows that a schema can only exist within QSYS. Stuff created within a schema, or within a library, is not considered to be inside the library named QSYS.

It's kind of irrelevant, though, since you have no choice. When you create a schema, the system will do what it's going do at that level. As far as your application is concerned, it exists in its own library (schema). As far as your application is concerned, it's not in the QSYS library; it's in whatever library has the same name as your schema.

It's like looking at a basic Windows Desktop and seeing 'My Computer' there. Is 'My Computer' _really_ inside your 'Desktop'? If you drill into 'My Computer' to locate your C: drive, is your C: drive then contained within your 'Desktop'?

Well, no, not exactly... It's all based in how symbols are presented for human use.

IOW, don't worry about it. Create schemas and ignore that they apparently get created under QSYS.LIB. Just avoid explicitly specifying QSYS as a library name itself when you create general stuff. Use the library names of your schemas, and things should work out.

Finally, a bunch of what I said isn't completely true. Much depends on perspective and on what operations are being done. It'll all come together for you.

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.