buggins / hibernated

HibernateD is ORM for D language (similar to Hibernate)
82 stars 31 forks source link

How to Reverse Database Schema into Entity Relationship #31

Open arietto opened 8 years ago

arietto commented 8 years ago

Hello! Is it possible to generate models from a database schema? Like here: http://www.treefrogframework.org/documents/generator It maybe helpful in such case: http://programmers.stackexchange.com/questions/299715/using-orms-in-two-separate-programs-which-share-a-db

rjmcguire commented 8 years ago

It is possible. You could have a go at it.

I normally use pegged to do compile time parsing: https://github.com/PhilippeSigaud/Pegged

I don't see an example sql PEG.

This could be used as a guide though: https://github.com/steveyen/sqld3/blob/master/sql.pegjs

On Tue, Feb 16, 2016 at 10:08 AM, arietto notifications@github.com wrote:

Hello! Is it possible to generate models from a database schema? Like here: http://www.treefrogframework.org/documents/generator It maybe helpful in such case: http://programmers.stackexchange.com/questions/299715/using-orms-in-two-separate-programs-which-share-a-db

— Reply to this email directly or view it on GitHub https://github.com/buggins/hibernated/issues/31.