BurntSushi / erd

Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.
The Unlicense
1.79k stars 154 forks source link

Including NOT NULL, UNIQUE, types and comments in the syntax #94

Open kukimik opened 3 years ago

kukimik commented 3 years ago

Are there any plans to include

directly in the syntax? If this wasn't planned, what is your opinion about it?

I know I can have this on my diagram by using labels (as in the examples) and, say, adding extra attributes that mimick the UNIQUE constraints, but this is hacky, clumsy and makes automated processing more difficult. I'd love to have a stable syntax that could also be easily translated into SQL.

mmzx commented 3 years ago

This is a little more involved since certainly requires changes in syntax, so careful planning would be needed.

BurntSushi commented 3 years ago

This tool is really about showing the relationships between entities. Having first class support for a whole bunch of different SQL features should be a non-goal IMO.

kukimik commented 3 years ago

This tool is really about showing the relationships between entities. Having first class support for a whole bunch of different SQL features should be a non-goal IMO.

Sure, however even in the examples the types and not null constraints are included. They are a natural thing to include in such diagrams.

From my job experience I'd say that uniques are also included very often, but I'd be happy with just the types and not nulls.