But what does DDL offer over DDS and vice versa? Let's take a look. The GoodHere, in no particular order of importance, are some of the good points of DDL: The BadHere are the bad points of DDL. Some are problems because they are the opposite of the way you do things with DDS, and others are problems because they do not offer some of the functionality of DDS. Again, the list is in no particular order of importance. The Downright UglyWhereas each of the bad points listed above are manageable, there is one major problem with DDL. SQL treats views and indexes as two separate entities. An index is a keyed logical, and a view is a non-keyed logical and never the twain shall meet. Or, to put it another way, you cannot define a key for a view. That means all of those wonderful features that are available when defining views are of little or no benefit in high-level language programs. A view is useful only if you are not interested in a key sequence or in accessing records by key (and how often does that happen?) or if you are using embedded SQL. <
'); // -->
/p> Which to use?Should you start using DDL or should you stick with DDS? The answer is to use both. Over the past couple of years I am inclined to use DDL to define any database, but I still resort to DDS when I need to. DDL offers functionality that removes code from programs and ensures the enforcement of rules through the database as opposed to the application. It is almost certain (at least I hope it is almost certain) that IBM will provide some means of defining a combined view/index with DDL, especially since it can be easily defined with DDS. I am willing to make do with the bad as long as this one gets fixed. Of course, I am also more then willing to have any of the bad features turn good. --------------------------- FROM THE AUTHOR My thanks to Dave Anderson for pointing out a couple of performance related omissions from this programming tip -- one good and one bad.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| iSeries Security - Security Tools, Physical Security and System Security |
| About Us | Contact Us | For Advertisers | For Business Partners | Site Index | RSS |
|
|
|
|||||||