1. Trang chủ
  2. » Ngoại Ngữ

Oracle Data Modeling and Relational Database Design Ed 1 (Activity Guide)

192 769 1
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 192
Dung lượng 3,93 MB

Nội dung

Activity Guide D56497GC10 Edition 1.0 September 2010 D67009 Development Program (WDP) eKit materials are provided for WDP in-class use only Copying eKit materials is strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Oracle Data Modeling and Relational Database Design Author Copyright © 2010, Oracle and/or it affiliates All rights reserved Marcie Young Disclaimer Sue Harper Philip Stoyanov Nancy Greenberg Rick Green Brian Pottle This document contains proprietary information and is protected by copyright and other intellectual property laws You may copy and print this document solely for your own use in an Oracle training course The document may not be modified or altered in any way Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle The information contained in this document is subject to change without notice If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA This document is not warranted to be error-free Anjula Subbiahpillai Gerry Jurrens Nick Donatone David Lapoint Tom Provenzano Mike Ritz Tim Trauernicht Zhicheng Xu Ron Berry David Lyons Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S GOVERNMENT RIGHTS The U.S Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S Government contract Trademark Notice Oracle and Java are registered trademarks of Oracle and/or its affiliates Other names may be trademarks of their respective owners Kim Bell Maria Billings Steve Friedberg Bryan Roberts Priyanka Sharma Matthew Gregory Angelika Krupp Editors Daniel Milne Vijayalakshmi Narasimhan Graphic Designer Rajiv Chandrabhanu Publishers Shaik Basha Jayanthy Keshavamurthy Development Program (WDP) eKit materials are provided for WDP in-class use only Copying eKit materials is strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Technical Contributors and Reviewers Oracle University and Bridge Human Skills Developments,GCC use only Appendix A Practices and Solutions Development Program (WDP) eKit materials are provided for WDP in-class use only Copying eKit materials is strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Practices for Lesson Practice 1-1: Identify the Modeling Approach Practices for Lesson Practice 2-1: Identify Types of Business Direction Information Practices for Lesson Practice 3-1: Create a Data Flow Diagram 10 Practices for Lesson 11 Practice 4-1: Build a Data Flow Diagram in Oracle SQL Developer Data Modeler 12 Practices for Lesson 13 Practice 5-1: Decompose a Process in Your Data Flow Diagram 14 Practices for Lesson 15 Practice 6-1: Identify Entities and Attributes 16 Practice 6-2: Identify Entities and Attributes 17 Practices for Lesson 18 Practice 7-1: Analyze and Model Relationships 19 Practice 7-2: Analyze and Model Relationships 20 Practices for Lesson 21 Practice 8-1: Identify Unique Identifiers 22 Practice 8-2: Identify Unique Identifiers 23 Practices for Lesson 24 Practice 9-1: Build an ERD in Oracle SQL Developer Data Modeler 25 Practices for Lesson 10 27 Practice 10-1: Develop and Validate Your ERD 28 Practices for Lesson 11 29 Practice 11-1: Normalize an ERD 30 Practice 11-2: Validate ERD for Normalization 31 Practices for Lesson 12 32 Practice 12-1: Resolve M:M Relationships 33 Practice 12-2: Model Hierarchical Data 34 Practice 12-3: Model Hierarchical Data and Recursive Relationships 35 Practice 12-4: Examine Exclusive Relationships 36 Practice 12-5: Examine Exclusive Relationships 37 Practices for Lesson 13 38 Practice 13-1: Create and Assign Data Types 39 Practices for Lesson 14 40 Practice 14-1: Develop and Validate Your ERD 41 Practice 14-2: Develop and Validate Your ERD (Optional) 42 Practices for Lesson 15 43 Practice 15-1: Create an Initial Relational Model 44 Practice 15-2: Forward Engineer a Model 45 Practices for Lesson 16 46 Practice 16-1: Analyze Your Relational Model 47 Practices for Lesson 17 48 Practice 17-1: Denormalize Your Relational Model 49 Oracle Data Modeling Relational Design prohibited and is in Development Program (WDP) eKit materials are provided and for WDP in-class use Database only Copying eKit materialsAis -strictly violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Table of Contents Oracle Data Modeling Relational Design prohibited and is in Development Program (WDP) eKit materials are provided and for WDP in-class use Database only Copying eKit materialsAis -strictly violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Practices for Lesson 18 50 Practice 18-1: Create a Physical Model 51 Practices for Lesson 19 52 Practice 19-1: Generate DDL 53 Practices for Lesson 20 54 Practice 20-1: Re-Engineer the HR Schema 55 Practices for Lesson 21 56 Practice 21-1: Build a Multidimensional Model 57 Solutions for All Lessons 58 Solution 1-1: Identify Modeling Approach 59 Solution 2-1: Identify Types of Business Direction Information 60 Solution: Lesson Class Practice: Create a Data Flow Diagram 61 Solution 3-1: Create a Data Flow Diagram 62 Solution 4-1: Build a Data Flow Diagram in Oracle SQL Developer Data Modeler 63 Solution 5-1: Decompose a Process in Your Data Flow Diagram 66 Solution: Lesson Class Practice: Identify Entities and Attributes 70 Solution 6-1: Identify Entities and Attributes 71 Solution 6-2: Identify Entities and Attributes 72 Solution: Lesson Class Practice: Define Business Rules 73 Solution: Lesson Class Practice: Build a Relationship Matrix 74 Solution 7-1: Analyze and Model Relationships 75 Solution 7-2: Analyze and Model Relationships 76 Solution: Lesson Class Practice: Specify Unique Identifiers 77 Solution 8-1: Identify Unique Identifiers 78 Solution 8-2: Identify Unique Identifiers 79 Solution 9-1: Build an ERD in Oracle SQL Developer Data Modeler 80 Solution 10-1: Develop and Validate Your ERD 83 Solution 11-1: Normalize an ERD 84 Solution 11-2: Validate ERD for Normalization 85 Solution 12-1: Resolve M:M Relationships 86 Solution 12-2: Model Hierarchical Data 88 Solution 12-3: Model Hierarchical Data and Recursive Relationships 89 Solution 12-4: Examine Exclusive Relationships 91 Solution 12-5: Examine Exclusive Relationships 93 Solution 13-1: Create and Assign Data Types 94 Solution 14-1: Develop and Validate Your ERD 98 Solution 14-2: Develop and Validate Your ERD 100 Solution 15-1: Create an Initial Relational Model 101 Solution 15-2: Forward Engineer a Model 111 Solution 16-1: Analyze Your Relational Model 116 Solution 17-1: Denormalize Your Relational Model 125 Solution 18-1: Create a Physical Model 127 Solution 19-1: Generate DDL 137 Solution 20-1: Re-Engineer the HR Schema 145 Solution 21-1: Build a Multidimensional Model 185 Oracle University and Bridge Human Skills Developments,GCC use only Practices for Lesson Oracle Data Modeling Relational Design prohibited and is in Development Program (WDP) eKit materials are provided and for WDP in-class use Database only Copying eKit materialsAis -strictly violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Practice 1-1: Identify the Modeling Approach Starlight DVD and Games Rentals is a successful company that rents DVDs and games Last year’s turnover almost doubled to $6.5 million with a profile margin of just over 10%, which is high in this type of business The number of rentals increased 80% and the customer base tripled to 30,000 The number of available movie titles grew by 8%, reflecting the increase in titles coming out on DVD The number of copies in the stores increased by 45% to 63,000 The renting of games is still an immature business (less than 5% of turnover) and the number of game titles is steady as new games replace those removed from the catalog Starlight already has an information system to track rentals, but this needs enhancement to support proposed changes to the business A team of business consultants has carried out a study and produced a report outlining proposals The following is an excerpt from the report: • • • • • Starlight attracts new customers easily and the number of rentals is growing rapidly The customer base is not stable, however, which is a cause for concern We suggest implementing some new concepts that should attract new customers and retain existing customers The main idea is to introduce the concept of membership at Starlight Members will pay a membership fee (the amount to be decided) that entitles them to certain privileges that are valid for a period of time (length to be decided) Initially, there will be three types of membership (gold, silver, and bronze) although more may be introduced later Bronze membership is free and replaces the current way of handling rentals Silver and gold memberships incur a fee but entitle the member to privileges, such as a discount on the usual rental price for a type of title, a free DVD after a certain number of rentals, the right to take out more than the usual number of DVDs at the same time, and the right to take out more “new release” titles than usual In the current situation, only individuals (“customers”) can rent It is proposed to extend membership to companies as well A membership will be of a certain type, last for a specified period, and will be renewed periodically The type of membership cannot be changed If someone wants to upgrade from a bronze to a silver membership, the bronze membership is terminated and a silver membership is created Members will receive an automatic renewal or upgrade offer about a month before the membership is due to expire if they have rented a tape or game during the previous four weeks Bronze memberships that not lead to a rental during the rental period are terminated automatically Silver and gold members receive a membership card only after paying the appropriate fee Members can terminate their membership by request at any time Another cause for concern is the number of “lost” DVDs We propose some new procedures to address this problem Every customer seeking membership will have to provide proof of identity as part of the registration process A photocopy of the identification will be stored A membership card, containing the membership number, Oracle Data Modeling Relational Design prohibited and is in Development Program (WDP) eKit materials are provided and for WDP in-class use Database only Copying eKit materialsAis -strictly violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only In this practice, you review the following case study and identify the models that need to be developed and what approach should be used • • type, expiration date, and a photograph of the holder, will be provided This card will have to be shown for every rental transaction In addition, the store manager will be able to produce a weekly report identifying DVDs that are more than two weeks overdue Members who have the DVDs will be requested to return them immediately The request will be repeated until the DVDs are returned Members who fail to return DVDs, or who repeatedly break the rules by keeping DVDs for two weeks or more, will have their membership terminated Starlight management emphasizes that all amendments to the information system must be flexible enough to deviate from fees and time frames in individual cases Oracle Data Modeling Relational Design prohibited and is in Development Program (WDP) eKit materials are provided and for WDP in-class use Database only Copying eKit materialsAis -strictly violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Practice 1-1: Identify the Modeling Approach (continued) Oracle University and Bridge Human Skills Developments,GCC use only Practices for Lesson Oracle Data Modeling Relational Design prohibited and is in Development Program (WDP) eKit materials are provided and for WDP in-class use Database only Copying eKit materialsAis -strictly violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Practice 2-1: Identify Types of Business Direction Information In this practice, you gain experience in identifying the types of business direction information Read through each of the following notes and mark in the table the type of business direction information that it is (business objective, key performance indicator, critical success factor, or problem) Business Objective Key Performance Indicator Critical Success Factor Assumption Problem Store clerks not know when a membership is due for renewal, and cannot, therefore, proactively encourage customers to renew their membership To reduce the number of non-returned DVDs from 5% to To Reporting Schema Modeling and Relational Database A is- 176 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 60) Click the Add icon 61) Enter dm1_orcl for Connection Name, dm1 for User Name and Password, and orcl for SID Then click OK Modeling and Relational Database A is- 177 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 62) Select the dm1_orcl connection from the list, and click OK Modeling and Relational Database A is- 178 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 63) Your design has been exported successfully Note that you may encounter the Message dialog box behind another window Drag the Message header to another area in your window, and click OK 64) Now you can switch to Oracle SQL Developer and review the reports You first need to create a connection to the DM1 user Right-click Connections, and select New Connection Modeling and Relational Database A is- 179 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 65) Enter dm1_orcl for Connection Name, dm1 for Username and Password, and orcl for SID, and then click Connect 66) Click the Reports tab 67) Expand Data Modeler Reports > Design Content > Logical Model, right-click Logical Designs, and select Open Modeling and Relational Database A is- 180 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 68) Make sure that the dm1_orcl connection is selected, and click OK 69) You can specify some bind variables to narrow down what the report displays In this case, click Apply 70) A list of your designs is displayed Right-click your design name, and select Reports > Entities Modeling and Relational Database A is- 181 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 71) A list of the entities is displayed Select the DEPENDENTS entity to see the details To drill into the entity to see the list of attributes, right-click DEPENDENTS, and select Reports and then Attributes 72) The list of attributes is displayed Select the Name attribute to see the details of that attribute Modeling and Relational Database A is- 182 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 73) You can also run some exception reports Expand Design Rules > Relational Models, right-click Tables, and select Open 74) Click Apply Modeling and Relational Database A is- 183 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) 75) All your relational models are listed Select Relational_2 to see the “Tables without Columns” exceptions In this case, all the tables have at least one column; otherwise, the table would be listed 76) Review the other supplied reports Modeling and Relational Database A is- 184 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 20-1: Re-Engineer the HR Schema (continued) Solution 21-1: Build a Multidimensional Model Below is one possible solution to this practice 1) Close all open models 2) Select File > Import and select DDL File icon 4) Select the sh_cre_all.sql file in the /home/oracle/labs directory, and click Open 5) Click OK 6) Select Oracle Database 11g for Database Site, and click OK Modeling and Relational Database A is- 185 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only 3) Click the Add 7) Expand the Tables node to see the tables that will be created, and click Merge 8) Your relational model was created To see the list of dimensions in your physical model, expand Relational Models > Relational_1 >Physical Model > Oracle Database 11g > Dimensions Modeling and Relational Database A is- 186 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 21-1: Build a Multidimensional Model (Continued) 9) You can now create the Logical Model Click the “Engineer to Logical Model” reverse engineering icon 10) Expand the Tables node to see the entities that will be created Click Engineer Modeling and Relational Database A is- 187 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 21-1: Build a Multidimensional Model (Continued) 11) Your logical model was created Now you are ready to create a multidimensional model Right-click Multidimensional Models, and select New Multidimensional Model 12) You can now populate the multidimensional model Expand the Multidimensional Models node, right-click Multidimensional_1, and select Engineer From Oracle Model Modeling and Relational Database A is- 188 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 21-1: Build a Multidimensional Model (Continued) 13) Click OK to create the model 14) The multidimensional model is displayed Review the model Modeling and Relational Database A is- 189 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit Oracle University and Bridge Human Skills Developments,GCC use only Solution 21-1: Build a Multidimensional Model (Continued) Oracle University and Bridge Human Skills Developments,GCC use only Solution 21-1: Build a Multidimensional Model (Continued) Modeling and Relational Database A is- 190 Development Program Oracle (WDP) eKitData materials are provided for WDP in-class use only CopyingDesign eKit materials strictly prohibited and is in violation of Oracle copyright All WDP students must receive an eKit watermarked with their name and email Contact OracleWDP_ww@oracle.com if you have not received your personalized eKit

Ngày đăng: 25/11/2016, 19:12

TỪ KHÓA LIÊN QUAN