Confused with the formal definition of Data Redundancy in Database in your text books? I’m going to explain data redundancy in simple words in this post.
First of all consider the term ‘redundancy’. The meaning of the word ‘redundancy’ is no longer needed, exceeding what is necessary or natural, more than enough, so many that you don’t need them!
When you know the meaning of redundancy, the term ‘data redundancy’ is simpler now – redundancy of data, isn’t it? Data redundancy means the storage of data in database that is more than necessary.
A good database design makes you enter any data only once and managed in such a way that the same data will be used wherever required thereafter. However, a poor designing will fail to achieve that and make the user enter same data in multiple tables. When you have to supply same data in multiple tables, it will cause data redundancy.
Let’s take an example of School database. Suppose there is a table in database named Students which stores the information of student like, registration number, name, father’s name, date of birth, permanent address, contact number etc.
School: RegistrationNumber, Name, FatherName, DateOfBirth, PermanentAddress, ContactNumber
Now, there is another table which contains Fees information of student which contains fields like student’s name, month, amount, paid date etc.
Fees: ReceiptNumber, StudentName, FeesMonth, FeesAmount, PaidDate
Also, there is another table called Marks that stores marks information of student. This table contains fields like Student Name, Class, Section, Roll Number, Marks in English, Nepali, Math, etc.
Marks: SlipNumber, StudentName, Class, Section, RollNumber, English, Nepali, Math
Look at this situation. When we already have name field in Student table, the other two tables Fees and Marks also contain fields StudentName.
In fact, Student’s name field in Fees table and Marks table repeats same data (the name of any student) two more times unnecessarily. This is called data redundancy.
That was an example of data redundancy existing among multiple tables in a database, but you can find data redundancy even in a single table. Consider following table:
|1001||Mittal Products||308 Milan Street, Corner Stone Alley, Pokhara, Kaski District, Gandaki Zone||AR Drone 305||35||45000|
|1002||Kaveri Traders||Jeevan Marga – 01, Kalanki, Kathmandu||PK Kaplan 20||200||8000|
|1003||Mittal Products||308 Milan Street, Corner Stone Alley, Pokhara, Kaski District, Gandaki Zone||PK Kaplan 20||200||7500|
|1004||Nanda Pvt. Ltd.||Sundar Galli, Kuleshwor, Kathmandu||AR Drone 305||25||3800|
|1005||Mittal Products||308 Milan Street, Corner Stone Alley, Pokhara, Kaski District, Gandaki Zone||Nanda DK S28||10||2000|
Look at the table above. The same data for supplier and supplier address has to be repeated every time a new product is added to the stock. Rather than entering same supplier name and supplier address, we could have created another table and link with that creating relationship. This would avoid the need to enter same data multiple times.
Above is an example of data redundancy within single table.
Hope it helps you a bit? Please don’t forget to comment below and share the post if you find it useful.