Convert DDL to ORM

Lie Ryan lie.1296 at gmail.com
Sun Oct 30 01:15:07 EDT 2011


On 10/25/2011 03:30 AM, Alec Taylor wrote:
> Good morning,
>
> I'm often generating DDLs from EER->Logical diagrams using tools such
> as PowerDesigner and Oracle Data Modeller.
>
> I've recently come across an ORM library (SQLalchemy), and it seems
> like a quite useful abstraction.
>
> Is there a way to convert my DDL to ORM code?

It's called reverse engineering. Some ORMs, e.g. Django's ORM can 
reverse engineer the database into Django Models by using `./manage.py 
inspectdb`. I believe the equivalent in SQLalchemy would be SQL 
Autocode, see 
http://turbogears.org/2.1/docs/main/Utilities/sqlautocode.html and 
http://code.google.com/p/sqlautocode/




More information about the Python-list mailing list