|
I strongly disagree. Hierarchical metadata with cascaded inheritance of characteristics is very powerful. Your suggestion makes this critical concept non-workable. For example, suppose that you have a name and address file. Primary key is person_number. Persons work for companies so you want to associate a person with the company that they work for. In other words I need a second field in each record for the parent person number. But person_number and parent_person_number describe almost exactly the same thing and parent_person_number can and should inherit virtually all of its characteristics from person_number. If I create a new data element called parent_person_number, I break the relationship between person_number and parent_person_number. If I make a change to the database to make the person_number data element longer, I will not know that parent_person_number is the same thing but that it has a different name because we don't allow inheritance. The first obvious solution is to create a reference from the parent_person_number data element to the person_number data element. But we end up with exactly the same problem except that it is now in the metadata files - the data dictionary itself. What to you call the data element where we put the link between the two data elements? It cannot be called data_element_identifier because each data element row already has a data_element_identifier column. If I give it a new name, how can I relate the new name to the characteristics. The second obvious solution is to normalize the relationships into a second relationships table containing 5 columns: <parent_type, parent_identifier, child_type, child_identifier, relationship>. The tricky thing here is that parent_identifier and child_identifier inherit characteristics from all tables and columns with relationships. When I built this the first time, I made certain that all tables in the database used the same format for their unique identifier. This imposed some structure on the database that didn't meet all the rules laid down by Codd and Date but it made the design work. Because RPG doesn't support qualified field names, the field name prefix is necessary. For what its worth, I take a little credit for having that feature in the language. I was representing my employer at the IBM meetings when RPG 4 was speced. We stored a prefix in the table definition files for our tables. Since the factor 1, factor 2, and the result fields weren't big enough for qualified field names and there was no support for qualified field names and it was clear that calc specs weren't going to be completely free format, I argued strongly for the prefix attribute so that the name-space crunch would be reduced. Some database purists opposed the idea but without qualified field names, their position was too vulnerable. Richard Jackson mailto:richardjackson@richardjackson.net http://www.richardjacksonltd.com Voice: 1 (303) 808-8058 Fax: 1 (303) 663-4325 -|-----Original Message----- -|From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On -|Behalf Of rob@dekko.com -|Sent: Thursday, October 26, 2000 7:59 AM -|To: RPG400-L@midrange.com -|Subject: RE: File field names -| -| -| -|That's your problem, right there. You're adding a prefix when you code a -|PF. For example, if you called the item number ITEMNUM in both ITEMMAST -|and ORDDET then a simple query against the file QSYS/QADBIFLD would show -|you everywhere the field is used. If you want to use the two files in the -|same program then you simply do a PREFIX on the F spec in RPGIV. -|There are -|commercial canned software applications out there which do this. They -|actually work and make sense. People can adapt. -| -|Adopting this technique makes referencing obsolete. Except maybe -|in screen -|or printer files. -| -|Rob Berendt -| -|================== -|Remember the Cole! -| -| -| -| -| Marco Facchinetti -| -| <facchinetti@yaho To: -|RPG400-L@midrange.com -| o.com> cc: -| -| Sent by: Subject: RE: -|File field names -| owner-rpg400-l@mi -| -| drange.com -| -| -| -| -| -| 10/25/00 06:42 PM -| -| Please respond to -| -| RPG400-L -| -| -| -| -| -| -| -| -| -|First of all because I think reference is a basic component -|in relational database and it's amazing IBM provides a -|system (R in DDS) and grant you all the informations about -|a filed except the reference field. Check out the api -|format (see the original message) and tell me what else is -|missing. -| -|But basicly because I always (at least I try) to define a -|field only once and attach comments and help on this field. -|I put this field in a file and I use it as a dictionary. -|When I code PF I add a prefix of two char to unique -|identify the field in/from the PF. This is a basic rule -|just to help programmers and doesn't apply to all fields. -|To insert help in display files and to print a documented -|"DSPFFD" I need the referenced fields. Otherwise I have to -|duplicate help pannels and txt members (comments to -|fields). -| -|--- Steve Brazzell <steve@brazzell.com> wrote: -|> That's true, but I didn't think it was part of the -|> original question. -|> -|> Except for building some sort of metadata reference -|> information or -|> attempting to glean field purposes (risky, this way, -|> btw), why would one -|> want to know the referenced field names? -|> -|> This is just a question, not a put-down in any way; I'm -|> just curious. -|> -|> Steve -|> -|> -|> -----Original Message----- -|> From: owner-rpg400-l@midrange.com -|> [mailto:owner-rpg400-l@midrange.com]On -|> Behalf Of Marco Facchinetti -|> Sent: Wednesday, October 25, 2000 7:31 AM -|> To: RPG400-L@midrange.com -|> Subject: RE: File field names -|> -|> -|> But something is missing, at least in V4R4, the -|> referenced -|> field. -|> --- Steve Brazzell <steve@brazzell.com> wrote: -|> > Lance, -|> > -|> > The purest RPG solution I know of is to use the QUSLRCD -|> > API and then read -|> > the results from a user space. -|> > -|> > If you don't care to go this route, though, you can -|> > always do a DSPFFD to an -|> > outfile and then read the records in the outfile. -|> > -|> > Steve Brazzell -|> > -|> > -|> > -----Original Message----- -|> > From: owner-rpg400-l@midrange.com -|> > [mailto:owner-rpg400-l@midrange.com]On -|> > Behalf Of Gwecnal@aol.com -|> > Sent: Tuesday, October 24, 2000 3:27 PM -|> > To: rpg400-l@midrange.com -|> > Subject: File field names -|> > -|> > -|> > I seem to remember someone, sometime posting some REXX -|> > code that would -|> > extract the field names from an externally described -|> > file. I did not save -|> > the -|> > message and now I need to be able to get the field -|> names -|> > out of a file. Did -|> > anyone keep it or does anyone know how? TIA, Lance -|> > +--- -|> > | This is the RPG/400 Mailing List! -|> > | To submit a new message, send your mail to -|> > RPG400-L@midrange.com. -|> > | To subscribe to this list send email to -|> > RPG400-L-SUB@midrange.com. -|> > | To unsubscribe from this list send email to -|> > RPG400-L-UNSUB@midrange.com. -|> > | Questions should be directed to the list -|> > owner/operator: -|> > david@midrange.com -|> > +--- -|> > -|> > +--- -|> > | This is the RPG/400 Mailing List! -|> > | To submit a new message, send your mail to -|> > RPG400-L@midrange.com. -|> > | To subscribe to this list send email to -|> > RPG400-L-SUB@midrange.com. -|> > | To unsubscribe from this list send email to -|> > RPG400-L-UNSUB@midrange.com. -|> > | Questions should be directed to the list -|> > owner/operator: david@midrange.com -|> > +--- -|> -|> -|> __________________________________________________ -|> Do You Yahoo!? -|> Yahoo! Messenger - Talk while you surf! It's FREE. -|> http://im.yahoo.com/ -|> +--- -|> | This is the RPG/400 Mailing List! -|> | To submit a new message, send your mail to -|> RPG400-L@midrange.com. -|> | To subscribe to this list send email to -|> RPG400-L-SUB@midrange.com. -|> | To unsubscribe from this list send email to -|> RPG400-L-UNSUB@midrange.com. -|> | Questions should be directed to the list -|> owner/operator: -|> david@midrange.com -|> +--- -|> -|> +--- -|> | This is the RPG/400 Mailing List! -|> | To submit a new message, send your mail to -|> RPG400-L@midrange.com. -|> | To subscribe to this list send email to -|> RPG400-L-SUB@midrange.com. -|> | To unsubscribe from this list send email to -|> RPG400-L-UNSUB@midrange.com. -|> | Questions should be directed to the list -|> owner/operator: david@midrange.com -|> +--- -| -| -|__________________________________________________ -|Do You Yahoo!? -|Yahoo! Messenger - Talk while you surf! It's FREE. -|http://im.yahoo.com/ -|+--- -|| This is the RPG/400 Mailing List! -|| To submit a new message, send your mail to RPG400-L@midrange.com. -|| To subscribe to this list send email to RPG400-L-SUB@midrange.com. -|| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. -|| Questions should be directed to the list owner/operator: -|david@midrange.com -|+--- -| -| -| -|+--- -|| This is the RPG/400 Mailing List! -|| To submit a new message, send your mail to RPG400-L@midrange.com. -|| To subscribe to this list send email to RPG400-L-SUB@midrange.com. -|| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. -|| Questions should be directed to the list owner/operator: -|david@midrange.com -|+--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.