I was wondering just where a column names get the abreviated form they have in .sql files. How does Patriarch(Name) become Ptrrch_nm? Looking at the OIAL file, I saw that that it's still "Patriarch," but in the DCIL file it's now "Ptrrch." What causes the abreviation?
Traditionally, DB coulmn names are kept short. I'll agree there may be some good reasons for this in some types of production DBs. Still, I think fully expressive column names are preferable in prototype DBs, where they make it easier to see if things are as they should be.
RDBMSes do have limits on column length, but these are pretty generous in modern systems. I'd prefer that NORMA only abreviate column names when required to do so by the limits of a given RDBMS - if that's where it's being mapped. Would this be too hard to implement? Does it need to be done so early in the mapping process that the names have to fit the limits for the lowest common denominator amung possible mapping targets?
To me, clarity should come first, as there are ways to add effeciency later. I'd rather see "City_Tour_Date" than "Ct_Tr_Dt" anytime. If it helps to rename that to, or display as "Date" in the production DB table or form, that's easy enough to do. BRN..
I agree with your suggestion. Originally the idea was to generate to the 2003 SQL Standard and override anything that varied for each vendor. This is why the names become changed at such an early stage. But your suggestion to modify the names only when necessary is a good one in my opinion. I am not currently active in the generation process, but hopefully the powers that be will take this into consideration. As a current work around, role names and fact names can improve the names at generation time. If you are working with large models I can see how modifying all of these might be less than desirable.
The number for the maximum column length is currently hard coded at 18. However, as with every part of our generation process, hard coded is a relative term because the data is contained in a registered transform that you can modify.
This particular value is located in C:\Program Files\Common Files\Neumont\DIL\Transforms\DILSupportFunctions.xslt Look for the first occurrence of 18 and increase the number.
As Corey mentioned, we will definitely make this RDBMS-specific in future releases. -Matt
Thanks for the feedback and info. I'll look at the transforms. It also helps to hear some of the thinking that goes into a deveopment process like this.
I have been experimenting with assigning role names. From info I got from another thread, I found that the 'hidden' roles that you can find with the ORM Object Browser, by drilling down - if you know which FactType to look for, can be assigned names, and these can become part of the column names (actually needed to create unique IDs in objectified predicates, at least with ring constraints).