i using data grip of jetbrains in work. ok don't know how create relationships between tables.
like on picture :
it's 2 step procedure. in first step, must modify table add foreign key constraint definitions. in second step, can display table diagram.
first, right click on name of table in datagrip, choose modify table. see 4 tabs: columns, keys, indices, , foreign keys. choose columns tab. right click on column name want become foreign key, , choose new foreign key. window switch foreign keys tab information filled in. fill in "target table". may have write in target column name in sql statement's references
phrase. review information in modify table window, and, when satisfied, click "execute".
second, right click again on name of table in datagrip, , time choose diagrams > show visualisation. should see diagram displaying relations between original table , referenced tables.
in datagrip help, can @ working database tool window page modifying definition of table, column, index, or primary or foreign key section. there short procedure description, there.
wikipedia has example in defining foreign keys article section may useful while working in datagrip's modify table window.
i did procedure in datagrip 2017.1.3, , don't know whether other versions vary.
Comments
Post a Comment