Plex 2E

 View Only
  • 1.  Does anyone have experience using "Denoted By"?

    Posted Sep 22, 2015 02:30 PM

    So I came across the "Denoted By" relation while combing through our data model today...it appears that this relation allows for the use of surrogates...Can 2E work with this type of relation?

     

    Thanks!



  • 2.  Re: Does anyone have experience using "Denoted By"?
    Best Answer

    Posted Sep 22, 2015 03:17 PM

    If you are in a 2E Model as a *DSNR, in Edit Database Relations, go to add mode, enter ? in the Relation, you will get the list of relations (Display Relation Types). If you Z into the Denoted By relationship, you will get a handy explanation of the relationship and how it can be used...or not...in the case of Denoted by. I seem to remember talking to one of the 2E architects years ago that the Denoted By relation was there because there was an attempt to rewrite 2E in 2E (or some such folklore). Because 2E's internals are all surrogate based, the Denoted by was required. Of course, that lore never came to be, and it was just left there...

     

    I use Surrogates all the time, and use a pattern similar to the Plex Surrogate System, so somewhat disagree with this statement from the help - "In a normal  application,  surrogates  seldom,  if  ever, need to be used."

     

    Of note, from that help - "CA 2E FUNCTIONS DO NOT SUPPORT SURROGATES."

     

    Crispin.



  • 3.  Re: Does anyone have experience using "Denoted By"?

    Posted Sep 22, 2015 03:25 PM

    Thanks, Crispin!

     

    That is excellent information!  I will continue hunting and, soon, start to test the limits of 2E!

     

    Have a great day!



  • 4.  Re: Does anyone have experience using "Denoted By"?

    Posted Sep 24, 2015 05:38 AM

    Hi LymonZerga

     

    I had this discussion with our new and first DBA (its unusual to have a dedicated DBA or DBE at a 2E / Plex site) But things are changing read DB2 for i: DB2 for i Database Engineer – A Description of the Job

     

    Some people will tell you that you should always use natural keys and others will tell you that you should always use surrogate keys. These people invariably prove to be wrong, typically they're doing little more than sharing the prejudices of their "data religion" with you. The reality is that natural and surrogate keys each have their advantages and disadvantages, and that no strategy is perfect for all situations – from http://www.agiledata.org/essays/keys.html#sthash.cXB64svS.dpuf

     

    I like using the Identity Column with DB2 and I totally disagree with "In a normal  application,  surrogates  seldom,  if  ever, need to be used." as if anything the IBMer's face the criticism of using natural keys too often where greater flexibility would have been gained by a surrogate based system.

     

    This was a great posting on the old 2E/Plex forum which will give you more 2E thought  http://edge.plexinfo.net/EdgeForum.php?action=edge&forum=477&thread=28181#MessageId83567

     

     

    For the record I would lean towards a surrogate based system, the key work here is based, I would still use natural keys where approiate and would not not use them as I had set out to design a surrogate based system. I like surrogate based but  I do miss my owner relationships and it takes a little bit to get your head around only refers by relationships, not to mention both 2e and Plex patterns were designed with Owning relationships as central



  • 5.  Re: Does anyone have experience using "Denoted By"?

    Posted Oct 03, 2015 06:29 PM

    IMHO,

     

    People who believe all keys should be natural ARE WRONG.

    People who believe all keys should be surrogates ARE WRONG.

     

    Often the pragmatic solution is a combination and I'd suggest that the majority of databases are implemented in this way.  Back to being pragmatic, I've implemented numerous files with correctly defined natural keys but with a surrogate to force uniqueness (via a secondary access path) so I can easily extend that entity with a generic piece of functionality, like a memo or a diary note.

     

    I do like the point about prejudices though George.

     

    As always, Crispin is right.  The 'Denoted By' was never implemented, although it does show up in the odd prompt screen.  Must people only discover it by accident when they start to get interested in the underlying model files and template files in particular.

     

    Nice thread.

    Lee.

     

    p.s. Natural keys do make the model definitions a little easier to understand IMHO, however, if you do have your master driving file(s) as surrogates it is sometimes a lot easier to implement parallel processing in a generic fashion.



  • 6.  Re: Does anyone have experience using "Denoted By"?

    Posted Oct 05, 2015 01:49 PM

    What are you on about lee?

     

     

    I would base a system on surrogates but use natural keys where applicable... A mixture of the two...

     

    You simply rewrote what I wrote in my opinion



  • 7.  Re: Does anyone have experience using "Denoted By"?

    Posted Oct 14, 2015 10:03 PM

    I wrote similar things as we obviously share the same opinion.

     

    I read some articles on the web about natural keys vs surrogates and they were all written by people convinced that surrogates only was the way to go.

     

    There is no 100% right or wrong way so the only option is a balance between the two IMHO.  My opening statements were trying to address the people who only believe in one way or another rather than a hybrid approach.

     

    Have a good day all.