• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Reverse engineering with PostgreSQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reverse engineering with PostgreSQL


  • Subject: Reverse engineering with PostgreSQL
  • From: Paul Hoadley <email@hidden>
  • Date: Tue, 05 May 2015 17:06:55 +0930

Hello,

I’m trying to reverse engineer a database from Postgres (9.1.4) into an EO Model.  To complicate matters further, the database started out on MS SQL Server, and I “converted” the DDL dump to Postgres. [1]  FWIW, I’m using Eclipse Luna 4.4.2, and WOLips seems to be reporting “4.4.0”.

I can see that reverse engineering does work.  I tried reverse engineering a database that started life as an EO Model, and the result was about as good as I would expect.  It is choking on my MS SQL-to-Postgres conversion described above.  There are at least two problems:

1.  If I run all the tables through at once, I get “Failed to reverse engineer. addRelationship: duplicated relationship name: SOMENAME.”  Unfortunately there’s no hint of which table caused that, and there are two tables with FK columns called somename, both with appropriate FK constraints.

2.  If I pick some tables by hand, I can get the process to complete, but there are no relationships created, despite the FK constraints present.

I presume there are some relevant differences between my converted database and a database generated from an EO Model, though I’m not sure what they are.  Does anyone have some experience with this?  What is the reverse engineering code looking for?  Are constraint _names_ magic, for example, because the converted database’s constraint names are slightly different to an EOF-generated database.  I’m happy enough to plod along with trial and error, but if someone knows what they’re doing, I’d love to get some tips.


[1]  This worked surprisingly well:

https://github.com/dalibo/sqlserver2pgsql

All I had to work with was a DDL dump.  I just ran it through the Perl script and got a working result first time.


-- 
Paul Hoadley
http://logicsquad.net/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Reverse engineering with PostgreSQL
      • From: Paul Hoadley <email@hidden>
  • Prev by Date: Re: On SQL fully qualified names and how to implement them in EO models
  • Next by Date: Re: Reverse engineering with PostgreSQL
  • Previous by thread: Some help with FrontBase and SQL generation (migrations mainly)
  • Next by thread: Re: Reverse engineering with PostgreSQL
  • Index(es):
    • Date
    • Thread