Normalization in Database Structure

Introduction

Normalization in a database is a unique technique that is used to organize data in the database. The approach it uses is a systematic one which decomposes the table to eliminate repetition of data known as redundancy. It also removes characters which are undesirable in the database like updates, anomalies, and insertions, this process puts data in a tabular form and transfers data which are duplicated in the related tables in the database. The critical use of normalization is mainly to eliminate useless data and ensuring that the data stored is dependent meaning it makes sense which is logical. Usually, normalization is divided into five standard forms namely; First Normal Form, Second Normal Form, Third Normal Form, BCNF and lastly the Fourth Normal Form. In this paper, we will be looking at the Third Normal Form which is said to be a table when it’s in Second Normal Form and it does not contain any transitive dependency. This 3NF does not include any overlapping candidate keys.

Advantages of Normalization in Relational Database

Normalizing database is essential as we have covered a little of the introductory part about it and it has advantages as to why it should be used. The advantages include;

  1. Grouping Data Logically – Developers who create database find it way easier to find and locate data which is normalized and the process is usually quick as there are no dirty data. With this, they are also making it easier for other app developers to design, implement, write and delete data in an effortless systematic way rather than having a hard time to deal with unwanted data. In this company it being a 24-hour running business grouping the data logically is essential as it would enable the management to have precise information of all the doings in the company from hour to hour. The information taken is correct as there would not be a scenario where a worker has worked over hours due to signing in and signing out of workers directly from the database.
  2. Reduces Data Duplication – A normalized relational database reduces data duplication as it looks for the same unique data which is duplicated and deletes the rest. This way it creates more space for the database for additional files which is so advantageous. In our scenario, each worker will be in the database using unique features to identify them apart from only their names. Having the workers phone numbers, date of births or gender will quickly help in differentiating them. If we just kept their names, there could be higher chances of data duplication as many people share the same name.
  3. Enforcing Referential Integrity of Data – This is a process of implementing data relationships between joint tables in a database. Without this enforcement, tables lose its links with other tables which have related data which will lead to inconsistent data thus making it a dirty data. Normalization brings its advantages as its process jointly joins these tables which relate with each other and prevents inconsistent data from happening. Worker’s name consists of its table, worker’s phone numbers, location, date of birth gender, secondary phone numbers and their address are tables which relate to one another as they hold data for specific people. Without normalization in this database then lots of data can mistakenly be used for other purposes hence making it dirty data, so it is advantageous to use normalization in this aspect so that data tables related to each other serve the primary goal.
  4. Database Table Compaction – Normalization helps in compacting tables in a database so that they are precise and meaningful. Data tables should be divided into small portion to avoid compiling data which may result in ambiguous data. Temporary worker’s data like assignments, facility location, the days worked and shifts should be separated in different tables but related to each other to be cautious of every single data entering the database this way it will be advantageous as there is no loss of data or data manipulation. In this instance to add or delete data from the database of a worker whose worked days were entered wrongly it would be easier to go to that particular table and update or remove.

Reasons for Denormalization

Denormalization in database refers to a technique which optimizes redundant data and adds them to more tables as it helps in avoiding costly joints relational database. This term does not refer not doing normalization its just another technique which is used and optimized after doing normalization in the database. In normalization, we store data in different logical tables to minimize redundant data as we strive to only get one copy of data per piece in the database. In this company, for example, we have normalized the database where we have a shift table and a worker’s table. Each entry in the shift table would have a Worker’s ID but not the Worker’s Name. In a scenario we want to retrieve a list of all the shifts with the Worker’s Name then we must do a mutual relation between these tables. This is fantastic when the worker changes his/her name then we only need to update the preferred name in one table. The drawback of not doing denormalization the tables will be big hence spending unnecessary time in joining tables. Using the technique, the redundancy data will be optimized to extra efforts and it will bring efficiency in database management.

 

 

Relationships Formed Among Tables

Once we have normalized the database, the relationship between tables must be established. When working with data, we usually rely on the relationship between the tables to put the data together in a meaningful way. For example, Worker’s shift is useless unless you know which worker took a shift and these are data which are not stored in the same table hence a relationship between them is important. The following data we will use as a demonstration which has been processed through normalizing in Third Normal Form (3NF).

Worker: {FirstName*, LastName*}

Gender: {Male*, Female*}

Phone: {PhoneNumber*}

Email: {Email*}

Address: {Address*}

Shift: {MorningShift*, EveningShift*}

Work: {WorkDates*}

Now its time to establish the relationship between these tables and see how they relate from one table to one.

  1. One-to-one Relationship – Both of the tables only consist of one record on each side, and the primary key value only relates to one or no record in the other table. Married people are a perfect explanation of this as you are only married to one person. In the above example, Worker’s table and the Worker’s date serve as a good example of this relationship of tables.
  2. One-to-many Relationship – In this relationship, only the primary key table contains the record which is either not related to any table or related to one or more tables. This relationship is like a child he can only have a father, but the father can have multiple children. The Worker’sName table is the father, it can relate to no table or any other table developed in the database.

iii.    Many-to-many Relationship – All the tables can have records that relate to each other in the database. Deploying this relationship of tables will require denormalization as it compacts redundant data to more tables where the data are related to each other, and the linking of the tables becomes easy this is because a relational database cannot directly accommodate this kind of relationship.

Conclusion

The process of normalization in a database is very useful and reduces a lot of workforces, loss of time and unwanted pressure as it simplifies the taskforce of entering, updating and deleting of data in the database. This technique is deployed in this company will play a significant role even in studying the data and understanding how the workers perform from time to time in the company. Dealing away with ambiguous data is also relatively crucial so that space is saved for other purposes rather than upgrading the storage with unwanted data.  This whole process will be so crucial for every person who is directly involved in this company and thus making it easy, pricise and credible data in the end.

 

References

Normalization of Database. Retrieved from; https://www.studytonight.com/dbms/database-normalization.php

Chester, A. (March, 2015). Advantages & Disadvantages of Normalizing a Database. Retrieved from; https://www.techwalla.com/articles/advantages-disadvantages-of-normalizing-a-database

Dhyawala, S. (July, 2017). Denormalization in Relational Database.  Retrieved from; https://www.geeksforgeeks.org/denormalization-in-databases/

Harkins, S. (April, 2003). Relational Database: Defining Relationship Between Database Tables. Retrieved from; https://www.techrepublic.com/article/relational-databases-defining-relationships-between-database-tables/

 
Do you need high quality Custom Essay Writing Services?

Custom Essay writing Service