May 7, 2012

How to make a system in 25 days?



Day1Today's Ingredients


1.  A midsummer Night's Dream Felix Mendelson (Music) 
In case things get out of hand..


2 Creating Database & UML Diagrams




1....


2. Creating Database & UML Diagrams


First we need the database. 
You have to scratch your tables and then normalize.


Basics! 3 Normal forms. 
These are supposed to be just guidelines. Book says that It is sometimes necessary to stay away from these to implement requirements.


1st Normal Form


     No duplicate columns in one table.
     Create separate tables for related groups of data. IDentify each row with unique column/s-  Primary Key.
1NF: more>>


2nd Normal Form


    Remove duplicate data: 1NF should be applied already.
    If there is same data are used in multiple rows of a table, create separate tables for those duplicated and make a single table out of that.


After applying the 1st normal form lets say there is a table like this:
 Users table
  • Address
  • City
  • State
  • ZIP
After applying the first rule of 2NF rule there are two separate tables with following columns.
Users table 
  • Name
  • Address
  • ZIP
zips table
  • ZIP
  • City
  • State
To tie the two tables together we need a unique identifier for the existing table (Users).- Foreign Key
Here it is the zip (primary key of zips)
2NF: more>>

3rd Normal Form
   
   You should have already applied 2NF;
   Columns should depend only on the PK and non other than the PK.
                                                                                                                             3NF: more>>




No comments:

Post a Comment

Followers