Book a Demo

Author Topic: Data schemas with foreign keys  (Read 4122 times)

DaveMere

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Data schemas with foreign keys
« on: December 20, 2007, 03:44:57 am »
Hi there,

I'm attempting to generate an ER diagram from an existing database via ODBC. I am able to connect and generate classes for the existing tables, but the foreign keys do not generate, leaving me with a series of unconnected classes. I can't find an option that seems to be explicitly preventing this, so am not sure why it is happening.

Relationships do generate between views and tables, but that's not what I'm after, just the foreign keys.

Can anyone explain how to generate forign key relationships?

thanks! Dave

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Data Schemas with foreign keys
« Reply #1 on: December 20, 2007, 03:48:14 am »
Hi Dave,

You didn't mention the raw database type you're connecting to via ODBC.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

DaveMere

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Data schemas with foreign keys
« Reply #2 on: December 20, 2007, 03:53:01 am »
Hi there Paolo. I'm using Sybase ASE.
« Last Edit: December 20, 2007, 03:58:50 am by davemere »

Tom G

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Data schemas with foreign keys
« Reply #3 on: December 20, 2007, 04:45:57 am »
Hi Dave,

We have imported databases from SQLServer 2005 without any problem. All relationships are correctly created without doing anything special or configuring some obscure features in EA.

The import of some databases from AS400 suffers some problems (of no importance here) and no relations are created, but that is logical since they did not define foreign key constraints... - please no comment on this :-[

Did anyone successfully import a Sybase ASE database ?
Did you try a different ODBC driver?

Kr,
Tom

DaveMere

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Data schemas with foreign keys
« Reply #4 on: December 20, 2007, 05:01:26 am »
I notice that forign key generation from ODBC and other sources seems to have been a bit buggy in the past. See builds 657, 606 and release 3.00

(I'm on build 806 by the way...)

I've not tried a different driver - out set-up is such that it would be problematic. The driver works well in all other situations mind you. Hmmmm!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Data schemas with foreign keys
« Reply #5 on: December 20, 2007, 05:27:18 am »
Dave,

I've seen some recent posts regarding data types (I think) in ASE. Last time I did any detailed work with ASE, versus ASA, was back in the ASx version 9 and 10 days.

Make sure you've got all the appropriate data types mapped, for every field that participates in foreign keys.

Also, consider upgrading to EA 7.x (we're awaiting the 7.1 beta at this time). You could run an evaluation version for a short while (just make sure you save your registration info in case you need to downgrade again).

David
No, you can't have it!