Presentation is loading. Please wait.

Presentation is loading. Please wait.

ORGANIZING DATA AND INFORMATION-II (Business & Data modeling)

Similar presentations


Presentation on theme: "ORGANIZING DATA AND INFORMATION-II (Business & Data modeling)"— Presentation transcript:

1 ORGANIZING DATA AND INFORMATION-II (Business & Data modeling)
Chandra S. Amaravadi

2 IN THIS PRESENTATION.. Quick Review entity, entity class, attribute
database file, record, attribute, attribute value schema, primary key dbms activities Database planning Database requirements (modeling)

3 DATABASE PLANNING

4 PLANNING OBJECTIVES The objective of planning is to get an overall understanding of organization’s data and resource requirements: preliminary understanding of data requirements resource requirements assess size of database Scope, timeline What is a systematic way of obtaining an overview of data?

5 PLANNING METHOD Planning method is called Business systems planning
Understand background of the organization Study functions and processes Preliminary understanding of data-function relationships. What function creates what data? Develop EA (Planning) matrices & Enterprise Data Model Use for planning/scope/schedule/resource requirements

6 ENTITY-RELATIONSHIP (ER)
DATABASE ANALYSIS USING ENTITY-RELATIONSHIP (ER) APPROACH

7 DATABASE ANALYSIS Next step after planning
Develop an integrated model of data reqmts. ER Developed in 1976 by Chen to model data relationships Main concepts are : entity classes, attributes and Relationships How are entity classes and attributes identified?

8 MODELLING ENTITY CLASSES
Entity Class – Collection of related entities. FLIGHTS AVIS PRODUCTION ord# BOOKING PROPERTY Common nouns (singular or plural doesn’t matter) Customers, Products, Students etc. Cannot be attributes or proper nouns (e.g. ‘TESLA’) Cannot be database/IT concepts

9 MODELLING ATTRIBUTES Attribute – Property or characteristic of an entity class Generally on top of eclass or below eclass Use ovals Pkey is leftmost attribute & underlined attr. not duplicated except for pkey from to flt# FLIGHTS Pkey – An attribute whose values are unique within a table

10 FOR DISCUSSION For a residential real estate organization, identify
which of the following are: Eclasses attributes relevant and not relevant? listing# sale id advertisement owner employee bonuses refrigerator s.no bedrooms newsletter square footage property taxes on property farm equipment building permit construction season

11 MULTI-VALUED ATTRIBUTES..
Sometimes attributes have more than one set of values per entity instance. to from fare flt# FLIGHTS

12 MODELLING RELATIONSHIPS
Relationships: logical and meaningful connections between two or more entity classes. to pname addr from flt# FLIGHTS reserved PASSENGERS Use diamonds, label L-R, T-B order Indicate cardinality (1:1, 1:M, M:N)

13 AVOID FLOWCHARTING places are for CUSTOMER ORDERS PRODUCTS places
SHOULD NOT BE A PROCESS FLOW places orders CUSTOMER ORDERS PRODUCTS

14 CARDINALITY CARDINALITY -- Number of entities that participate in a
relationship. Can be 1:1, 1:M or M:N Between two entity classes A and B, these are defined as follows: 1:1 -- Each instance of A is associated with one instance of B and vice versa. 1:M -- Each instance of A is associated with many instances of B. Each instance of B is associated with one instance of A. M:N -- Each instance of A is associated with many instances of B Max cardinality rule: in 3-way & above, use max cardinality

15 THREE WAY RELATIONSHIPS
Agencies book flights for passengers AGENCIES book FLIGHTS PASSENGERS in 3-way & above, use max cardinality

16 RELATIONSHIP ATTRIBUTES
Attributes that belong with a relationship rather than with an eclass. E.g. agencies book flights for passengers on a certain date date FLIGHTS booked PASSENGERS AGENCIES Include airlines

17 CLASS/SUBCLASS RELATIONSHIPS..
Entity classes can be grouped into parent/child or superclass/class or class/subclass relationships based on common characteristics. PASSENGERS Class/Superclass Is-a BUSINESS LEISURE Sub -classes

