Background
In every real life Application, Database is a must. It might reside in Backend (ex: MySQL server-side) or in Application-end (ex: Android’s Local DB) to make application user-friendly and fetch data faster. A handy knowledge on Database always makes you a bit advanced than others but a Redundant Database will do just the opposite. It will make your life hell. Relationships are always crucial while designing a database in a large context.
In this context, I will write on simple Normalization concept to get rid of Data Redundancy
Normalization
Suppose, we have to store Student, Department information in our Database. Student and Department are dependent on each other. One student can belong to only one department but one department can have many students. At the first glance one might depict the database like this:
Looks good? Yes, it looks pretty simple and easy to understand! Okay, let’s dig deep a bit.
Look at the following point:
- What If a Department Head changes 6 months later in any particular department?
Let’s assume Mr. B from CSE department retires from the job. Then you have to change all the hundreds/thousands of rows where Mr. B has entries. What if Mr. C has to hand over his position to someone else named Mr. O? Again you have to update all the rows where Mr. C has entries. Seems painful and tiring? Yes, that’s where Redundancy comes.
Solution:
- We could have store these data into 2 separate tables. One in tbl_student and another one is in tbl_department.
- student_id, student_name, student_roll, department_id fields in tbl_student
- department_id, department_name, department_head in fields tbl_department
Let’s look at the following Normalization:
- We have broken the previous table into two parts as mentioned above
- tbl_department‘s id will Refer to tbl_student‘s department_id.
- Now, we can easily modify just the tbl_department table. Suppose, Mr. C hands over his duty to Mr. O. Then, we can easily update only one row in tbl_department.
- We can add other departments easily in the future.
May 29, 2018 at 1:34 pm
Nice post. I was checking constantly this weblog and I’m inspired! Very helpful info specifically the last section 🙂 I maintain such information a lot. I used to be seeking this particular info for a very lengthy time. Thanks and best of luck.
February 5, 2019 at 6:01 pm
Thank you for your feedback!
September 20, 2018 at 11:01 am
great post, very informative. I wonder why the other experts of this sector do not notice this. You should continue your writing. I am confident, you’ve a great readers’ base already!
November 19, 2018 at 4:40 pm
Thank you! we are currently a bit busy, but we will come back to you guys
December 3, 2018 at 3:42 pm
I’ve recently started a site, the info you offer on this site has helped me tremendously. Thanks for all of your time & work.
December 17, 2018 at 8:24 am
This actually answered my drawback, thank you!
January 5, 2019 at 2:06 am
I and also my pals appeared to be reading the nice helpful hints from your web blog and then unexpectedly I had an awful suspicion I had not expressed respect to the blog owner for them. All of the people appeared to be as a consequence thrilled to read through all of them and have now truly been tapping into these things. Appreciate your simply being indeed thoughtful as well as for finding this kind of great guides millions of individuals are really wanting to discover. My very own honest regret for not expressing appreciation to you sooner.
January 26, 2019 at 7:40 am
Just wanna input on few general things, The website pattern is perfect, the subject material is real excellent. Believe those who are seeking the truth. Doubt those who find it. by Andre Gide. ddffkgfdbbeb
February 5, 2019 at 2:54 pm
Thank you for your feedback!
March 28, 2019 at 6:28 am
Good post. I learn something new and challenging on websites I stumbleupon everyday.
It will always be useful to read through articles
from other authors and practice something from their web sites.
March 28, 2019 at 6:44 am
bookmarked!!, I like your site!
March 30, 2019 at 8:29 am
Thank you, please stay connected, we are trying to post more subjects
March 29, 2019 at 2:17 am
I am sure this paragraph has touched all the internet visitors,
its really really nice piece of writing on building up new weblog.
March 29, 2019 at 3:19 am
Hi there to every , since I am truly keen of reading this website’s post to be updated regularly.
It carries good material.
March 30, 2019 at 1:12 am
Thank you, please stay connected!
April 24, 2019 at 12:43 pm
Excellent effort!
May 2, 2019 at 7:10 am
ver nice blog.
May 8, 2019 at 11:11 pm
thank you web site admin
May 10, 2019 at 7:02 am
Thank you for your appreciation
May 10, 2019 at 7:11 am
Thank you for reading our content!
May 22, 2019 at 8:20 am
Excellent blog here! Also, your site loads up very fast! What web host are you using?
I wish my site loaded up as fast as yours lol
June 14, 2019 at 11:46 am
Thank you, we are using WordPress
May 26, 2019 at 5:38 am
As I site possessor I believe the content matter here is rattling great , appreciate it for your hard work. You should keep it up forever! Best of luck.
May 26, 2019 at 3:17 pm
Amazing blog layout here. Was it hard creating a nice looking website like this?
June 14, 2019 at 11:47 am
Not at all, We are using WordPress
May 30, 2019 at 7:17 pm
I just want to say I am very new to blogs and truly savored you’re web site. More than likely I’m likely to bookmark your website . You amazingly come with superb articles and reviews. Regards for sharing your webpage.
May 30, 2019 at 11:23 pm
Your place is valueble for me. Thanks!?
May 31, 2019 at 8:55 am
Amazing blog layout here. Was it hard creating a nice looking website like this?
June 14, 2019 at 11:48 am
We are using WordPress
June 1, 2019 at 9:57 am
Amazing blog layout here. Was it hard creating a nice looking website like this?
June 1, 2019 at 9:57 am
Your positions continually have got a lot of really up to date info. Where do you come up with this? Just saying you are very resourceful. Thanks again
June 3, 2019 at 6:55 pm
I am not very superb with English but I find this very easygoing to translate.
June 6, 2019 at 10:03 pm
I am usually to running a blog and i actually recognize your content. The article has really peaks my interest. I am going to bookmark your site and keep checking for new information.
June 7, 2019 at 1:03 pm
Very Good post. Perfect Job..
June 8, 2019 at 10:48 pm
You made some respectable points there. I seemed on the web for the issue and found most people will go together with along with your website.
June 14, 2019 at 11:31 am
thank you!
June 10, 2019 at 3:14 pm
Greate share and thanks for this helpfoul content . hope to see more from you .
June 10, 2019 at 6:29 pm
Only wanna tell that this is extremely helpful, Thanks for taking your time to write this.
June 11, 2019 at 6:03 pm
I just want to say I am just newbie to blogging and site-building and really enjoyed this page. Almost certainly I’m going to bookmark your blog . You amazingly come with excellent articles and reviews. Regards for revealing your web page.
June 13, 2019 at 8:21 am
Any other information on this?
June 14, 2019 at 11:25 am
There are lots of techniques, we just shared the basic
June 14, 2019 at 2:40 am
thank you web site admin
June 24, 2019 at 4:46 am
I just want to say I am very new to blogs and truly savored you’re web site. More than likely I’m likely to bookmark your website . You amazingly come with superb articles and reviews. Regards for sharing your webpage.
June 25, 2019 at 2:40 am
Only wanna tell that this is extremely helpful, Thanks for taking your time to write this.
August 19, 2019 at 1:34 am
I don’t unremarkably comment but I gotta state thanks for the post on this amazing one 😀