× 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.



I think what they are trying to say is for a given program bring in only
what you need into the program. When you use a file unless you use a field
select logical you are bringing the entire file into a program and if the
table needs to be changed every program that use the table will have to be
recompiled.

If you only bring in what you need and if the types or sizes of the fields
you brought have not changed, you do not have to touch the program. This is
called Database Independence. The physical view of the data is different
than the logical view.

When they say view that either just be an SQL statement that selects the
fields from one or more tables or you can create an SQL View. A view is
just pre-compiling an SQL Statement.

You could create a view with a pre-join or for security. The only time that
I have really used views was in 30 years of SQL was for security in an SQL
Server system where all access to tables was through views.

On Mon, Sep 8, 2014 at 5:18 PM, Vicki Wilson <VWilson@xxxxxxxxxxxxx> wrote:

I've been using SQL for years. But was humbled at the recent OCEAN
conference to realize how much there is to learn. I've never used views
before. I'm starting to grasp the importance of using them and flexibility
they provide but I still can't quite wrap my head around the idea of "one
view per program."

From p.258 of the Modernization redbook<
http://www.redbooks.ibm.com/abstracts/sg248185.html?Open> "The view
should be specific to your program." Am I misreading this to think that
means one view per program? I've seen this idea referenced in other posts
here. I understand a change to the view will only be required if a table
change impacts the view. But one view per program still seems like a
potential maintenance hassle?

Thoughts on the subject? Other references?

Vic


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.