SQL Server
SQL Server
To be in third normal form i.e 3NF , non key field should not depend on other non key
field. In other words, third normal form does not permit any strictly informational
attribute to depend upon anything other than a superkey.
To be in second normal form i.e 2NF , all information attributes or fields of the table are
attributes of entity of table schema. All information fileds in the table is directly related to
entire primary key or entity of table.
To be in first normal formal i.e 1NF , each fields in table should be atomic and unique.
There should not be any duplicate information.
Normalization is set of rules to design tables and table relationships. Normalized database
would have large number of narrow tables i.e with less number of columns.
1. Clustered Index
2. Non Clustered Index
ANSI_PADDING can be set ON or OFF. It controls the way column stores values
shorter than the defined size of the column, and the way the column stores values that
have trailing blanks in char, varchar, binary, and varbinary data.
ANSI_PADDING setting is ON :
char(n) and binary(n) - Pads value with trailing blanks for char columns and with trailing
zeros for binary columns to the length of column.
varchar(n) or varbinary(n) - Trailing blanks in varchar are not trimmed . Trailing zeroes
in varbinary are not trimmed. Does not pads trailing blanks or zeroes to the length of
column.
char(n) and binary(n) - Pads value with trailing blanks for char columns and with trailing
zeros for binary columns to the length of column.
Extents are basic unit in which space is allocated to tables and indexes. Extent is eight
contiguous pages i.e 64 KB.
Page
1. Select
2. Insert
3. Update
4. Delete
1. Grant
2. Revoke
3. Deny
1. Create
2. Alter
3. Drop