SQL Server ER-diagram conventions

From Diversity Workbench
Jump to: navigation, search

General conventions

With the move to SQL server, the model documenter tool used in earlier Workbench model documentations is no longer available. As a result, this documentation is less complete and relies more strongly on graphical screen shots from the SQL-Server modeling tool.

Fields participating in the primary key of an entity are marked with a small key in the first column.

In relationship lines a key symbol indicates the the ‘1’-side and an infinity symbol the ‘n’-side.

SQL-Server data types

Type Description
char character data type (ANSI-character set only), length 0 to 8000 bytes.
varchar Variable-length character data type, length 0 to 8000 bytes.
text Text data type (= “Memo”, unlimited length).
nchar Unicode character data type.
ntext Unicode text data type (= “Memo”, unlimited length).
nvarchar Unicode variable-length character data type.
binary binary data type, length 0 to 8000 bytes.
varbinary Variable-length binary data type, length 0 to 8000 bytes.
datetime 8-byte date/time data type.
smalldatetime 4-byte date/time data type.
bit bit data type (i.e. Boolean, 0 = false or 1 = true).
decimal decimal data type (unlimited precision).
tinyint 1-byte integer data type (= “byte”).
smallint 2-byte integer data type.
Int 4-byte integer data type.
real 4-byte real data type (= “single”).
float 8-byte float data type (= “double”).