Create a relationship between the two tables

Assignment Help Database Management System
Reference no: EM131428378

Improve It Project 2-7

Placer Hills Real Estate expanded the database created in the Improve It Project 1-7 in Chapter 1. To ensure consistency, the starting file is provided for you. For this project, you use Design view to edit properties in a table and integrate data integrity rules. You edit data records, create a relationship between the two tables, and enforce referential integrity constraints. Finally, you view how the table records will print using Print Preview. This project has been modified for use in SIMnet.

Skills Covered in This Project -

  • Edit a table using Design view.
  • Edit field properties in Design view.
  • Create an input mask.
  • Save a table.
  • Create a foreign key.
  • Create a 1:M relationship between tables.
  • Enforce referential integrity.
  • View a table in Datasheet view and expand related records.
  • Preview table results for printing.

1. Open the PlacerHills-02 database start file.

2. The file will be renamed automatically to include your name. Change the project file name if directed to do so by your instructor.

3. Enable content in the security warning.

4. Open the Agents table in Datasheet view (Figure 2-95). 

a. Look at the DateHired and Phone fields. The manager of the real estate office wants those to be formatted differently.

b. Notice that both Jack Johnstone and Kallyn Duarte have the same value in the EmployeeNum field. If the employee number is supposed to be unique, something must not be set correctly with the primary key in this table.

c. Change Kallyn Duarte's EmployeeNum to be 168, the correct value.

5. Change to Design view to make needed corrections to the Agents table.

a. Notice that the table does not have a primary key. Although Access recommends that you assign a primary key in a table, Access lets you create a table without one.

b. Set the EmployeeNum as the primary key.

c. Set the Format property of the DateHired field to use Short Date.

d. Create an input mask for the Phone field. Select the Phone Number Input Mask. Don't make any changes to the mask or placeholder character and select the Without the symbols in the mask, like this radio button. Complete the Input Mask Wizard.

e. Change all fields to be Required.

f. Save the table.

g. Switch to Datasheet view to ensure that the formatting shows as desired.

h. Adjust the field width of the DateHired field to 13. Remember that you can select the column, right-click to open the context menu and then select Field Width to change the width to a specific size.

i. Adjust the field width of the Phone field to 16.

j. Save and close the Agents table.

6. Determine the type of relationship and the foreign key field.

a. There is a one-to-many relationship between the two tables since an agent can list many different real estate properties, but a property is listed by only one agent.

b. The foreign key comes by taking the primary key field from the 1 table and adding it in as an additional field in the M table. In this case, the EmployeeNum should also be added into the Listings table.

c. Open the Listings table in Datasheet view. Notice that this table has a field that stores the agent's name. However, it doesn't have the foreign key. To minimize redundant data, you will change the Agent field so that it will now store the agent's employee number instead of the agent's name. This requires changing the data values as well as field properties.

7. Edit the data values in the Agent field in the Listings table.

a. Click the arrow to the right of the Agent Field Name and select Sort A to Z. Because the employee name values begin with the first name, the sort isn't alphabetical by last name. However, the sort makes it easier to change the data values since all the property listings by the same agent are grouped together.

b. Type 169 in the Agent field for Gerardo Montoya.

c. Change each of the six records for Jack Johnstone to have the value of 160 for the Agent field. After entering the first value, you can use copy and paste to enter the remaining values.

d. Continue changing the remaining records using the information in the following table: 

j. Remove the sort from the Agent field.

k. Save the table.

8. Switch to Design view in the Listings table to edit the properties of the foreign key.

a. Select the ListingAgent field.

b. Change the field name to ListingAgentNumber. In this database, Placer Hills prefers that the foreign key have a unique name instead of choosing to use FKEmployeeNum as the name of the field.

c. Change the Description to read Must match an EmployeeNum in the Agents table.

d. Change the field size to 3.

e. Save and close the table. Access warns you that the field size has been changed and that you may lose data. Your values meet this new size. Click Yes.

9. Create a one-to-many relationship between the Agents table and the Listings table.

a. Open the Relationships window and add the two tables.

b. Enlarge the table objects, if needed, to see all of the fields.

c. Drag the EmployeeNum field from the Agents table on top of the ListingAgentNumber field in the Listings table as shown in Figure 2-96.

d. Select the correct choices to Enforce Referential Integrity and Cascade Update Related Fields. 

e. Leave the Cascade Delete Related Records check box not selected. You do not want to delete property listing records just because an agent may leave the company. This allows you to keep a record of the listings.

f. Create the relationship.

g. Save the changes and close the Relationships window.

10. Open the Agents table in Datasheet view.

a. Click to expand the records for Kelly Weatherby. There should be nine properties listed.

b. Close the Agents table.

11. Preview the data records in the Listings table for printing.

a. Select the Listings table in the Navigation Pane.

b. Use Print Preview to show a preview of how the table will print.

c. Change the page to Landscape orientation.

d. Close the Print Preview.

12. Close the database.

13. Upload and save your project file.

14. Submit project for grading.

Attachment:- Assignment File.rar

Reference no: EM131428378

Questions Cloud

What are the unique challenges to persuasive writing : We are bombarded with persuasive writing every day. Cite one example. Persuasive writing is often more difficult than other forms of writing. What are the unique challenges to persuasive writing?
Culture and intercultural communications : You will be exploring various aspects of culture and intercultural communications. Your final assignment in this course will be to conduct an extensive oral history interview with a person who is somewhat older than you and from a culture or subgr..
Determining the construction commences : They seek out several people who invest in Hill Pty Ltd. Jack and Jill then form Hill Pty Ltd, the investors transfer $20,000,000 to Hill Pty Ltd, Hill Pty Ltd purchases the real property for $4,800,000 (the price agreed by Jack and Jill) and con..
What is the author trying to say : What is the author trying to say? What evidence does he/she use? Is there anything about it in the textbook, if so, does it align with Telford?
Create a relationship between the two tables : For this project, you use Design view to edit properties in a table and integrate data integrity rules. You edit data records, create a relationship between the two tables, and enforce referential integrity constraints. Finally, you view how the t..
Discuss about the truman doctrine-harry truman : You have already developed a thesis statement and developed an outline in which you explored two (2) real-life international incidents from the past five (5) years involving the United States as they received an elevated status as a world power. N..
How to stop heroin deaths : Your analysis will focus on the rhetorical strategy of the appeal to logos. That is, you will be analyzing the evidence and reasoning that the writer uses to support his/her/their main claim.
Discuss the merits of the court opinion : Using the Internet and search engines, investigate Leydon v. Town of Greenwich, 257 Conn. (2001), relating to the Connecticut court's ruling on a beach access dispute. Discuss the merits of the court's opinion.
What was the nature of the british government : Most Americans look at the Revolutionary period almost entirely in terms of the thoughts and actions of the Americans, with Britain playing the role of the faceless enemy intent on oppressing America, depriving them of their rights, even enslaving..

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd