when making a table on SQL, you can make constraints on each columns.
unique: you cannot save the same data on a table. It is the only data such as SSN, not duplicated.
primary: this key has the attributes of Not Null and Unique.
foreign: when connecting a table with another table, you can constrain another table from adding other data. if you break the foreign key of constraints, it also breaks the integrity.
Extra constraints
not null: you cannot save the table without data.
default: the values that you always have, it is the primary value (the primary key and primary value is different here!)
when having constraints, you can apply tables to use and analyze data better.