Book a Demo

Author Topic: Generate SQL from data model diagram  (Read 5882 times)

EeJay

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Generate SQL from data model diagram
« on: May 12, 2011, 10:33:15 pm »
v9Beta3 - is it possible to generate SQL along with the DDL from a data model?

I want to genereate the select statement with joins etc from the data model, seems like an simple enough thing to do if the DDL is being generate but for the life of me I can't find a way of doing it.

BTW - I have the corporate version, not sure if that makes a difference.

Cheers  8-)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Generate SQL from data model diagram
« Reply #1 on: May 13, 2011, 04:56:57 pm »
I don't get it; the DDL is SQL no?
What type of SQL statements do you want EA to generate?

Geert

EeJay

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Generate SQL from data model diagram
« Reply #2 on: May 13, 2011, 05:34:51 pm »
I want to see the SQL select statement so that I can include it in the documentation to hand over to the developer.

DDL just gives me the "structural" information of the tables but it should be a fairly simple exercise to generate the actuall select / insert SQL statements from those tables.

Currently I use Aquadata studio for accessing databases, when I link the tables in a query builder it creates the SQL for me which I hand over to the developer along with the DDL. EA allows me to create the tables, keys and relationships so it would be nice to just have the option of including the actual SQL (select/insert) statements that would be associated with those tables.

Hope that makes sense.


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Generate SQL from data model diagram
« Reply #3 on: May 13, 2011, 06:12:28 pm »
No, I don't think EA will do that for you out of the box.
You can of course write it yourself.
I believe the possibilities are
- code generation template
- an addin using the API

Geert

EeJay

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Generate SQL from data model diagram
« Reply #4 on: May 13, 2011, 07:07:22 pm »
Thanks, that what I expected but just needed to confirm
I hadn't missed something.

Cheers