Author Topic: Improved support for View columns  (Read 1947 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8542
  • Karma: +253/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Improved support for View columns
« 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?
[size=0]©2007 Paolo Cantoni, -Semantica-[/size]
« Last Edit: August 26, 2007, 09:39:47 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
Helsinki Principle Rules!


  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Improved support for View columns
« Reply #1 on: August 27, 2007, 05:07:39 am »

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.

No, you can't have it!


  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Improved support for View columns
« Reply #2 on: May 10, 2024, 04:16:17 am »


  • EA Expert
  • ****
  • Posts: 2053
  • Karma: +46/-82
    • View Profile
Re: Improved support for View columns
« Reply #3 on: May 17, 2024, 06:05:14 am »
I support this
Orthogonality rules
Using EA16.1 (1627) on Windows 11 Enterprise/64 bit. Repositories in SQLServer2019 DB Schema 1558.
WebEA on Pro Cloud Server 4.2.64