I am using LaTeX or another text-macro tool/library. How can I (1) use natural language text to describe relationships, then (2) generate an Entity-Relationship Diagram and (3) generate SQL DDL to create the database schema from it?

  • 1
    What SQL are you trying to generate? DDL or DML? – mrdenny Sep 15 '11 at 5:11
  • DDL (for Oracle) Basically just the Create reference + attribute related commands need to be generated. – A T Sep 16 '11 at 7:10

There are many ways to do this, but the most important thing to know is that there is a name for what you want to do: Object Role Modeling. It's a process for creating conceptual models using natural-language semantics.

This is a pretty good (if old) overview of the process.

The Wikipedia page for ORM has a pretty complete list of the available tools, many of which are free.

The most up-to-date solution is NORMA, since it is actively maintained by the ORM Foundation, but that's a plug-in that requires Visual Studio.

If you don't have Visual Studio, Infagon looks like it is still pretty actively developed and may be your best bet.

CaseTalk is also worth a look. Free to students and educators, but commercial otherwise.


I think I will write the SQL by hand, and generate a diagram from that using SchemaSpy.

Unless you can think of a quicker; more efficient way?


I did something like this once with a document parser tool I wrote. It would strip out specially formatted comments from a DDL statement and produce a data dictionary. This was renedered with LaTeX. However, I still had to reverse engineer the database into Visio to make E-R diagrams.

For a limited subset of SQL needed to parse create table statements it wasn't too hard to write the parser. I had it working in a couple of weekends.

  • Awesome, would you be able to share this? – A T Nov 19 '11 at 11:46

Hey If it's any help i have used visio to create my ERD and revere engineer it to DB using it's Reverse engineering tool, which provides reverse engineering support to ms access, ms sql server, ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.