Menu

default vs initial value

Anonymous
2016-09-21
2016-09-28
  • Anonymous

    Anonymous - 2016-09-21

    is initial value supposed to work as default value in sql? would be great of that could be fixed.

     
  • Anonymous

    Anonymous - 2016-09-27

    To get desired result one could set 'DEFAULT xxxx' in the NullOption field, at the tagged values meny for the specific column, which would genereate proper SQL. However a indication of the column initial value would be a more suitable way.

     
  • Janusz Szpilewski

    Generally do not expect this program to closely follow SQL features. The principal focus is on UML modeling with added Entity-Relationship model on top of UML elements. It seems that the DEFAULT constaint was not addressed so far. Nevertheless ERD is decribed by the profile definition in the file erd.prf (in XML format). You can edit that file by adding a tag definition similar to NullOption and handle DEFAULT there. But if you use code generation it will not handle it automatically so probably using NUllOption to embed extra text seems to be most useful now.

     
  • Michal

    Michal - 2016-09-28

    In my workteam we use the ERD WhiteStarUML intensely. We have redefined the profile of ERD whit some extensions to our solutions for MSSQL.
    And our MSSQL script generator is based on "Doucmentation Generator".

    For DEFAULT value we use InitialValue from UMLAttribute (representing column).
    This is good option for "typing" column definition - I can write fast:

    myfield: SMALLDATETIME=GETDATE()

    and GETDATE() is automaticaly assigned to InitialValue of UMLAttribute.


    After presenting the "code generator" for ERD by Janusz, I am very interested for participating to make some extension to this generator, especially in C#, e.g. creating diagrams from database (not from script), more option for generating MSSQL script, other features: multifields keys, computed fields, indexes...

     
  • Janusz Szpilewski

    Hi Michal,

    It would be great if people working with ERD on daily basis could apply their ideas to the ERD code generator. It is a relatively simple plugin in C# with all dependencies (like ANTLR) included in the distribution.

     

Anonymous
Anonymous

Add attachments
Cancel