Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright  Oracle Corporation, 1999. All rights reserved. 11 ® Introduction to Entities, Attributes, and Relationships Section 02 – Lessons 1,2,3 Use.

Similar presentations


Presentation on theme: "Copyright  Oracle Corporation, 1999. All rights reserved. 11 ® Introduction to Entities, Attributes, and Relationships Section 02 – Lessons 1,2,3 Use."— Presentation transcript:

1 Copyright  Oracle Corporation, 1999. All rights reserved. 11 ® Introduction to Entities, Attributes, and Relationships Section 02 – Lessons 1,2,3 Use the student note section below for further explanation of the slide content.Use the student note section below for further explanation of the slide content. Use your mouse to resize the content pane and read all of the student note section.Use your mouse to resize the content pane and read all of the student note section.

2 1-2 Copyright  Oracle Corporation, 1999. All rights reserved. ® Overview Why conceptual modeling? Introduction of the Key role players: –Entities –Attributes –Relationships Why conceptual modeling? Introduction of the Key role players: –Entities –Attributes –Relationships

3 1-3 Copyright  Oracle Corporation, 1999. All rights reserved. ® Why Create a Conceptual Model? It describes exactly the information needs of the business It describes exactly the information needs of the business It facilitates discussion It facilitates discussion It helps to prevent mistakes, misunderstanding It helps to prevent mistakes, misunderstanding It forms important “ideal system” documentation It forms important “ideal system” documentation It forms a sound basis for physical database design It forms a sound basis for physical database design It is a very good practice with many practitioners It is a very good practice with many practitioners It describes exactly the information needs of the business It describes exactly the information needs of the business It facilitates discussion It facilitates discussion It helps to prevent mistakes, misunderstanding It helps to prevent mistakes, misunderstanding It forms important “ideal system” documentation It forms important “ideal system” documentation It forms a sound basis for physical database design It forms a sound basis for physical database design It is a very good practice with many practitioners It is a very good practice with many practitioners

4 1-4 Copyright  Oracle Corporation, 1999. All rights reserved. ® Between Dream and Reality...

5 1-5 Copyright  Oracle Corporation, 1999. All rights reserved. ® Dream and Reality - Activity Directions: Working in pairs, one student describes his/her "dream house" while the other student attempts to draw it. The pairs can discuss specific details but, the student describing the house is not allowed to see what is being drawn until after time is called. Assessment: Ask volunteer student pairs to describe the discrepancies between what they thought was being described and what was actually drawn. Directions: Working in pairs, one student describes his/her "dream house" while the other student attempts to draw it. The pairs can discuss specific details but, the student describing the house is not allowed to see what is being drawn until after time is called. Assessment: Ask volunteer student pairs to describe the discrepancies between what they thought was being described and what was actually drawn.

6 1-6 Copyright  Oracle Corporation, 1999. All rights reserved. ® Entity Relationship Modeling Models business, not implementation Is a well-established technique Has a robust syntax Results in easy-to- read diagrams…...although they may look rather complex at first sight Models business, not implementation Is a well-established technique Has a robust syntax Results in easy-to- read diagrams…...although they may look rather complex at first sight

7 1-7 Copyright  Oracle Corporation, 1999. All rights reserved. ® Goals of Entity Relationship Modeling Capture all required information Information appears only once Model no information that is derivable from other information already modeled Information is in a predictable, logical place Capture all required information Information appears only once Model no information that is derivable from other information already modeled Information is in a predictable, logical place

8 1-8 Copyright  Oracle Corporation, 1999. All rights reserved. ® Database Types Hierarchical Relational Network ER Model

9 1-9 Copyright  Oracle Corporation, 1999. All rights reserved. ® Entity An Entity is: –“Something” of significance to the business about which data must be known. –A name for the things that you can list. –Usually a noun. Examples: objects, events Entities have instances. An Entity is: –“Something” of significance to the business about which data must be known. –A name for the things that you can list. –Usually a noun. Examples: objects, events Entities have instances.

