In previous section General steps in DB development process , ISA ,EDM Database Architectures Aim Design of conceptual Data Model Objectives Understand  Conceptual Data Modeling Concepts of E-R Modeling Model Example & Limitations RECAP
Purpose: create detailed specification of internal documents and tasks from the EDM Input: EDM, usage statistics, and other information gathered during the analysis Output: ER-Diagram, Data Representation, Constraints, Task Decompositions Techniques: data modeling  top-down decomposition of tasks until their specification is sufficiently detailed to allow a programmer to implement them task decomposition may result in tasks replacing the original task or in subtasks controlled by the original task Tools: ER-Model APPROACH
To build a What is 1 st  Step ? What are the choices,Why ? User Requirements - User is not sure  - Precise specification is difficult Communication Problems - Analyst & user communication - User not willing to take responsibility Technical - Skills of modeler - Design Methodology – Non Standard CONCEPTUAL MODEL
Feasibility study Requirement Analysis & Specifications Data Modeling Process Modeling Implementation Prototyping Testing DESIGN APPROACH
DESIGN PHASES Requirements Collection & Analysis Conceptual Design (G) Logical Design (Blue Print) Physical Design Application Design Methods Req. Collection Conceptual Model Data Base System DBMS Tools , OS Requirements Specs Conceptual Database Model Logical Models Performance Tests Final Schema Application PGMS
Conceptual  Design Logical Design Physical Design Application Design Requirement Collection & Analysis C,Windows,Power Builder ORACLE Relational DBs ER & ERR Model Questionnaire & Interview DESIGN METHODS
Models can be useful when we want to examine or manage part of the real world The costs of using a model are often considerably lower than the costs of using or experimenting with the real world  itself Examples: airplane simulator nuclear power plant simulator flood warning system model of US economy model of a heat reservoir map WHY TO USE MODEL
A Map Is a Model of Reality MODEL OF REALITY
A model is a means of communication Users of a model must have a certain amount of knowledge in common A model on emphasized selected aspects A model is described in some language A model can be erroneous A message to map makers: “Highways are not painted red, rivers don’t have county lines running down the middle, and you can’t see contour lines on a mountain” [Kent 78] MODEL TO RAISE QUESTION
A process that construct an abstract model which represents the entities,relationships and activities of an enterprise of real world Putting a Real World Object on to Paper Purpose of model is to sharpen the question MYCOM.COM    US $ 10 b  MCA/MMS IIPS  CONCEPTUAL MODELING
Why Conceptual Modeling ? Obtain better understanding of business Enable the end-user communication Discover design errors at early stage Build a Solid Foundation Ensure the quality A DBMS independent DB design What to Model ? Static information Data  - Entities Associations - Relationship among entities Dynamic Information Process – operations/transactions Integrity constraints – Business Rules / Regulations  CONCEPTUAL MODELING
Process - Oriented Approach Focus on activities, process & operations Data Flow Diagram Data – Oriented Approach Focus on data & their relationship Characteristics of Data captured Data more complex than process Rich data source is the GOAL Data is more stable than process Data Orientation  - Longer life Object – Oriented Approach Combine data and process CONCEPTUAL MODELING APPROACHES
Entity – relationship model (ER) introduced in 1976 by Peter Chen Extended ER model (EER) expanded the original ER with new concepts ER MODELING Entity An Entity is a conceptual object Physically or conceptually exists Usually a noun in requirement specification E.g. Lecturer , Course , Movie , Sales-order Lecturer Course SSN Name Teach
Collection of Entities have same properties An entity instance is a single occurrence of entity type Described once in metadata A noun in requirement specifications A true data entity have many instances,each with distinguishing feature A strong entity – exists independently like  student , Course , Car A weak entity – existence depends upon other entity (identifying owner) Dependent ENTITY TYPES
Property , description of entities and entity types Attribute type ( domain)  Define all possible attribute values Attribute value , associated with individual entities A noun or an objective in requirement specifications IM-99-02 Student ID DoB  Singh 4-9-77 Entities – Attributes Entities have ‘independent’ meaning e.g. Car , Student Attributes have no independent meaning ? ID ATTRIBUTE
Uniquely identify individual instances of an entity type A key refers to  one  or a  group  of attributes as a whole A key attribute refers to a component of a composite key Definition of a key changes with Data Semantics An entity type may have few keys  Primary key – One of candidate key Secondary key – Other keys The primary key attribute (s)  underlined Choose key – will not change Choose key – Not Null Avoid INTELLIGENT KEYS KEY ATTRIBUTE
Simple attribute Can’t be broken into smaller values Contains only atomic values Composite attribute Has component attribute Single valued attribute One only per attribute Multi – Valued attribute Contains multiple values ATTRIBUTE CLASSIFICATION
Student Roll No Skill Dob F.Name M.Name L.Name Name EXAMPLE Degree
It is an association among instances of one or more entities involved. Label as Verb in requirement specifications,in present tense & descriptive Example Model associations, not actions and process  RELATIONSHIP Student Course Faculty Teach take advise
How is an entity linked to relationship ? [Participation] How many relationship instances is an entity permitted to be linked to ? [cardinality] Relationship instance is an association between entity instances, where each instance includes exactly one entity from each participating entity type JUSTIFICATION Student Advise Faculty       Akr Trupti Kris Ram Mohan Singh
E 1 E 2 R min,max min,max Participation 0 – Partial 1 - Total Cardinality 1 - - One M - - More than One O - - One Student CARDINALITY AND PARTICIPATION Advise Faculty X Z Y A B C D
Unary Relationship Binary Relationship Ternary/N-ary Relationship RELATIONSHIP DEGREES
Person Married (0,1) (0,1) Unary Relationship RELATIONSHIP DEGREE Employee Manager (0,m) (0,1)
One –to-one binary Relationship A  A  One –to-Many binary Relationship B C D X Y  Z  E1 E2 (1, 1) (0, m) BINARY RELATIONSHIP B C D X Y  Z
Many to Many binary Relationship X Y  Z  A B C D BINARY RELATIONSHIP Justification E1 E2 R1 (0, m) (1, m)
Customer SELL Salesman Car TERNARY RELATIONSHIP CAR REP (0,1) (0, m) Sell Customer (0,M)
Unary n-ary to RELATIONSHIP DEGREE
Relationship attributes Attributes describing relationship, like when ,where, what Faculty Student Advise Memo Time Date A relationship instance must include all participants Need to be careful when converted to binary relationship RELATIONSHIP ATTRIBUTES
Attributes on a relationship might suggest to convert it to entity , termed (---) as associative entity. Course EMP Completes Date m m CERT Date Number ASSOCIATIVE ENTITY
Conditions Result entity independent meaning Result entity participates in one or more other relationships Other Notations Mandatory One Mandatory Many Optional One Optional Many CONDITIONS AND NOTATIONS
BASIC E-R NOTATION
SAMPLE ER DIAGRAM
Conceptual Modeling – important skill Conceptual Schema important design document – independent of DBMS Entities , types Relationships Unary – n-ary Associations Cardinality (Connectivity) Participation (Degree) SUMMARY

