Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 12 View Design and Integration. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for view design.

Similar presentations


Presentation on theme: "Chapter 12 View Design and Integration. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for view design."— Presentation transcript:

1 Chapter 12 View Design and Integration

2 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for view design and integration View design with forms View integration

3 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Why View Design and Integration? Database complexity reflects organizational complexity. Time-consuming and labor-intensive process Collect requirements from different user groups Coordination among designer team members Manage complexity of large designs

4 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Managing Complexity As the “divide and conquer” strategy is used to manage complexity, view design and integration is an approach to managing complexity of the database design effort.

5 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Overview of View Design and Integration

6 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. View Design with Forms Important source of database requirements Reverse the process described in the Chapter 10 Derive an ERD that is consistent with the form Five step procedure

7 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Sample Customer Order Form

8 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Form Analysis Create an ERD to represent a form ERD supports form and other anticipated processing ERD should be consistent with the form ERD is a view of the database

9 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Form Analysis Steps

10 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Step 1: Define Form Structure Construct a hierarchy that depicts the form structure Most forms consist of a simple hierarchy where the main form is the parent and the subform is the child. Complex forms can have parallel subforms and more levels in the hierarchy.

11 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Hierarchical Form Structure

12 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Step 2: Identify Entity Types Split each node in the hierarchical structure into one or more entity types. Make an entity type if a form field is a potential primary key and there are other associated fields in the form.

13 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Entity Types for the Customer Order Form

14 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Step 3: Attach Attributes Attach attributes to the entity types identified in the previous step Group together fields that are associated with the primary keys found in Step 2 Form fields close together may belong in the same entity type

15 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Attributes Added to the Entity Types

16 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Step 4: Add Relationships Relationships involving the form entity type –Form entity type contains the form's primary key –Relationships between the form entity type and other entity types derived from the parent node: usually 1-M. –Add a relationship to connect the form entity type to an entity type in the child node Add relationships to connect entity types derived from the child node if not already connected

17 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Entity Relationship Diagram

18 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Step 5: Check Completeness and Consistency The ERD should adhere to the diagram rules specified in Chapter 5. In addition, the ERD should be consistent and complete with respect to the form structure. Explore diagram transformations as suggested in Chapter 6.

19 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Consistency Rules for Relationship Cardinalities 1.In at least one direction, the maximum cardinality should be one for relationships connecting entity types derived from the same node (parent or child). 2.In at least one direction, the maximum cardinality should be greater than one for relationships connecting entity types derived from nodes on different levels of the form hierarchy.

20 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Analysis of M-Way Relationships using Forms Choice between M-way and binary relationships can be difficult. Data entry forms provide a context to understand M-way relationships. An M-way relationship may be needed if a form shows a data entry pattern involving three entity types.

21 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Sample Project Purchasing Form

22 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. ERD for the Project Purchase Form

23 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Sample Purchasing Form

24 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. ERD for the Purchasing Form

25 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. View Integration Combine individual views into a complete database design Incremental and parallel integration approaches

26 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Incremental Approach

27 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Parallel Approach

28 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Integration Strategy

29 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Precedence Relationships Form A precedes form B if form A must be completed before form B. Preceding forms typically provide data for subsequent forms. Place forms with precedence relationships in the same view subset

30 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Precedence Example

31 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Resolving Synonyms and Homonyms Synonym: spelled differently but have the same meaning Homonym: same sound and often the same spelling but different meaning Forms provide a context to resolve Major part of standardizing a vocabulary

32 View Integration Examples

33 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Sample Invoice Form

34 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Incremental Integration Example The following 5 slides demonstrate the Incremental Integration process by integrating the Invoice Form with the ERD for Customer Order Form

35 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Form Hierarchy

36 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Identify entity types and attach attributes

37 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. List the form fields that match existing entity types Order No matches the Order entity type. Customer No, Customer Name, Address, City, State, and Zip match the Customer entity type. Product No, Description, and Unit Price match the Product entity type.

38 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Analyze Homonyms Revise the Customer entity type with two sets of address fields: billing address fields and shipping address fields. Add shipping address fields to the Invoice entity type. Create a new entity type (ShipAddress) with the shipping address fields.

39 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Integrated ERD (incremental)

40 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Parallel Integration Example The difference between the parallel and incremental approaches is that integration occurs later in the parallel approach. For the parallel approach, ERDs for forms must be constructed before merging.

41 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. ERD for the Invoice Form

42 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Integrated ERD (Parallel)

43 McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Summary View design and integration is an important skill for designing large databases. Manage complexity of large development efforts The result of form analysis is an ERD that is a view of the database. Two approaches for View Integration, incremental and parallel


Download ppt "Chapter 12 View Design and Integration. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for view design."

Similar presentations


Ads by Google