Presentation is loading. Please wait.

Presentation is loading. Please wait.

Information Resources Management January 30, 2001.

Similar presentations


Presentation on theme: "Information Resources Management January 30, 2001."— Presentation transcript:

1 Information Resources Management January 30, 2001

2 Agenda n Administrivia n Homework #1 n Entity-Relationship Modeling n Homework #3

3 Administrivia n Homework #2 n Book?

4 Homework #1 Results n Recommendations n Excel - 7; web - 1 n Access - 46; web - 37 n Oracle, SQL Server - 0; web - 15 n Scores

5 Entity-Relationship (E-R) Modeling n Why n Entities n Attributes n Relationships n “The Rules” n Examples

6 Why Do E-R Modeling n Early process n Much cheaper to fix - cost of changes n Understandability n Data is critical – needs to be correct n Complexity n Stability n Conversion to database

7 Cost of Changes

8 Entities n person, place, thing, event, concept n have attributes sufficient to distinguish them n NOUNS n Examples: employee, department, division, project, skill, location

9 Entity Type n A collection of entities with identical attributes not attribute values n An entity instance (or just instance) is a single occurrence of an entity type

10 Strong vs. Weak Entities n Entities can be weak or strong n default (if not specified) is strong n a weak entity can not exist without the existence of an instance of some other entity type n Examples: bank transaction (account), grade (student and course), dependent (employee)

11 Entity Name Entity (Strong) Entity (Weak)

12 Entity Examples Department Employee Account Transaction

13 Attributes n characteristics of entities n their values differentiate entities n two types: n identifiers (keys) – determine an instance of an entity (underlined) n descriptors – specify non-unique characteristics n Example: first name vs. student ID n NOUNS

14 Attributes n Simple - single value only n Composite - consists of other attributes n Multivalued - one or more of the same type of value n Derived - value can be calculated

15 Attributes Simple Multivalued Derived Composite Underlined if key

16 Attributes Employee EmployeeID NameAddress Street City State First Last Years Employed Assignment

17 Relationships n association between the instances of one or more entity types (usually two) n can have any number of occurrences or instances n described in terms of degree, connectivity, cardinality, and existence n VERBS

18 Relationship Examples n employee has skills n employee works in department n employee manages project

19 Relationship Examples Employee Skills Department Projecthasworks inmanages

20 Relationship Degree n Indicates number of entity types involved in a relationship n one - unary n two - binary n three - ternary n more - n-ary

21 Relationship Degree n Unary – relationship between two instances of the same entity type n Example: employee manages employees Employeemanages

22 Relationship Degree n Binary – relationship between one instance of each of exactly 2 entity types n Binary is the typical relationship degree Employee Department works in

23 Relationship Degree n Ternary – relationship between one instance of each of exactly 3 entity types n N-ary – relationship between one instance of each of N entity types EmployeeProjectusesSkills

24 Relationship Connectivity n Qualitatively describes how many entities of one type may be related to a single entity of another n Values are: “one” or “many” n Possibilities: one-to-one, one-to- many, many-to-many n Connectivity refers to the possibility, which may not occur for every entity of that entity type

25 Connectivity Examples n Employee is assigned a parking space (one-to-one) n Professor teaches a course (one-to- many) n Students takes courses (many-to-many)

26 Connectivity Examples (1) EmployeeProfessorStudentParking Space Course assignedteachestakes 1 1 1 M NM

27 Connectivity Examples (2) EmployeeProfessorStudentParking Space Course assignedteachestakes

28 Relationship Cardinality n The binding upper and lower bounds on the number of participating entities in a relationship n Sometimes referred to as “business rules” n Example: Full-time professor must teach 3 courses ProfessorCourseteaches 1 3

29 Relationship Existence n Defines whether the existence of an entity requires (mandatory) or does not require (optional) the existence of a related entity n Examples n Driver has auto insurance (mandatory) n Tenant has renter’s insurance (optional)

30 n Connectivity, cardinality, and existence are often combined and simply described as relationship cardinality.

31 Existence Examples (1) EmployeeProfessorStudentParking Space Course assignedteachestakes 1 1 1 M NM

32 Existence Examples (2) EmployeeProfessorStudentParking Space Course assignedteachestakes

33 Example 1 A hospital has a large number of registered physicians. Patients are admitted to the hospital by a physician. Any patient who is admitted must have exactly one admitting physician. A physician may optionally admit any number of patients. Once admitted, a given patient must be treated by at least one physician. A particular physician may treat any number of patients, or may not treat any. Whenever a patient is treated by a physician, the hospital records the details of the treatment.

34 Example 2 A company has a number of employees. The company also has several projects. Each employee may be assigned to one or more projects, or may not be assigned to a project. A project must have at least one employee assigned, and may have any number of employees assigned. An employee’s billing rate may vary by project, and the company wishes to record the billing rate for each employee when assigned to a particular project.

35 Example 3 n A real estate firm lists property for sale. n The firm has a number of sales offices in several states n Each sales office is assigned one or more employees. An employee must be assigned to only one sales office. n For each sales office, there is always one employee assigned to manage that office. An employee may manage only the sales office to which she is assigned. n The firm lists property for sale. n Each unit or property must be listed with one (and only one) of the sales offices. A sales office may have any number of properties listed, or may have no properties listed. n Each unit of property has one or more owners. An owner may own more than one unit of property. An attribute of the relationship between property and owner is percent owned.

36 Example 4 n Construct an E-R diagram for a bank database that shows the basic relationships among customers, checking accounts, savings accounts, loans, loan officers, and the bank branches where various accounts and loans are taken out. You also want to keep track of transactions on accounts and loans, and maintain the current balance in each account and the balance of the loan.

37 Homework #3 n E-R Modeling n Two weeks n Do #1 now n Review #2 and #3 n Computer generated n Visio, Word, SilverRun


Download ppt "Information Resources Management January 30, 2001."

Similar presentations


Ads by Google