2 Replies Latest reply on Mar 23, 2019 6:35 PM by andre.w

    Recursive both optional relation in SQL Server DDL

    andre.w

      Hi,

       

      I have a problem with Data Modeler 18.4. Suppose I have one entity "E" with one primary key attribute "a" and recursive both optional relation:

       

      r1.png

      Now if I generate DDL for SQL Server 2012, there seems to be a bug in generated SQL code. UNIQUE constraint on the foreign key is created as index, but SQL Server, as opposed to other SQL implementations, considers here two NULLs as the same value. Here it should be implemented as filtered index.

      r2.png

      Generated SQL code does not allow multiple NULLs:

      r3.png

      Filtered index allow multiple NULLs::

      r4.png

      As a minor bugs, the "go" statements should be generated in new lines, separated from other code (otherwise the query can not be executed). It would also be nice if SQL statements end with semicolon.

       

      Since I do not have paid subscription for any Oracle product, I can not report bugs on Support. I would be grateful if somebody report these bugs officially, so that next versions of Data Modeler will have fixes on these matters.