Book a Demo

Author Topic: Importing plain SQL?  (Read 3741 times)

JohanP

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Importing plain SQL?
« on: December 17, 2006, 02:50:54 am »
I have to create a model of a clients old DB schema (that currently has no documentation) the DB is not easily availabe through ODBC.

To save some time (and mental health..) I would like to avoid manually entering all table and field names and types.

Is there any way to import a raw DDL in plain SQL to at least get all table, field names and types?

The I can start to work on setting up PK and FK etc manually, but at least I don't have to enter all the initial text.

Any ideas?

/Johan

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Importing plain SQL?
« Reply #1 on: December 17, 2006, 06:25:32 am »
I'm just guessing but what about starting with a conversion program like sql2xml or sql2xmi if such a program exists?

Just a thought...
Verbal Use Cases aren't worth the paper they are written upon.

thomaskilian

  • Guest
Re: Importing plain SQL?
« Reply #2 on: December 17, 2006, 10:57:54 am »
Well, the obvious way is to execute the DDL on the database and to RE the result.
Edit:There's always way to have a plain DB for that use, even the *real* one is not available.
« Last Edit: December 17, 2006, 11:00:38 am by thomaskilian »

JohanP

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing plain SQL?
« Reply #3 on: December 17, 2006, 11:52:03 am »
Thanks for the reply. But I'm not sure I follow You. As I understand Your response this is exactly what I'm trying to avoid.

I don't want to spend time setting up a "dummy" DB with an ODBC connection, execute the DDL, and then connect EA to that dummy DB to do the RE.

Since I have the SQL I was just wondering if there wasn't an easy way to from within EA just have it read the SQL and import the tables as classes

If this is not possible then I guess I will have to setup the dummy ODBC to do the proper import.

Rgds
Johan

thomaskilian

  • Guest
Re: Importing plain SQL?
« Reply #4 on: December 18, 2006, 02:37:31 pm »
There are probably not much more ways than those described by Jim and me :-/

JohanP

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing plain SQL?
« Reply #5 on: December 21, 2006, 09:44:33 pm »
Update: I discovered the solution (I'm still getting used to EA) This was solved by adding new Database Types.

Setting up the ODBC connection and importing the tables worked fine.

However it seems like the actual types of some columns in the DB is not quite correctly imported.

For example the DB has a number of "tinytext" which is wrongly imported as "text".

The DB also has a number of "int" which is imported as "integer" not a terrible big issue but in the case of the integer the "int " is missing in the dropdown field (in the Attribute->General dialogue) and hence if you just edit that attribute you can never set the type back to "int" (since it is not available in the dropdown) but it has to be changed to "integer".

This make using the roundtrip feature a bit of hassle since it needs manual intervention.

Is this a general limitation with ODBC?
« Last Edit: December 22, 2006, 03:15:29 am by JohanP »

Seahawk

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing plain SQL?
« Reply #6 on: May 31, 2007, 04:37:56 am »
I'm having the same issue...just want to RE a DDL script without setting up anything else.

How did you solve your issue?

Javier

thomaskilian

  • Guest
Re: Importing plain SQL?
« Reply #7 on: May 31, 2007, 04:41:14 am »
I guess manually as the DDL import can not be configured - it's hard wired in EA.