|
Good idea. Pro's: UDT's require that the data types be manipulated with a certain set of rules. As you noted. Thereby preventing certain types of errors. Easy for people with the object oriented mind set. Con's (perceived or otherwise): Might that make ad hoc queries a little tougher? Sure, Quantity Ordered should not affect your On Hand balance. However, you may want to subtract it from your quantity available balance. I've done UDF's and stored procedures. How does RPG handle a UDT with traditional I/O versus SQL? Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin Raul A Jager <raul@xxxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 07/11/2003 06:31 PM Please respond to Midrange Systems Technical Discussion To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> cc: Fax to: Subject: Re: Ok, where is it? It may be a good idea to define diferent "User Defined Types" for quantity order and shipped. In this way SQL can make sure you make your bill for the quantity sipped, and gives you an error if you try to bill the quantity ordered or if you substract it from your stock. ___________________________________________________________________________________________________ rob@xxxxxxxxx wrote: >Actually, as I sent it I wondered about that. Mostly the item number >field. > >Quantity ordered has a totally different meaning than quantity shipped. >Generally, while none of their attributes may be the same, except for >their size attributes, there is nothing that says their size attributes >must match. Therefore I would argue that your reference file should have >a separate field for quantity ordered and quantity shipped. That you want >to cascade these down from a common "quantity" field is ok. > >Perhaps this is were we need to start taking more advantage of DB2. For >example on those multiple item number fields in the transaction file we >should have referential constraints pointing back to the item master file. > Then, either by displaying the constraints on the master file, or by >using iSeries Navigator to draw a nice navigator, you can see all the >places where item number is referenced. > > > _______________________________________________ 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 mailing list archive is Copyright 1997-2025 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.