Database 3 Conceptual Modeling And Er

5,526
-1

Published on

Published in: Education, Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,526
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
135
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Database 3 Conceptual Modeling And Er

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

    Clipping is a handy way to collect important slides you want to go back to later.

×