SQL Concepts

Just to refresh my memory, I am going to jot down the following as part of my cheat sheet, so that one glanceover would refresh my memory:
Atomicity: This is the process by which any transaction performed on a DBMS, will not take place (or will be rolled back) in case a part of the transaction fails.
Consistency: Consistency implies that the state of the database would be constant at any period of time. During transactions, the db would move from one consistent phase to another consistent phase. (All the constraints and regulations of the database is maintained)
Isolation: Isolation indicates that every transaction is performed as a seperate action and will not be interdependent on one another. In case of any such dependencies then the transactions will take place in a sequential manner (based on FCFS or some priority based operation)
Durability: This indicates that the database will be robust and will not collapse at any period of time. At frequent time intervals snapshots of the database should be maintained in case of the database becoming corrupt so that the database can revert to the last normal instance.

1 NF --> This indicates that all the duplicate columns in a table should be removed and placed in another table.
2 NF --> Declare a key value for all the other columns to depend on. In case this key column is not dependent by any specified column then move the specified column into another table. (There should be a functional dependency between the columns and the primary key column)
3 NF --> basically explains the transitional dependency of the database i.e. X->Y, Y->X, then X->Y should also exist. So declare foreign keys to the table on which the primary key constraint lies.
4 NF --> Multivalued dependencies must be elimnated (as it would lead to duplication of rows). Basically we would need to reduce the number of keys used in a composite key.

A cool link to understand normalization: http://www.bkent.net/Doc/simple5.htm#label4


Popular posts from this blog

System.ConfigurationSettings.AppSettings is Obsolete

Branding your SharePoint site in a super fast way - Emgage

Sharepoint & SSRS integration Issues