Author Topic: Import Database Schema with Constraints -MS SQL  (Read 2092 times)

A.Russell

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Import Database Schema with Constraints -MS SQL
« on: December 07, 2011, 06:17:35 am »
I want to import a database model from an MS SQL database using ODBC.

The tables load, but without constraints (primary/ foreign keys).

Import BD Schema from ODBC >>> Syncronize Excisting Classess (all checked)  >>> Import (All)

The diagram is set to Show Compartment -contraints; and Connectors are set set to Information Engineering.

An explanation of how to get this to work would be appreciated.
----------------------
Software Consultant
Analyst Programmer/ PM

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import Database Schema with Constraints -MS SQ
« Reply #1 on: December 07, 2011, 05:34:42 pm »
Hi,

Constraints on databases are modeled as operations.
I can see all FK, PK and other constraints on our reverse engineered SQL Server 2008 database (EA 9.1)

Geert

A.Russell

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Import Database Schema with Constraints -MS SQ
« Reply #2 on: December 07, 2011, 07:37:25 pm »
What I mean is, there are no lines between the tables to show the key relations.

Also, although I can see the columns in each table, if I right click for properties and select operations, nothing is listed. Column/ attributes lists the columns, but columns that should be unique or foreign keys are not listed as such.





I am using 9.0.9. When I go to upgrade it tells me to use Windows update, which doesn't show a more recent update to download.
« Last Edit: December 07, 2011, 07:52:11 pm by A.Russell »
----------------------
Software Consultant
Analyst Programmer/ PM

A.Russell

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Import Database Schema with Constraints -MS SQ
« Reply #3 on: December 08, 2011, 09:47:52 am »
So, this isn't supported.
----------------------
Software Consultant
Analyst Programmer/ PM

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import Database Schema with Constraints -MS SQ
« Reply #4 on: December 08, 2011, 06:03:58 pm »
Hmm, 9.0.9 doesn't really sound like an EA build.
Version 9.0 had build 904 to 908, and we are currently at version 9.2 (build 921)
It might pay of to try this in the latest version.
Anyway, I can tell you that it is definitely possible to reverse engineer contraints (as operations) and relations (for FK's) from an SQL Server Database.

(I'm looking at it right now)

Geert

skiwi

  • EA Practitioner
  • ***
  • Posts: 1775
  • Karma: +36/-58
    • View Profile
Re: Import Database Schema with Constraints -MS SQ
« Reply #5 on: December 09, 2011, 06:54:46 am »
Of course the source database has to have the constraints set up for EA to pick them up ...
Orthogonality rules
Using EA14.0 (1422) on Windows 10 Enterprise/64 bit. Repositories in SQLServer2014 R2 & Access2003/JET4.0

A.Russell

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Import Database Schema with Constraints -MS SQ
« Reply #6 on: December 09, 2011, 11:07:54 am »
The constraints are set, and I can see them clearly in Visual Studio.

Is it something to do with the ODBC driver for MS SQL? Should I export the database as something else before importing to EA?
« Last Edit: December 09, 2011, 11:08:52 am by A.Russell »
----------------------
Software Consultant
Analyst Programmer/ PM

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import Database Schema with Constraints -MS SQ
« Reply #7 on: December 09, 2011, 05:08:51 pm »
It might be a rights issue or something like that.
I suggest you take this up with Sparx Support.

Geert