Data type:
Basic data types: Depending on how the data behaves and how it is stored, it can be divided into the following types
- Integer data type
- Currency data type
- Floating-point data types
- Date/Time Data type
- Character data type
- Binary data types
- Graphics and text data types
User-defined data types. Using a custom data type is not a true data type, and you can simplify the management of common rules and default values by working with custom data types.
Data integrity of the data table:
Data integrity means that every event in a column has the correct data value. Data values must have the correct data type, and the data values must be in the correct domain.
Referential integrity means that relationships between tables are properly maintained. The data in one table should only point to an existing row in another table and should not point to a row that does not exist.
SQL Server provides a variety of mechanisms for enforcing data integrity.
- NULL and non-null (NULL or NOT NULL)
- Defaults (default)
- Specific identity attributes (identity self-increment column)
- Constraints (5 constraints non-null check uniqueness PRIMARY key foreign key)
Data Sheet Basics