Download presentation
Presentation is loading. Please wait.
Published byJayson Bond Modified over 9 years ago
1
E-R Model (2) IS 240 – Database Management Lecture #6 – 2004-02-05 Prof. M. E. Kabay, PhD, CISSP Norwich University mkabay@norwich.edu
2
2 Copyright © 2004 M. E. Kabay. All rights reserved. Topics Diagrams Weak entities Subtype entities Developing the E-R model Modeling user perceptions Homework
3
3 Copyright © 2004 M. E. Kabay. All rights reserved. Diagrams EntityClass Maximum cardinality Entity1 HAS A Entity2 M:N Relationship Entity1–Entity2 1:N Crow’s feet N:1
4
4 Copyright © 2004 M. E. Kabay. All rights reserved. Diagrams (cont’d) 1:N Entity1–Entity2 Entity1 must have at least one Entity2 Entity2 may have No Entity1; or Entity2 must have 0 or 1 Entity1 1:N Entity3 Entity3 may include no or up to N other Entity3
5
5 Copyright © 2004 M. E. Kabay. All rights reserved. Diagrams (cont’d) How can you create E-R diagrams? CASE tools PowerPoint Other drawing programs PowerPoint tools
6
6 Copyright © 2004 M. E. Kabay. All rights reserved. Hints for Working with PowerPoint Use SlideView to access entire screen Draw a symbol set its line width, fill, and color SET AUTOSHAPE DEFAULTS using right- click menu Drag Flowchart and Connectors menus out of the AutoShapes menu – place at one side of screen Use the Align or Distribute menu to arrange symbols
7
7 Copyright © 2004 M. E. Kabay. All rights reserved. Strong and Weak Entities Strong entity can exist in a DB even if no other entities are linked to it; e.g., Customer may not have purchase Student may have no classes Professor may have no classes Weak entity cannot exist in DB unless another entity exists; e.g., Purchase cannot exist without a customer and without an item Class may not exist without a student or without a professor
8
8 Copyright © 2004 M. E. Kabay. All rights reserved. Weak Entities Weak entities are shown in diagrams using a rounded-corner rectangle ID-dependent entities Compound identifier [entity1, entity2]; e.g., [Course,Section] [Class, TestNumber] [AutoMaker, PartNumber] Differences of usage for term Some designers look only at DB structure Others look at logical relationships (see p. 57 for more detail)
9
9 Copyright © 2004 M. E. Kabay. All rights reserved. Subtype Entities What if an entity has optional characteristics? E.g., Gender-specific organs and diseases Social security number when customer is a company vs an individual WheelDrive or Transmission for auto vs bicycle in Vehicle dataset If all the possible attributes are defined for an entity-class, some attributes (fields) will be null Can define subtype entities Truck, auto, tractor, motorcycle, bicycle... Male, female Adult, child Individual, company
10
10 Copyright © 2004 M. E. Kabay. All rights reserved. Diagramming Subtypes
11
11 Copyright © 2004 M. E. Kabay. All rights reserved. Showing Properties Diagrams can show attributes (properties) of entities See Fig 3-6, p. 56 for two styles (and next slides) Each attribute shown in an oval attached to entity box or relationship diamond Or provide a list of attributes in a rectangular table with text labels
12
12 Copyright © 2004 M. E. Kabay. All rights reserved. Properties Diagrams (1)
13
13 Copyright © 2004 M. E. Kabay. All rights reserved. Properties Diagrams (2)
14
14 Copyright © 2004 M. E. Kabay. All rights reserved. Developing the E-R Model Designer must understand what the users do and want to do with the system Include detailed analysis of business rules Constraints on relationships; e.g., What determines if a professor is assigned a class? Are there prerequisites for classes? What are the prerequisites for a specific class? Are there exceptions to these rules? Which?
15
15 Copyright © 2004 M. E. Kabay. All rights reserved. Modeling User Perceptions Remember that the DB is not intended to model reality in the way a scientific model models the observable, objective world Dealing with how human beings run their business Analysts’ perceptions are secondary to users’ way of doing their work But beware of paving the cowpath If there is a better way of doing the job by using the DB, discuss it E.g., just because a handwritten report uses old pre-printed forms does not mean that the DB system should use them
16
16 Copyright © 2004 M. E. Kabay. All rights reserved. Homework For next Tueday, 17 Feb 2004 Study and review Chapter 3, pp. 51-75 Pay particular attention to Examples 1 & 2 (Dance Club, Sailboat Charters) For 14 points, answer questions 3.11-3.24 and use PowerPoint or other computer- based tool to create your diagrams By Tuesday, 24 Feb 2004, for 1 extra point each, do any or all of Problems 3.25-3.28 (up to 4 points) Project A Firedup Project questions A-E (up to 5 points)
17
17 Copyright © 2004 M. E. Kabay. All rights reserved. DISCUSSION
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.