How Many Records Doses the File Contain
By: 守一 何 • Essay • 750 Words • February 14, 2015 • 1,812 Views
How Many Records Doses the File Contain
P 1.1 Problems 1-4
[pic 1]
- How many records doses the file contain? How many fields are there per record?
The file contain 7 records, and each of the records have 5 fields .
- What problem would you encounter if you wanted to produce a listing by city? How would you solve this problem by alerting the file structure?
We can notice the city existed as one of the attribute in MANAGER_ADDRESS, in order to get the string (city), the problem is we need to decompose and the character (MANAGER_ADDRESS) and do the search. I prefer to city name as a separate attribute.
- If you wanted to produce a listing of the file contents by last name, area code, city, state, or zip code, how would you alter the file structure?
I would divide some component parts (PROJECT_NAMAGER, MANAGER_PHONE, MANAGER_ADDRESS) into basic components.
PROJECT_NAMAGER:
MGR_LASTNAME, MGR_FIRSTNAME, MGR_INITIAL;
MANAGER_PHONE:
MGR_AREA_CODE, MGR_PHONE;
MANAGER_ADDRESS:
MGR_STREET, MGR_CITY, MGR_STATE, MGR_ZIP
Date should be stored as their basic components, so that data would be searched flexibility and quickly.
- What data redundancies do you detect? How could those redundancies lead to anomalies?
The manager name Holly B. Parker and George F. Dort occur more than one time in PROJECT_NAMAGER, and the same problems exist in MANAGER_PHONE, MANAGER_ADDRESS. So it means that if Holly B. Parker or George F. Dort changes and moves the phone or address, there changes must be all made, other words, this would cause the anomalies.
P 1.5 problems 5-8
[pic 2]
- Identify and discuss the serious data redundancy problems exhibited by the file structure shown in Figure P 1.5
Each row’s fields should define the characteristics of one entity, but this field structure includes characteristics of multiple entities. PROJ_NUM and PROJ_NAME are likely characteristics of a PROJECT entity, the same as the JOB_CODE and JOB_CHG_HOUR are characteristics of a JOB entity, EMP_NUM, EMP_PHONE and EMP_NAME are clearly characteristics of an EMP entity.
The JOB_CHG_HOUR have different values for the same CT job code, but the structure of this field makes it difficult to avoid anomalies when update the field, the record can’t be determined and changed directly and clearly,
- Looking at the EMP_NAME and EMP_PHONE contents in Figure P1.5, what changes would you recommend?
The recommendation is that data should be more atomic. The changes can be done like this:
EMP_NAME: EMP_LASTNAME, EMP_FIRSTNAME, EMP_INITIAL.
EMP_PHONE: EMP_AREACODE, EMP_PHONE
It will make it easier to manage and organize the field.
- Identify the various data sources in the file you examined in Problem 5.
The data resources should be able to identify:
Employee data: names, employee numbers and phone numbers.
Project data: project names and project hours
Job data: job charge per hour and job code should be clearly.
- Given your answer to Problem 7, what new files should you create to help eliminate the data redundancies found in the file shown in Figure P 1.5?
The new data resources can be the PROJECT, EMPLOYEE, JOB and CHARGE.