Chapter 2 DATABASE DESIGN FOR SQL SERVER 2000
Chapter 2 DATABASE DESIGN FOR SQL SERVER 2000 77 Employee not further divisible. Employe. I. An attribute, which is not repeating, is known as an atomic value, Nam. Address which is a value that is represented only one time. You learned about Gende. Dat. o. Birt. the decomposition of attributes in the earlier discussion about hav SSN ing Street, City, State, and Zip fields rather than a general Address Contrac. Typ. Salary field. This is precisely what the 1NF does. Positio. MachineName1 Successfully passing the 1NF eventually increases data access and MachineName. performance. If there is ever a violation of the first normal form, MachineName. it can easily be resolved. To know whether your database has violated the restrictions of 1NF, look at the attributes in an entity FIGURE 2.6 The Employee entity violating a restriction and then see whether the attribute repeats or is akin to any of the of 1NF. other attributes. If so, then you know that you are violating the first normal form. To resolve this type of situation, find all the attributes that seem to be repeating. For example, take a look at a variation of the Employee entity where a repeated array of values holds information for an employee s multiple machine capabilities, as seen in Figure 2.6. To resolve this type of situation, find all the attributes that seem to be repeating. Create a new entity with a name similar to the repeating attribute and place all repeatedly occurring attributes into it. For this example, if a machine entity didn t already exist it would be created. After creating a new entity and shifting repeated attributes into it, you have to create a key (a key that uniquely identifies each row in the new entity) and a related key in the Employee entity. In the example it is better treated as a many-to-many relationship. Many employees can run a machine and an employee can run many machines. This relationship would look similar to the illustration in Figure 2.7. Employe. EmployeeMachiner. Machinery Employe. I. Machiner. I. Employe. I. Firs. Nam. Machiner. I. Name Las. Nam. Location Stree. Addres. Purpose Cit. Stat. Zi. Cod. Gende. Dat. o. Birt. SS. Contrac. Typ. Salar. FIGURE 2.7 Positio. Employee/machinery relationship.
For high quality website hosting services please check cheap web hosting website.