10 1-10 Copyright  Oracle Corporation, 1999. All rights reserved. ® Entities and Instances PERSON PRODUCT PRODUCT TYPE EMPLOYMENT CONTRACT JOB SKILL LEVEL TICKET RESERVATION PURCHASE ELECTION PRINTER PREFERENCE DOCUMENT VERSION PERSON PRODUCT PRODUCT TYPE EMPLOYMENT CONTRACT JOB SKILL LEVEL TICKET RESERVATION PURCHASE ELECTION PRINTER PREFERENCE DOCUMENT VERSION Mahatma Gandhi 2.5 x 35 mm copper nail nail my previous contract violinist fluent tonight: Hamlet in the Royal the CD I bought yesterday for parliament next fall …...

11 1-11 Copyright  Oracle Corporation, 1999. All rights reserved. ® Entities and Sets dish washer JOB waiter cook waitress manager financial controller porter piano player An entity represents a set of instances that are of interest to a particular business.

12 1-12 Copyright  Oracle Corporation, 1999. All rights reserved. ® Attribute Also represents something of significance to the business Is a single valued property detail of an entity Is a specific piece of information that: –Describes –Quantifies –Qualifies –Classifies –Specifies an entity. Also represents something of significance to the business Is a single valued property detail of an entity Is a specific piece of information that: –Describes –Quantifies –Qualifies –Classifies –Specifies an entity.

13 1-13 Copyright  Oracle Corporation, 1999. All rights reserved. ® Attribute Examples Entity EMPLOYEE CAR ORDER JOB TRANSACTION EMPLOYMENT CONTRACT Entity EMPLOYEE CAR ORDER JOB TRANSACTION EMPLOYMENT CONTRACT Attribute Family Name, Age, Shoe Size, Town of Residence, Email,... Model, Weight, Catalog Price, … Order Date, Ship Date, … Title, Description,... Amount, Transaction Date, … Start Date, Salary,...

14 1-14 Copyright  Oracle Corporation, 1999. All rights reserved. ® Practice Exercises Complete the following Practice Exercises in class: 1-1 "Instance or Entity" 1-2 "Guest" Complete the following Practice Exercises in class: 1-1 "Instance or Entity" 1-2 "Guest"

15 1-15 Copyright  Oracle Corporation, 1999. All rights reserved. ® Relationships Also represent something of significance to the business Express how entities are mutually related Always exist between two entities (or one entity twice) Always have two perspectives Are named at both ends Also represent something of significance to the business Express how entities are mutually related Always exist between two entities (or one entity twice) Always have two perspectives Are named at both ends

16 1-16 Copyright  Oracle Corporation, 1999. All rights reserved. ® Relationship Examples EMPLOYEES have JOBS JOBS are held by EMPLOYEES EMPLOYEES have JOBS JOBS are held by EMPLOYEES PRODUCTS are classified by a PRODUCT TYPE PRODUCT TYPE is a classification for a PRODUCT PRODUCTS are classified by a PRODUCT TYPE PRODUCT TYPE is a classification for a PRODUCT PEOPLE make TICKET RESERVATIONS TICKET RESERVATIONS are made by PEOPLE PEOPLE make TICKET RESERVATIONS TICKET RESERVATIONS are made by PEOPLE

17 1-17 Copyright  Oracle Corporation, 1999. All rights reserved. ® JOB waiter cook waitress manager financial controller porter piano player Employees have Jobs Ahmed Jill Adam Maria EMPLOYEE Numerical observation: All EMPLOYEES have a JOB No EMPLOYEE has more than one JOB Not all JOBS are held by an EMPLOYEE Some JOBS are held by more than one EMPLOYEE Numerical observation: All EMPLOYEES have a JOB No EMPLOYEE has more than one JOB Not all JOBS are held by an EMPLOYEE Some JOBS are held by more than one EMPLOYEE Shintaro dish washer

18 1-18 Copyright  Oracle Corporation, 1999. All rights reserved. ® Entity Representation in Diagram Drawn as a “softbox” Name singular Name inside Neither size, nor position has a special meaning Drawn as a “softbox” Name singular Name inside Neither size, nor position has a special meaning EMPLOYEE TICKET RESERVATION JOB ASSIGNMENT JOB ORDER ELECTION During design, entities usually lead to tables.

19 1-19 Copyright  Oracle Corporation, 1999. All rights reserved. ® Attributes in Diagrams * o EMPLOYEE Family Name Address o Birth Date o Shoe Size o Email JOB Title o Description During design, attributes lead to columns. * * Mandatory attribute, that is, known and available for every instance Optional attribute, that is, unknown or unimportant to know for some instances

