1 / 25

Data Modeling : ER Model…

Data Modeling : ER Model…. Lecture 07. Summary of last lecture. ER model notation Examples Ternary relationship Weak entities Extended ER Model Process Modeling. EXTENDED E-R MODEL. extensions to capture more meaning concepts of generalization, aggregation and sub-set hierarchies added

Mia_John
Download Presentation

Data Modeling : ER Model…

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Modeling : ER Model… Lecture 07

  2. Summary of last lecture • ER model notation • Examples • Ternary relationship • Weak entities • Extended ER Model • Process Modeling

  3. EXTENDED E-R MODEL • extensions to capture more meaning • concepts of generalization, aggregation and sub-set hierarchies added • Similar to OO concepts : inheritance, composite objects

  4. Generalization • to generalize from two or more entity sets and factor out commonality • Example : given two entities Faculty and Non-faculty, we can define a ‘general’ entity called Employee • Common attributes are factored out to define ‘Employee’ entity; specific (non-common) attributes incorporated in ‘Faculty’ and ‘Non-faculty’ entities • represented by IS-A relationship

  5. Another example :

  6. Specialization • also called subset hierarchy; we created special cases for a given entity. - Teacher a specific case of Employee - Employee called superset, Teacher called subset • entity E1 is subset of E if every instance of E1 is also an instance of E; this is also IS-A relationship • E called superset and E1 as subset (or sub-class); E may have multiple and possibly over-lapping subsets • every instance in E need not be present in subsets of E

  7. Specialization….. • specialization allows classification of an entity in subsets based on some distinguishing attribute/property • we may have several specialization of same entity • the subsets may have additional attributes

  8. Inheritance • there is inheritance of attributes from superclass or superset • the subclass/subset automatically inherits attributes defined at superclass/superset level • thus, inheritance present in both Generalization and specialization • Direction important : bottom-up in generalization, top-down in Specialization • Important to distinguish the two cases

  9. Aggregation • for building complex entity from existing entities (or existing entities and relationships) • two ways of defining complex entities : • create an attribute whose value is another entity • define an entity as containing a group of related entities

  10. Examples : • Work-order object (entity) defined as consisting of entities Raw-material, Tools and Workers; • Work-order itself related with Customer entity • Aggregation notation not explicitly provided in Extended E-R model

  11. Work-order Raw Material Tools Worker Customer JobNo Quantity

  12. Summary • Data Modeling important to understand data to be handled in a given application. • We develop a conceptual Model first. • ER model uses concepts of Entity, Relationship and Attribute. • Provides Constraints: primary key, cardinality…. • Simple to use diagramming notation • User cam understand and validate our model

  13. Process Modeling

  14. Outline • Process decomposition diagrams • Data flow diagram (DFD)

  15. Process Model • A process is a business activity which when executed produces certain outputs from given inputs • The function(s) performed by a process may be complex, with multiple inputs, outputs and users • The entire application itself is a process • We use successive decomposition into sub processes to reveal greater details of the processing

  16. Function Decomposition • Decomposition splits wok of a task into subtasks; subtasks together make-up the parent task; not like ‘calling’ a module • Balanced decomposition: sub-tasks are roughly equal in complexity

  17. Function Decomposition … • Top-down decomposition gives hierarchical structure • Decompose into 2 or more; not more than 5 • A high cohesion (high independence) and minimum coupling (minimum interdependence) are fundamental criteria • Continue decomposition until elementary processes are identified

  18. Function Decomposition • Elementary process is a smallest unit of activity meaningful to end user (it sees and leaves data in consistent state) • Process decomposition diagram • A tree structure • Elementary processes are leaf nodes • Data are not shown

  19. FD Diagrams: Examples

  20. FD Diagrams: Examples

  21. Exercise: prepare FDDs for • Railway reservation system • Hospital patient management • Employee payroll

  22. Function Decomposition … • Use proper naming of processes • Business functions named as nouns (marketing, Inventory control, …) • Process name consists of an active verb and an object (accept order, calculate interest, …)

  23. Naming … • Avoid long names (sentences containing and, if, then, etc. indicate non-cohesive complex tasks) • Real world is a good reference for selecting proper names; organizational units are organized functionally and each unit has a well-defined task

More Related