Normalization and Database Structures
Essay by people • June 7, 2011 • Essay • 2,120 Words (9 Pages) • 2,155 Views
Attention paid to database structures is extremely essential, and this point often is understood without being expressed. Normalization is just one developed way for getting the bugs out of the system. It involves a process of redefining relationships to help make for a more efficient database. This paper will first cover how normalization is used to check relations before going into detail about and differentiating between three known patterns of relationships that have been identified in many databases. These three include trees, simple networks, and complex networks.
How can normalization be used to check relations?
The process of normalizing a database is basically fine tuning and optimizing its structure for various reasons. Some of the major advantages of this process are to promote efficient data entry by eliminating redundancy, report generation, and disk space management. These advantages center on organization for more efficient use of the database.
One of the reasons for normalizing is to eliminate redundancy within a table. To do this multiple tables are formed and relationships are built between them. This can lead to users having to use forms that are cumbersome or foreign. Another disadvantage is that it can be a tedious task to do when working with large amounts of data making for a time consuming process.
When deciding on weather or not to normalize a database one needs to completely understand if the normalized relations are preferred for the given situation. Just because a table has a defined relation does not mean that it has an effective or appropriate structure. Modification anomalies can be the negative result of changing data in some relations. Through normalization these "anomalies can be eliminated by redefining the relation into two or more relations." (Kroenke , 2000)
The two types of modification anomalies are deletion and insertion. In a deletion anomaly, with only one deletion, facts about two entities are lost. With an insertion anomaly a fact can not be inserted about one entity until an additional fact about another entity has been defined. Both of these anomalies can be deleted by dividing the given relation into two different relations, each one dealing with a unique theme. This same process can also create referential integrity constraints though. Harry Newton describes referential integrity as referring to a database's ability to link data in two or more files, so that adding data to a record in one file automatically updates data in another file.
Every normalized relation should only have a single theme. If any relation has two or more themes they should be broken down. "Relations can be classified by the types of modification anomalies to which they are vulnerable." (Kroenke , 2000) Normal forms are the classes of relations and the techniques for preventing anomalies. A relation is categorized into a normal form, from dependences of its structure.
There are seven normal forms: 1NF, 2NF, 3NF, BCNF, 4NF, 5NF, and DK/NF. The first six normal forms had some limitations in that each normal form is only related to eliminating certain anomalies. The domain/key normal form (DK/NF) was different in that "a relation in DK/NF is free of all modification anomalies, regardless of their type, and any relation that is free of modification anomalies must be in DK/NF." (Kroenke , 2000) "The relationship between the 7 levels of normalization (1 through 5, plus BCNF and DKNF) can intuitively be represented as layered, concentric circles, with the largest circle as the 1NF, then a smaller, inside circle as the 2NF, and so on, the smallest circle being the DKNF." (Pepperdine University)
Normalization can be used to check relations by classifying a given relation in a normal form. "A relation is in first normal form if it meets the definition of a relation. A relation is in second normal form (2NF) if all of its non-key attributes are dependent on all of the key. A relation is in third normal form (3NF) if it is in second normal form and it contains no transitive dependencies. A relation is in BCNF if every determinant is a candidate key. A relation is in fourth normal form if it is in BCNF and it contains no multi-valued dependencies. A relation is in DK/NF if every constraint on the relation is a logical consequence of the definition of keys and domains." (Zicklin) Normal forms can provide database designers with the following. A formal framework that allows analyzing relation schemas based on the key as well as the functional dependencies among their attributes. They can also provide for a series of tests that allow a database to be normalized to any degree. In this case when a test fails, the violating relation must be decomposed and tested again.
Normal forms alone cannot guarantee a good database design. Through decomposing, normalization must also confirm to the existence of two additional properties that should be prevalent in relational schemas. These two properties are: "The lossless join or non-additive join property, which guarantees that the spurious tuple problem does not occur. The other is the dependency preservation property, which ensures that all functional dependencies are represented in some of the individual resulting relations." (Pepperdine University)
Normalization has proven to be effective when analyzing relations but it does come with certain consequences as were previously discussed. Without knowledge of relations and the effects that normalization could have on those relations the process might be too much to jump into.
What is the difference between Trees, Simple Networks, and Complex Networks?
A data structure is a way of storing data in a computer so that it can be used efficiently. Patterns of relationships among entities are not assumed within the E-R model or the semantic-object model, but "some patterns do occur often enough that they have been given special names". (Kroenke , 2000) A few examples of these named patterns include Trees, Simple Networks, and Complex Networks.
The overall goal of each of these database structures is the same in that they are defined to help provide efficient manipulation of data by the users and programmers alike. First each of these structures will be presented in detail than the differences between them will be highlighted.
The tree structure is also identified as a hierarchy. It is simple a representation of a "data structure
...
...