20 1-20 Copyright  Oracle Corporation, 1999. All rights reserved. ® Jobs are held by one or more employees An employee has exactly one job has Relationship in Diagrams EMPLOYEE JOB has held by exactly one one or more During design, relationships lead to foreign keys.

21 1-21 Copyright  Oracle Corporation, 1999. All rights reserved. ® has held by EMPLOYEE JOB Relationships in Diagrams

22 1-22 Copyright  Oracle Corporation, 1999. All rights reserved. ®mandatory:mandatory:optional:optional: Relationships in Diagrams

23 1-23 Copyright  Oracle Corporation, 1999. All rights reserved. ® EMPLOYEE JOB Two Perspectives has held by mandatory:mandatory:optional:optional:

24 1-24 Copyright  Oracle Corporation, 1999. All rights reserved. ® Every EMPLOYEE has one and only one JOB One Way has EMPLOYEE JOB held by mandatory:mandatory:optional:optional:

25 1-25 Copyright  Oracle Corporation, 1999. All rights reserved. ® The Other Way has EMPLOYEE JOB held by mandatory:mandatory:optional:optional: A JOB may be held by one or more EMPLOYEES

26 1-26 Copyright  Oracle Corporation, 1999. All rights reserved. ® ” “ Each P split into must be may be one or more Qs One and only one Q “ Each P may be split into one or more Qs ” Reading a Relationship End P split into Q part of

27 1-27 Copyright  Oracle Corporation, 1999. All rights reserved. ® “ Each Q part of ” must be may be one or more Ps One and only one P “ Each Q must be part of exactly one P ” Reading a Relationship End P split into Q part of

28 1-28 Copyright  Oracle Corporation, 1999. All rights reserved. ® “ Each P may be split into one or more Qs ” “ Each Q must be part of exactly one P ” Reading a Relationship End P split into Q part of

29 1-29 Copyright  Oracle Corporation, 1999. All rights reserved. ® Functions Drive Data Business functions are always present. –Explicit –Assumed Business functions need data. An entity, attribute, or relationship may be modeled because: –It is used by a business function. –The business need may arise in the near future. Business functions are always present. –Explicit –Assumed Business functions need data. An entity, attribute, or relationship may be modeled because: –It is used by a business function. –The business need may arise in the near future.

30 1-30 Copyright  Oracle Corporation, 1999. All rights reserved. ® Weather Forecast København Bremen Berlin München Amsterdam Bruxelles Paris Bordeaux 1/-5 7/2 3/-1 8/3 5/-3 4/0 4/1 0/-3 January 26 3 3 3 4 3 2 3 4 * * * *

31 1-31 Copyright  Oracle Corporation, 1999. All rights reserved. ® ( Copenhagen ) Bremen Berlin ( Munich ) Bruxelles Paris Bordeaux Amsterdam UK FR DE DK CH NL BE IT LU IR København München ( Brussels )

32 1-32 Copyright  Oracle Corporation, 1999. All rights reserved. ® located in having referring to referred in about Weather Forecast, a Solution WEATHER TYPE * Icon * Description WIND DIRECTION * Icon * Description COUNTRY * Name o Geographical Position CITY * Name o Geographical Position FORECAST * Date o Minimum Temperature o Maximum Temperature o Wind Force referring to referred in subject of

33 1-33 Copyright  Oracle Corporation, 1999. All rights reserved. ® Graphical Elements of ER Diagram Subtype # # Unique identifier ArcArc NontransferabilityNontransferability * * * * o o EntityAttributeRelationship

34 1-34 Copyright  Oracle Corporation, 1999. All rights reserved. ® Summary ER Modeling models information conceptually Based on functional business needs ER Modeling focuses on “what” a business is doing. Not necessarily the “how” Diagrams provide easy means of communication Detailed, but not too much IN CLASS - Complete the Practice Exercises IN CLASS and ONLINE Complete the Quiz for this Chapter. ER Modeling models information conceptually Based on functional business needs ER Modeling focuses on “what” a business is doing. Not necessarily the “how” Diagrams provide easy means of communication Detailed, but not too much IN CLASS - Complete the Practice Exercises IN CLASS and ONLINE Complete the Quiz for this Chapter.


Download ppt "Copyright  Oracle Corporation, 1999. All rights reserved. 11 ® Introduction to Entities, Attributes, and Relationships Section 02 – Lessons 1,2,3 Use."

Similar presentations


Ads by Google