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



You need to re-read Codd's rules.

See commments below:

> -----Original Message-----
> From: midrange-l-bounces@xxxxxxxxxxxx
> [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Paul Morgan
> Sent: Tuesday, March 08, 2005 2:34 PM
> To: midrange-l@xxxxxxxxxxxx
> Subject: Re: Logical File or OPNQRYF or any other way ? - Legacy
> 
> 
> Joe,
> 
> IMHO DB2 is and isn't a relational database.
> 
> If you access the database using RPG you're using DB2 as a 
> flat-file system.
> RPG access to the data violates many of Codd's rules (Five, 
> Seven & Eight at
> least).
> 
> Five because you're using RPG instead of SQL to access the 
> database.  You
> can't do everying with the database using RPG.  You can't 
> create tables
> using RPG.  You can with SQL.

Codd's rules says:
"A relational system may support several languages and various modes of 
terminal use (for example, the fill-in-the-blanks mode). However, there must be 
at least one language whose statements are expressible, per some well-defined 
syntax, as character strings and that is comprehensive in supporting all the 
following items

    * Data Definition
    * View Definition
    * Data Manipulation (Interactive and by program).
    * Integrity Constraints
    * Authorization."

SQL on DB2 iSeries meets this definition.  RPG, DDS, CL are simply additional 
languages, they in no way prevent the "at least one" from being true.


> 
> Seven because you can't do group operations against the 
> database with RPG.
> I can't delete all records satisfying a condition as I can 
> with SQL.  I can
> only delete one record at a time.

"The capability of handling a base relation or a derived relation as a single 
operand applies not only to the retrieval of data but also to the insertion, 
update and deletion of data."

Again, SQL allows this.  You do not see anything that says _only_ group 
operations are allowed or that row at a time operations are not allowed.

In fact, take a look at Rule #12: "If a relational system has a low-level 
(single-record-at-a-time) language, that low level cannot be used to subvert or 
bypass the integrity Rules and constraints expressed in the higher level 
relational language (multiple-records-at-a-time)."

This say that the having RPG on the iSeries is certainly allowed.

> 
> Eight because an underlying change to the database will 
> require changes to
> RPG programs.  If the sequence of fields in a table are 
> changed or length of
> fields changed  the RPG program must be modified to deal with 
> the database
> change.  No so with SQL.  SQL doesn't care that that column 
> is the first
> column in the table.

Actually it's rule #9: "Application programs and terminal activities remain 
logically unimpaired when information-preserving changes of any kind that 
theoretically permit un-impairment are made to the base tables."  For example, 
adding new columns.  Rule #8 has to do with where/how data is physically stored 
on media. 

In any event, DB2 on iSeries doesn't really break this.  You can change the 
underlying table without modifying the RPG program, if you replace the 
underlying table with a view of the same format as the original table.

> 
> Having said all that, if you stick strictly to SQL for all 
> your database
> access then the AS/400 database is a relational database.  
> Until DB2/400
> prevents access to the database outside of SQL it's not 
> strictly relational.

I don't think so.  RPG doesn't prevent the iSeries from being a RDBMS.  Even 
Dr. Codd agrees ;-)

> 
> Can you access Oracle, MS SQL Server, MySQL without using 
> SQL?

Sure, write a C++ program that reads the data directly, you're outside the 
RDBMS completely.

Can you get around the RDBMS on the iSeries?  Nope.  So, I'd say the iSeries 
comes the closest of _ANY_ to being Dr. Codd's ideal RDBMS.


Charles


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.