HW_1_KEY
HW_1_KEY
Homework – 1 KEY
1. Define each of following terms:
a) Data: Data consists of raw and unorganized facts which have not yet been
processed to reveal their meaning. Example: Text, Number, Images.
c) Record: A logically connected set of one or more fields that describes a person,
place, event or thing. (Entire row in a table). Example: A Customer record may be
composed of the fields number, name, address.
3. Meta Data: Metadata is also known as data about data, it provides information about
other data like structure, format, and properties of data to help with organization and
management. Metadata also describes the data characteristics and the set of
relationships that links the data found within the database.
5. What are some basic database functions that a spreadsheet cannot perform?
Some basic database functions that a spreadsheet cannot perform include:
• Metadata Support: Spreadsheets lack support for self-documentation through
metadata.
• Data Type Enforcement: Spreadsheets cannot enforce data types or domains to
ensure data consistency within a column.
• Relationships: Spreadsheets do not provide mechanisms for defining relationships
among tables. Constraint Enforcement: They cannot enforce constraints to ensure
data consistency across related tables.
• Complex Querying: Spreadsheets are limited in their ability to perform complex
database queries and operations.
• Multiuser Collaboration: Spreadsheets may not facilitate multiuser collaboration
and concurrent data access effectively.
• Scalability: Spreadsheets may struggle to handle large datasets and complex data
structures efficiently.
6. Explain why the cost of ownership may be lower with a cloud database than
with a traditional, company database.
A cloud database has lower ownership costs by eliminating expensive hardware,
reducing maintenance and IT staff costs. With its scalability, companies pay only for
the resources they use. Cloud providers manage security, updates, and backups,
reducing operational burdens. Additionally, disaster recovery and high availability
minimize downtime costs, making it a more cost-effective option than traditional
databases.
Given the file structure shown in Figure P1.1, answer Problems 1–4.
1. How many records does the file contain? How many fields are there per record?
a. 7 (21-5Z, 25-2D, 25-5A, 25-9T, 27-4Q, 29-2D, 31-7P)
b. 5 (PROJECT_CODE, PROJECT_MANAGER, MANAGER_PHONE,
MANAGER_ADDRESS, PROJECT_BID_PRICE)
2. What problem would you encounter if you wanted to produce a listing by city?
How would you solve this problem by altering the file structure?
To list records by city, the main problem is that the MANAGER_ADDRESS field
contains multiple pieces of information, making it difficult to sort or filter by city
alone. This can be fixed by restructuring the file so that address components, such
as STREET, CITY, STATE, and ZIP_CODE, are stored in separate fields. By organizing
the data this way, it becomes easier to query and sort by city, allowing for the use of
the GROUP BY function to generate the listing efficiently.
3. 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?
To produce listings by last name, area code, city, state, or zip code, alter the file
structure by adding separate fields for each of these criteria i.e. PROJECT_MANAGER
and MANAGER_ADDRESS.
4. What data redundancies do you detect? How could those redundancies lead to
anomalies?
The file structure in Figure P1.5 shows data redundancy and inefficiencies.
Employees such as John D. Newson, David F. Schwann, and Anne R. Ramoras appear
multiple times, along with their details like EMP_NUM, JOB_CODE, JOB_CHG_HOUR,
and EMP_PHONE, leading to unnecessary duplication. Project names (PROJ_NAME)
are also repeated, further contributing to redundancy. If an employee is removed or
job codes change, multiple entries need to be updated, increasing the chance of
inconsistencies and errors. PROJ_HOURS is the only column without duplications.
CHAPTER 2:
2. Describe the basic features of the relational data model and discuss their
importance to the end user and the designer.
The relational data model organizes data into tables (relations) with rows (records)
and columns (attributes). It uses primary keys to uniquely identify records and
foreign keys to establish relationships between tables. Normalization reduces
redundancy, ensuring data integrity. Constraints enforce valid data entry, improving
reliability. For end users, it simplifies data retrieval, while for designers, it ensures
efficient organization and scalability.
Using Figure P2.4 as your guide, work Problems 4–5. The Deal Correlational
diagram shows the initial entities and attributes for the DealCo stores, which are
located in two regions of the country
1. Identify each relationship type and write all of the business rules.
The relational diagram above illustrates the following relationships:
a) There is a one-to-many relationship between Region and Store.
b) There is a one-to-many relationship between Store and Employee.
c) There is a one-to-many relationship between Job and Employee.
The business rules based on the above relationships are:
a) A single region can contain multiple stores.
b) Each store is located in one specific region.
c) A store can employ many employees.
d) Every employee is assigned to one store only.
e) A single job can be assigned to multiple employees.
f) Each employee can hold only one job.
1. Identify each relationship type and write all of the business rules.
3. Create the UML class diagram that reflects the entities and relationships you
identified in the relational diagram.
4. Create a Crow’s Foot ERD to include the following business rules for the
ProdCo company:
1. Write the business rules that are reflected in the ERD shown in Figure P2.17.