Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: Paolo F Cantoni on August 26, 2007, 09:27:41 pm

Title: Improved support for View columns
Post by: Paolo F Cantoni on August 26, 2007, 09:27:41 pm
Some time past, Sparx - on a recommendation from Ripple - allowed columns to be created for database Views .  These columns would be for information only and, specifically, would not (at that time) be used for DDL generation.

It would seem churlish now to complain that the functionality provided doesn't work.  So, I'm not being a churl and therefore I'm not complaining, but merely making some observations that might help Sparx provide better support for View Columns in the future.

Firstly, at present, you can create these View Columns either by dragging and dropping from existing tables (my preferred method) or by directly creating them via the <Context Menu>|Attributes... menu item.  When you edit them, EA brings up the Attributes dialog, rather than the Columns dialog, even though they are clearly stereotyped «column».  As a side-effect of this, a Not Null Column is rendered as <ColumnName>: <ColumnType> {bag} - because of the use of the AllowDuplicates field in t_attribute to store the Not Null.  The Attributes of a View need to be rendered as Columns.

For Columns in a View, the Not Null, Unique and Primary Key properties are not relevant and so should be removed on the "drop".

It might be useful for the Intial Value Property (which has no meaning in a View) to be used to store the column source - either directly from the table (as in <Table/View>.<SourceColumn>) or the derivation expression if more complicated.  For a View, the Inital Value property (probably) shoudln't be rendered.

Thoughts? Votes?
Paolo
[size=0]©2007 Paolo Cantoni, -Semantica-[/size]
Title: Re: Improved support for View columns
Post by: «Midnight» on August 27, 2007, 05:07:39 am
Paolo,

I agree strongly with you main premise here. Still, I think more could be done with column definitions for views. For example, there could be some support for calculated columns, including someplace to put the necessary code. [Note that I have not read into this area of EA as deeply as I might. Please correct me if I'm wrong.]

Still, the view dialog needs to be 'upgraded' along the lines you suggest. Such an upgrade should also provide more appropriate names for things like view definition SQL and such.

So... Add my vode please.

David
Title: Re: Improved support for View columns
Post by: BCGoitcwoodard on May 10, 2024, 04:16:17 am
Agree!
Title: Re: Improved support for View columns
Post by: skiwi on May 17, 2024, 06:05:14 am
I support this