What Is Deno And Will It Replace NodeJS


For many businesses, their data is the backbone of their operation. It can be used for analysis, decision making, and communication between staff members. Without a strong understanding of what Data Integrity means, businesses may not be able to effectively manage their data or protect it in case something happens to it. DBAs and data developers must pay high attention to data integrity. This article is for DBAs and data developers who work with SQL Server. In this article we'll discuss what Data Integrity is, why it's important, and how we can make sure to maintain and implement Data Integrity in SQL Server.

Data Integrity in SQL 

Data Integrity is used to maintain the accuracy and consistency of data in a table.

Classification of Data Integrity

  1. System/Pre-Defined Integrity
  2. User-Defined Integrity


System/Pre-Defined Integrity

We can implement this using constraint. This is divided into three categories.

Entity Integrity

Entity integrity ensures each row in a table is a uniquely identifiable entity. We can apply Entity integrity to the Table by specifying a primary key, a unique key, and not null.

Referential Integrity

Referential integrity ensures the relationship between the Tables.

We can apply this using a Foreign Key constraint.

Domain Integrity

Domain integrity ensures the data values in a database follow defined rules for values, range, and format. A database can enforce these rules using Check and Default constraints.


Constraints are used for enforcing, validating, or restricting data. Constraints are used to restrict data in a Table.

Constraints in SQL Server


Default Constraint is used to assign the default value to a particular column in the Table.

By using this constraint we can avoid the system-defined value from a column while the user inserts values in the Table.

A Table can contain any number of default constraints.

Default constraints can be applied to any datatypes.


Create table Demo(Id int,name varchar(50),Salary int default 15000)