Database 3 Conceptual Modeling And Er

  • 1.
    In previous sectionGeneral steps in DB development process , ISA ,EDM Database Architectures Aim Design of conceptual Data Model Objectives Understand Conceptual Data Modeling Concepts of E-R Modeling Model Example & Limitations RECAP
  • 2.
    Purpose: create detailedspecification of internal documents and tasks from the EDM Input: EDM, usage statistics, and other information gathered during the analysis Output: ER-Diagram, Data Representation, Constraints, Task Decompositions Techniques: data modeling top-down decomposition of tasks until their specification is sufficiently detailed to allow a programmer to implement them task decomposition may result in tasks replacing the original task or in subtasks controlled by the original task Tools: ER-Model APPROACH
  • 3.
    To build aWhat is 1 st Step ? What are the choices,Why ? User Requirements - User is not sure - Precise specification is difficult Communication Problems - Analyst & user communication - User not willing to take responsibility Technical - Skills of modeler - Design Methodology – Non Standard CONCEPTUAL MODEL
  • 4.
    Feasibility study RequirementAnalysis & Specifications Data Modeling Process Modeling Implementation Prototyping Testing DESIGN APPROACH
  • 5.
    DESIGN PHASES RequirementsCollection & Analysis Conceptual Design (G) Logical Design (Blue Print) Physical Design Application Design Methods Req. Collection Conceptual Model Data Base System DBMS Tools , OS Requirements Specs Conceptual Database Model Logical Models Performance Tests Final Schema Application PGMS
  • 6.
    Conceptual DesignLogical Design Physical Design Application Design Requirement Collection & Analysis C,Windows,Power Builder ORACLE Relational DBs ER & ERR Model Questionnaire & Interview DESIGN METHODS
  • 7.
    Models can beuseful when we want to examine or manage part of the real world The costs of using a model are often considerably lower than the costs of using or experimenting with the real world itself Examples: airplane simulator nuclear power plant simulator flood warning system model of US economy model of a heat reservoir map WHY TO USE MODEL
  • 8.
    A Map Isa Model of Reality MODEL OF REALITY
  • 9.
    A model isa means of communication Users of a model must have a certain amount of knowledge in common A model on emphasized selected aspects A model is described in some language A model can be erroneous A message to map makers: “Highways are not painted red, rivers don’t have county lines running down the middle, and you can’t see contour lines on a mountain” [Kent 78] MODEL TO RAISE QUESTION
  • 10.
    A process thatconstruct an abstract model which represents the entities,relationships and activities of an enterprise of real world Putting a Real World Object on to Paper Purpose of model is to sharpen the question MYCOM.COM    US $ 10 b  MCA/MMS IIPS CONCEPTUAL MODELING
  • 11.
    Why Conceptual Modeling? Obtain better understanding of business Enable the end-user communication Discover design errors at early stage Build a Solid Foundation Ensure the quality A DBMS independent DB design What to Model ? Static information Data - Entities Associations - Relationship among entities Dynamic Information Process – operations/transactions Integrity constraints – Business Rules / Regulations CONCEPTUAL MODELING
  • 12.
    Process - OrientedApproach Focus on activities, process & operations Data Flow Diagram Data – Oriented Approach Focus on data & their relationship Characteristics of Data captured Data more complex than process Rich data source is the GOAL Data is more stable than process Data Orientation - Longer life Object – Oriented Approach Combine data and process CONCEPTUAL MODELING APPROACHES
  • 13.
    Entity – relationshipmodel (ER) introduced in 1976 by Peter Chen Extended ER model (EER) expanded the original ER with new concepts ER MODELING Entity An Entity is a conceptual object Physically or conceptually exists Usually a noun in requirement specification E.g. Lecturer , Course , Movie , Sales-order Lecturer Course SSN Name Teach
  • 14.
    Collection of Entitieshave same properties An entity instance is a single occurrence of entity type Described once in metadata A noun in requirement specifications A true data entity have many instances,each with distinguishing feature A strong entity – exists independently like student , Course , Car A weak entity – existence depends upon other entity (identifying owner) Dependent ENTITY TYPES
  • 15.
    Property , descriptionof entities and entity types Attribute type ( domain) Define all possible attribute values Attribute value , associated with individual entities A noun or an objective in requirement specifications IM-99-02 Student ID DoB  Singh 4-9-77 Entities – Attributes Entities have ‘independent’ meaning e.g. Car , Student Attributes have no independent meaning ? ID ATTRIBUTE
  • 16.
    Uniquely identify individualinstances of an entity type A key refers to one or a group of attributes as a whole A key attribute refers to a component of a composite key Definition of a key changes with Data Semantics An entity type may have few keys Primary key – One of candidate key Secondary key – Other keys The primary key attribute (s) underlined Choose key – will not change Choose key – Not Null Avoid INTELLIGENT KEYS KEY ATTRIBUTE
  • 17.
    Simple attribute Can’tbe broken into smaller values Contains only atomic values Composite attribute Has component attribute Single valued attribute One only per attribute Multi – Valued attribute Contains multiple values ATTRIBUTE CLASSIFICATION
  • 18.
    Student Roll NoSkill Dob F.Name M.Name L.Name Name EXAMPLE Degree
  • 19.
    It is anassociation among instances of one or more entities involved. Label as Verb in requirement specifications,in present tense & descriptive Example Model associations, not actions and process RELATIONSHIP Student Course Faculty Teach take advise
  • 20.
    How is anentity linked to relationship ? [Participation] How many relationship instances is an entity permitted to be linked to ? [cardinality] Relationship instance is an association between entity instances, where each instance includes exactly one entity from each participating entity type JUSTIFICATION Student Advise Faculty       Akr Trupti Kris Ram Mohan Singh
  • 21.
    E 1 E2 R min,max min,max Participation 0 – Partial 1 - Total Cardinality 1 - - One M - - More than One O - - One Student CARDINALITY AND PARTICIPATION Advise Faculty X Z Y A B C D
  • 22.
    Unary Relationship BinaryRelationship Ternary/N-ary Relationship RELATIONSHIP DEGREES
  • 23.
    Person Married (0,1)(0,1) Unary Relationship RELATIONSHIP DEGREE Employee Manager (0,m) (0,1)
  • 24.
    One –to-one binaryRelationship A A One –to-Many binary Relationship B C D X Y Z E1 E2 (1, 1) (0, m) BINARY RELATIONSHIP B C D X Y Z
  • 25.
    Many to Manybinary Relationship X Y Z A B C D BINARY RELATIONSHIP Justification E1 E2 R1 (0, m) (1, m)
  • 26.
    Customer SELL SalesmanCar TERNARY RELATIONSHIP CAR REP (0,1) (0, m) Sell Customer (0,M)
  • 27.
    Unary n-ary toRELATIONSHIP DEGREE
  • 28.
    Relationship attributes Attributesdescribing relationship, like when ,where, what Faculty Student Advise Memo Time Date A relationship instance must include all participants Need to be careful when converted to binary relationship RELATIONSHIP ATTRIBUTES
  • 29.
    Attributes on arelationship might suggest to convert it to entity , termed (---) as associative entity. Course EMP Completes Date m m CERT Date Number ASSOCIATIVE ENTITY
  • 30.
    Conditions Result entityindependent meaning Result entity participates in one or more other relationships Other Notations Mandatory One Mandatory Many Optional One Optional Many CONDITIONS AND NOTATIONS
  • 31.
  • 32.
  • 33.
    Conceptual Modeling –important skill Conceptual Schema important design document – independent of DBMS Entities , types Relationships Unary – n-ary Associations Cardinality (Connectivity) Participation (Degree) SUMMARY