18 DRAWING THE ER CHART List eclasses and attributes, use format below
Identify relationships among eclasses Decide which relationships to show Verbalize relationships Use rectangles for eclasses, diamonds for relationships and ovals for attributes Underline pkey Use only horizontal and vertical connectors Prod: prod#, descr., price, qty subclasses: tables, chairs… Cust: cust#, name, dt. Joined subclasses: new, returning

19 SOME GUIDELINES.. Label eclasses, attributes and relationships
Pkey should be left most attribute and underlined Depict the cardinalities Use max cardinality for 3-way and above Do not repeat attributes; do not show cross-reference keys If developing for an organization, do not include name of organization or organization e.g. IRS, DMV

20 ER CHECK LIST all entity classes depicted? no unnecessary duplication?
all attributes included/labelled? multivalued attr. shown (if any)? derived/system attr. omitted? Pkeys marked? fkeys omitted? Relationships correct/labelled? Cardinalities shown? Cycles avoided?

21 DISCUSSION Draw Data Models (ER models) corresponding to the following
Situations: A property can be business or residential property. It can have one or more owners. An owner can own more than one property. A professional publication can have single author or multiple authors. The author could be affiliated with a company or with a university. A publication has the author names, journal title, volume, year, and page#. A person(s) may bid for one or more items at an auction. The bid price is specified at the time of bidding. This has to be more than the start price. There are multiple auctions at any given time. Persons could bid for multiple items in multiple auctions.

22 DISCUSSION.. Draw Data Models (ER models) corresponding to the following situations: A person makes a reservations for flights. A reservation can consist of one or more flights. A flight is operated by one or more airlines. A flight has a flt#, origin, destination, dep. time, arr. time and # of passengers. Airlines can be domestic or international. They have a code, a full name, terminal and contact information. Legal situation: A case can be a civil or criminal case and is tried in a particular court (such as the 9th judicial circuit court). The party pressing the lawsuit is called the plaintiff and the accused is called the defendant. The defendant can have an attorney or a public defender if they cannot afford one. The attorney for the plaintiff is called the prosecuting attorney. Attorneys present evidence for or against the case (no need to distinguish between these two) and could use objects or witnesses. A judge decides admissible evidence and presides over the case. A jury evaluates the case and passes a verdict of “guilty” or “not guilty”

23 DISCUSSION.. Develop a data model for an order fulfillment center with
the following conditions (make relevant assumptions) Customer places one or more orders Each order is for one or more of the company’s products An order can have multiple invoices Orders are entered by sales representatives Orders are shipped by carriers Each shipment has a bill of lading. Products and shipments are stored in warehouses A shipment contains more than one order A carrier can deliver multiple shipments A shipment is delivered by one carrier only

24 Multivalued attributes
Entity classes Relationships Attributes Multivalued attributes Is-a Class/ subclass 1 : 1 1 : M M : N Relationship attributes

25 SUMMARY OF CONCEPTS Term Definition Enterprise Data Model
The data model created during the planning process. Enterprise Analysis Matrix (EA matrix) This is also called the planning matrix. It shows relationships between processes or activities and entity classes (information classes) Entity Individual example of person, place or thing. Entity Class Collection of related entities. Attributes Properties of entity classes about which we would like to collect information. Relationship Logical and meaningful connection between two or more entity classes. Class/subclass Grouping of entity classes based on common characteristics. Cardinality Number of entities participating in a relationship. Max cardinality In 3 way relationships and above use max cardinality.

26 ER RULES Use only horizontal and vertical lines.
Entities are not shown e.g. Avis, Cisco, Western Illinois University. If the model is developed for a single organization, it is not shown. Attributes should be placed with the eclasses to which they belong ‘Patient id’ belongs to patient. ‘Lab test’ does not belong to patient class or physician class but to ‘treatment’ class Attributes cannot be duplicated except for pkey Attributes should be connected only to eclasses (or relationships) Attributes cannot be connected to other attributes If pkey is not given, it can be assumed Eclass cannot be connected directly to another eclass Eclasses can be connected with other eclasses only with relationship symbol or class/subclass symbol Relationships must be labelled. “is-a” is always the label for class-subclass relationships Cardinality is not shown in class-subclass relationships Where degree is > 2 use max cardinalities Cycles and derived attributes must be avoided

27


Download ppt "ORGANIZING DATA AND INFORMATION-II (Business & Data modeling)"

Similar presentations


Ads by Google