New Features: Composite Foreign Key and Import from SQL Server

Hi everyone,

I’m Minh from dbdiagram team, here to bring you some good news, dbdiagram now support two much request features: composite foreign key and import from SQL Server!

Composite Foreign Key

A composite foreign key is a foreign key that, much like composite primary key which we have already supported, consists of two or more columns.

Syntax

//Long form
Ref name_optional {
  table1.(column1, column2,...) [<|>|-] table2.(columnA, columnB,...)
}

//Short form:
Ref name_optional: table1.(column1, column2,...) [<|>|-] table2.(columnA, columnB,...)

Example

Table user {
  id int
  country_code int
}
Table account {
  user_id int
  country_code int
}
Ref: user.(id, country_code) - account.(user_id, country_code)

Import from SQL Server

Just a few clicks to transform your SQL Server file into a nice diagram:

Checkout this link for more detail about supported syntax.

1 Like

@Senthil_kumar_Nadara @Nspector @shoby @forkwhilefork @Marino2 @Tom @PatrikGuerra @Sentla @aarayas
Here are the features you requested, thanks a lot! And sorry for the long wait :disappointed_relieved:

@Yemisi_Adeoluwa @maven1129 @bonjarno @Frantz_Priou @Soulaimane_Ouali_El @Vinicius_Botelho_Biz @pheller
Here are the features you requested, thanks a lot! And sorry for the long wait :disappointed_relieved:
(Duplicated post due to tagging limit)