Book a Demo

Author Topic: Using the sql database independently  (Read 4781 times)

Tim Pigden

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Using the sql database independently
« on: February 23, 2009, 08:52:52 pm »
Hi, in the suggestions folder I asked about reporting on element issues within EA. At the moment element issues look like they are at the "nice idea but not fully developed" stage Another alternative is to try to make some software that allows me to access them independently.
Unfortunately our other platforms are all java based and server based so writing COM automation doesn't really fit well with anyone's up-to-date skills or tools we have in house.
Is it possible to work with the corporate sql database and the database structure to do some external add-on? We could then write something that would transfer issues from EA into our existing bug management software.
How safe is this and how safe an "API" is the sql database structure?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Using the sql database independently
« Reply #1 on: February 24, 2009, 08:34:16 am »
You can connect to the automation interface from Java.

See http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/setup.html

Even better, if you've got a current license, download 7.5 and look in the 'Code Samples' directory.  You'll find a Java_Sample directory that shows exactly how it works.

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Using the sql database independently
« Reply #2 on: February 24, 2009, 11:32:53 am »
And, come to that, SQL works just fine, especially for reporting.  I'm actually building an entire repository from scratch accessing the DB directly.  Yes, it is risky not to use the automation interface and it does require a bit of figuring out where things go and how they connect, but in the end it is all just data so it doesn't matter how it gets there or who reads it.  The automation interface is safer and more suited to EA operations, of course.

bioform

  • EA User
  • **
  • Posts: 230
  • Karma: +0/-0
  • Forty-Two?
    • View Profile
Re: Using the sql database independently
« Reply #3 on: February 25, 2009, 03:59:01 am »
I also have done a bit of manipulation using SQL. How do you generate new GUIDs for new elements?

Thaks,
David
Time is what keeps everything from happening at once, Space is what keeps it all from happening to you. <unknown>

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Using the sql database independently
« Reply #4 on: February 27, 2009, 05:46:40 am »
Well, I'm not using SQL to build the database ... I'm using the Progress ABL and that has a GUID function built in which is easily made compatible with the way EA assigns GUIDs.

If you want to see the code, it is available here http://www.oehive.org/node/900 ... but I don't suppose it will do you a lot of good except for illustrating what kinds of values need to go in which fields.  Being ABL, it is pretty readable even if you don't know the language.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Using the sql database independently
« Reply #5 on: February 27, 2009, 05:50:38 am »
And you can also use SQL Server. Use the uniqueidentifier data type for GUID fields. For PK fields - or other places where you need a new GUID created - use the built-in newid() function.
No, you can't have it!

bioform

  • EA User
  • **
  • Posts: 230
  • Karma: +0/-0
  • Forty-Two?
    • View Profile
Re: Using the sql database independently
« Reply #6 on: February 27, 2009, 06:45:05 am »
Thanks I will give that a try!

Anyone need any alligators as I am up to my modeling eyeballs with them today...

David
Time is what keeps everything from happening at once, Space is what keeps it all from happening to you. <unknown>