Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: mbordin on November 03, 2009, 08:24:21 pm

Title: DDL Import
Post by: mbordin on November 03, 2009, 08:24:21 pm
Hello,
is it possible to import DDL into a package?
We have a DDL file, a file contains SQL infrastructural instruction (CREATE TABLE, ALTER TABLE, CREATE INDEX ...Etc.etc) is it possible to import this file into EA like a reverse from a database instance?
Title: Re: DDL Import
Post by: Geert Bellekens on November 03, 2009, 08:25:35 pm
No, I'm afraid you'll first have to create the database (using the script) and then reverse engineer it from there

Geert
Title: Re: DDL Import  / Reverse Engineering DDL
Post by: tjs on August 04, 2014, 11:53:22 pm
The ability to reverse engineer DDL seems like a commonly requested feature since 2002.  As far as I can tell, the functionality does not exist within EA v11.  Instead loading an actual DBMS schema w/ DDL is required.  The ability to import DDLs is important in facilitating collaboration with DBAs and maintaining traceability and synchronization throughout the entire design stack.

Title: Re: DDL Import
Post by: qwerty on August 05, 2014, 12:48:16 am
I guess, it's the same answer like for so many other features not being implemented ever since: Sparx is not willing and/or not able. My expectations are near zero now. Basically is the same Ford T-Model  since the beginning. It now has a couple of over-paintings and a couple of new bells and whistles. But that's it. We still would drive the T-Model if no other automobile companies had developed. As long as there is no real rivaling product we will not see any real change  :(

q.
Title: Re: DDL Import
Post by: skiwi on August 14, 2014, 08:50:44 am
Funny you should mention this,
It is a feature I dearly need.
On the proviso that it can also be used to update a previous import
(unlike the XML/XSD import which, AFASIC, does not).

What I have been debating is whether to ask SPARX for this, or suggest it the the DBMode people who might find it a useful feature to have to sell.
Title: Re: DDL Import
Post by: qwerty on August 14, 2014, 06:55:28 pm
Actually the DBMode people are Sparx too. Though not from Down Under but from Japan (and maybe more open to marketing a good idea). Too bad Sparx does not see the chance in opening a market place for useful add-ins. Clearly the market is not that from Apple's App Store but having some of those add-ins in a store would (even more) clearly increase the value of EA.

q.
Title: Re: DDL Import
Post by: skiwi on November 20, 2018, 08:59:39 am
Hello,
is it possible to import DDL into a package?
We have a DDL file, a file contains SQL infrastructural instruction (CREATE TABLE, ALTER TABLE, CREATE INDEX ...Etc.etc) is it possible to import this file into EA like a reverse from a database instance?
Gosh bump
Title: Re: DDL Import
Post by: George..Brennan on May 28, 2019, 08:22:25 pm
I just been working on developing this MSSQL ddl file import scripting functionality.
Working for create table.
Title: Re: DDL Import
Post by: MaXyM on May 30, 2019, 11:49:50 pm
IMO, this way is not worth an effort due to complexity of implementation.
To import an SQL script, a parser covering complete syntax for particular RDBM has to be utilized. Then, considering differences in DDLs between databases EA would need to maintain parsers for all supported databases.

In fact it's easier to do RE from physically existing database, since most needed data are available in information_schema, and the rest is accessible from database system tables.
Title: Re: DDL Import
Post by: George..Brennan on May 31, 2019, 07:18:10 pm
Normally I'd agree but sometimes reading DDL is the only way where security means you simply can not access a production database.

I'm genuinely puzzled as to why you think I'd need parsers for the complete syntax for all supported databases?
Parsers aren't hard, the complexity is in the grammars so I'll extend it as needed....

My use cases were Oracle's then MSSQL's simple Create table syntax for a model so why do more, partitions etc?
Title: Re: DDL Import
Post by: Geert Bellekens on May 31, 2019, 08:28:41 pm
Normally I'd agree but sometimes reading DDL is the only way where security means you simply can not access a production database.
We usually create a local (empty) database from the DDL and then reverse engineer that into EA.
No problems with security or anything.

Then thing is that the reverse engineering imports much more than only the tables. It als import views, indexes, constraints, stored procedures, functions, sequences, etc....
Creating a DDL parser that supports all that, in all the different valid ways that can be specified in SQL, for all different database systems? That is indeed not a trivial task at all.

Reading all that from ODBC is (in theory) the same for any database.

Geert
Title: Re: DDL Import
Post by: George..Brennan on June 03, 2019, 08:48:10 pm
I agree and I normally avoid it like the plague but... sometimes organisational constraints means you simply can't avoid it.
So only parse the minimum required.

Over the years a couple of the more irritating things have been...
  'The approvals will take <insert number here> weeks and we need it this week'
  or more bluntly...
  'We use Sql Server, the consultancy looks after the Oracle database and no you can't have access to the 460 tables'
  'We have Db2/AS400 and no you can't have an account'

I've even hacked it into MS Access before now.

Title: Re: DDL Import
Post by: Modesto Vega on June 05, 2019, 06:48:51 pm
Just a number of random comments: