Book a Demo

Author Topic: Computed Column - MS SQL  (Read 3587 times)

Chris Mecum

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Computed Column - MS SQL
« on: September 29, 2010, 06:21:22 am »
How is a computed column represented in a database (class) diagram? When reverse engineering from MS SQL, EA does not pick up the column's formula.

I have seen some articles that use a Note linked to the attribute, with the computation in the Note, but this has no special meaning to UML and does not produce the required DDL script.

Thank you.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Computed Column - MS SQL
« Reply #1 on: September 29, 2010, 03:03:01 pm »
Chris,

From a UML point of view that would be a derived attribute, probably with the derivation formula in a constraint on this attribute.

But I have no clue as to how EA treats this (it probably ignores it completely) with regards to ddl generation.

Geert

Chris Mecum

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Computed Column - MS SQL
« Reply #2 on: September 30, 2010, 04:46:08 am »
Thanks, Geert. That gives me something to go on.

If a class element is stereotyped as "table" it does not allow the attributes to be flagged as derived. I'll have to figure out something on that. It also looks like the DDL generation can't be changed like the code generation templates.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Computed Column - MS SQL
« Reply #3 on: September 30, 2010, 03:09:21 pm »
Quote
Thanks, Geert. That gives me something to go on.

If a class element is stereotyped as "table" it does not allow the attributes to be flagged as derived. I'll have to figure out something on that. It also looks like the DDL generation can't be changed like the code generation templates.
bummer :'(

Geert