In the relational database design, normalization is a systematic way of ensuring that a database structure is suitable for querying without insertion, update, and deletion anomalies that could lead to a loss of data integrity.
1st Normal Form
============
First you have to know what are the multivalued and composite attributes to understand the 1st normal form.
Multivalued Attribute is a attribute which can have more then a single value. For an example we can take a person's telephone number. We can take many numbers as telephone number (Home tel number,Mobile number, tel number at office). To remove a multivalued attribute we have to divide the attribute.
Example: If we have attribute called "telephone", then we can divide it as "home telephone", "mobile number", "office number".
Composite attribute is a attribute which have several attributes. For an example the address attribute is can take as composite attribute. To remove this attribute we can divide the attribute to the sub attributes.
Example: If we have attribute called "address", then we can divide it to "no.", "street1", "street2", "city", "country".
These kind of attributes (multivalued and composite) should removed from the relation schema to get first normal form relation.
2nd Normal Form
=============
In the 2nd normal form it consider two dependencies called Functional dependencies and Partial dependencies. And also you should have the knowledge of primary key of a relational schema.
Functional dependency occurs when one attribute in a relation uniquely determines another attribute.
Partial dependency occurs when non-key attribute in a relation uniquely determines by sub set of primary key attribute set. Therefore to occur these kind of dependencies the primary key should contain more than one attributes.
All attributes in a relational schema should be fully functionally depend on the primary key of that relational schema. It means there should not occur any partial dependencies.
3rd Normal Form
=============
relational schema which have no transitive dependencies, called 3rd normal formed relational schema. transitive dependency occurs when a non-key attribute in a relational schema depends on another non-key attribute.
Latest Entries »
Wednesday, August 18, 2010
Monday, August 16, 2010
Simple Linux shell script ( for beginners)
Here I'm going to show you how to write a simple Linux shell script to print "Hello World" in the Linux command line.
Step 1 : To go to the home folder, type "cd /home" and press 'Enter' key.
Step 2 : To open a new file, type "vi hello.sh" and press 'Enter' key.
Step 3 : Press 'Insert' key and write following code;
#!/bin/sh
#clear for clear the screen
clear
#echo for print Hello World
echo "Hello World"
Step 4 : Press 'Esc' key and type ":wq" and press 'Enter' key to save the file.
Step 5 : Now type "ls" to list the file and check the file was created.
Step 6 : Now type "chmod +x hello.sh" and press 'Enter' key to make it as executable file.
Step 7 : Check the files again by typing "ls". the file will be show in green color.
Step 8 : To run the shell script, type "./hello.sh" and press 'Enter' key. This will print "Hello World" in your screen.
This is the simplest shell script that you can star get familiar with writing Linux shell scripts, and explore the advance shell scripts.
Step 1 : To go to the home folder, type "cd /home" and press 'Enter' key.
Step 2 : To open a new file, type "vi hello.sh" and press 'Enter' key.
Step 3 : Press 'Insert' key and write following code;
#!/bin/sh
#clear for clear the screen
clear
#echo for print Hello World
echo "Hello World"
Step 4 : Press 'Esc' key and type ":wq" and press 'Enter' key to save the file.
Step 5 : Now type "ls" to list the file and check the file was created.
Step 6 : Now type "chmod +x hello.sh" and press 'Enter' key to make it as executable file.
Step 7 : Check the files again by typing "ls". the file will be show in green color.
Step 8 : To run the shell script, type "./hello.sh" and press 'Enter' key. This will print "Hello World" in your screen.
This is the simplest shell script that you can star get familiar with writing Linux shell scripts, and explore the advance shell scripts.
Wednesday, July 28, 2010
Easy way to select numerical data from MySQL table
I'll explain this using a example,
Lets thing we have table called EMP and column called SALARY.
Now suppose there are numerical data and string data in the SALARY column. (ex: 12000, 25000, not available, null...)
For this kind of columns we can use following method to select only numerical data;
SELECT SALARY FROM EMP WHERE (SALARY+0)!=0;
Lets thing we have table called EMP and column called SALARY.
Now suppose there are numerical data and string data in the SALARY column. (ex: 12000, 25000, not available, null...)
For this kind of columns we can use following method to select only numerical data;
SELECT SALARY FROM EMP WHERE (SALARY+0)!=0;
Monday, July 26, 2010
Things that Microsoft could Never Explain....!!!
This is pretty funny and awesome...
-------------------------------------------------------------------------------------------------------------
MAGIC 1
An Indian found that nobody can create a FOLDER anywhere on the Computer which can be named as "CON". This is something funny and inexplicable? At Microsoft the whole Team, couldn't answer why this happened! TRY IT NOW, IT WILL NOT CREATE A "CON" FOLDER
-------------------------------------------------------------------------------------------------------------
MAGIC 2
For those of you using Windows, do the following:
1.) Open notepad application
2.) Type "Bush hid the facts" (without the quotes)
3.) Save it as whatever you want.
4.) Close it, and re-open it.
Noticed the weird bug? No one can explain!
-------------------------------------------------------------------------------------------------------------
MAGIC 3
Again this is something funny and can't be explained? At Microsoft the whole Team, including Bill Gates, couldn't answer why this happened!
It was discovered by a Brazilian. Try it out yourself?
Open Microsoft Word and type
=rand (200, 99)
And then press ENTER
And see the
magic...!
-------------------------------------------------------------------------------------------------------------
Magic 4
Did you know that a flight number from one of the planes that hit one of the two WTC towers on 9/11 was Q33 NY. In Notepad / WordPad or MS Word, type that flight number i.e Q33 NY. Increase the font size to 72. Change the font to Wingdings. ….. u will be amazed by the findings!!!
-------------------------------------------------------------------------------------------------------------
Saturday, July 17, 2010
Brief introduction about Asterisk
Asterisk is a software that use to handle voice communications. It is created in 1999 by Mark Spencer of Digium.
Normally its installed as a server and attached telephones to make calls to one another, and to connect to other telephone services including the public switched telephone network (PSTN) and Voice over Internet Protocol (VoIP) services.
IP PBX systems, VoIP gateways and conference servers are same of application that we can develop using Asterisk. It is used by small businesses, large businesses, call centers, carriers and governments worldwide. I'm not going to describe about these application but if you are not familiar with this application, then you can simply search them on Wikipedia.
It is a free opensource software and originally design for Linux. But now Asterisk also runs on a variety of different operating systems including NetBSD, OpenBSD, FreeBSD, Mac OS X, and Solaris. And it is available for Microsoft Windows as AsteriskWin32. But still it is most stable on Linux and recommended OSs are Debian, Fedora, CentOS. And also other Linux OSs like Gentoo, SuSE, Mandrake and Slackware.
Subscribe to:
Posts (Atom)