Book a Demo

Author Topic: Creating Class from sql  (Read 6332 times)

Michel777

  • EA User
  • **
  • Posts: 228
  • Karma: +0/-0
    • View Profile
Creating Class from sql
« on: December 03, 2015, 03:35:15 am »
Hi,

is it possible to generate classes based on sql script (DDL) ?

Thanks,

Michel

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating Class from sql
« Reply #1 on: December 03, 2015, 03:41:47 am »
Create a DB from the DDL and import that.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Creating Class from sql
« Reply #2 on: December 03, 2015, 06:20:34 am »
Or if you are really suicidal you can always try to make an SQL DDL grammar to reverse engineer into EA  ;D

Geert

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Creating Class from sql
« Reply #3 on: December 08, 2015, 07:34:27 pm »
This is a good candidate for a new feature in EA. I have several DBs which cannot be that easily created on an existing DBMS to enable a reverse engineering.
It would be good to know from Sparx why such feature still doesn't exist. Having to write a script or addin doesn't seem the right way to go ; Sparx will be the most efficient to achieve this.
Afterall EA is capable of generating a SQL script/DDL, so it's hard to understand why it cannot interpret it (even if it would process only 90% of it, or so).

I'm interested in hearing from Sparx on this matter.

Thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Creating Class from sql
« Reply #4 on: December 09, 2015, 08:35:29 am »
Quote
Afterall EA is capable of generating a SQL script/DDL, so it's hard to understand why it cannot interpret it (even if it would process only 90% of it, or so).

I'm interested in hearing from Sparx on this matter.
I think that's the point. It's not hard to parse the bulk of the sql. It's harder to parse some of the syntax and map back to the appropriate UML elements. Where it becomes very hard is handling that for all the different DB variants.

Then there's the problem that 90% (or even 99%) is never really going to be good enough.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Creating Class from sql
« Reply #5 on: January 20, 2016, 12:13:19 am »
Hi Simon,

Having to install each DDL script onto an existing DB is time consuming. Hence running a reverse on the file instead of a running DB via ODBC would save time.

My understanding of the current DDL reverse in EA is that it relies on ODBC to generate data model from any DBMS. So I can understand that scripts for each DBMS could be complex. Having said that, EA does support several DBMS to generate the DDL code, so what is the difference?
It would make sense to me that a DDL file reverse support in EA would match definitions on what it is able to generate. Any other definition can be understood as ignored (to be traced in the log file).

What is the feasibility to have the above in EA?

thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating Class from sql
« Reply #6 on: January 20, 2016, 04:36:01 am »
I guess the problem is that EA creates (and understands) only a subset of what is possible with DDL. So offering the ability to read it would mean to write a DDL parser/interpreter.

q.