EER vs UML Terminology EER Diagram Entity Type
- Slides: 26
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute Domain Composite Attribute ~ [Derived Attribute] Relationship Type Relationship Instance Cardinality & Participation UML • • • UML Class Diagram Class Object Attribute Domain Structured Domain Operation Association Link Multiplicities 1
EER Example E# N Is In 1 D# Department DNAME Employee N NAME FNAME Assigned To M Project LNAME %TIME UML P# PNAME 2
Diagrams EER vs. UML Class E# Employee NAME FNAME Structured Domain E# NAME: Name. Dom FNAME LNAME Attributes Methods … LNAME Entity Type vs. Class Attribute Composite Attribute vs. Structured Domain UML 3
Department EER vs. UML Complete Diagram D# DNAME … 1. . 1 Min participation (0 or some int n: n>0) D# E# N Employee Department 1 Is In Employee NAME DNAME Max Cardinality N P# Assigned To LNAME %TIME PNAME UML E# NAME: Name. Dom FNAME LNAME … 0. . * M Project FNAME 0. . * Assigned. To %TIME Project P# PNAME … 4
EER Derived Attributes - Include in Department the average salary of the employees in the department. Employee Member Of Salary Class Method Department Avg. Sal Department D# DNAME Avg. Sal UML 5
EER Multi-valued Attributes Student Major EER Multi-valued as Entity Major Student N Has Major 3 Major_Program UML Student … … UML 0. . * Major_Program 0. . 3 Major … 6
Weak Entities EER Weak Entity Employee Name 1 Dependent Name SSN Employee SSN Name … Dependent Name UML Dependents Of N UML Qualified Association Dependent … … 7
Aggregations Location Department Project Name 0. . * No … UML No No No Name 1. . 1 Location Name 1. . * 0. . * Department Name No … … 8
Example: University Database Emp. ID SSN Salary d disjoint o overlap superclass Employee partial subclass U Degree Program o U Name Grad Student U Person total U • Superclasses & Subclasses • Generalization & Specialization • Inheritance Superclass instance must always exist. d U Student Major Dept Undergrad Student Class UML 9
UML Superclass/Subclass Inheritance Employee Emp. ID Salary … Person SSN Name … UML Student Major. Dept … EER UML disjoint d overlapping o Grad. Student Degree. Program … Undergrad. Student Class … 10
Object-Oriented Approach Motivation • Object-Oriented Databases (OODB) – Add persistence to object-oriented programming languages UML • Object Relational Databases (ORDBMS) – Add user-defined methods to relational databases – Allow grouping of relations into more complex “objects” 11
Relational is Good For • Fixed format data • Transaction processing: simple short transactions • Concurrency control • Recovery from crashes • Query processing and Query optimization – relational algebra and mathematical logic operations. UML 12
Problems • The relational model has no notion of a single object. • Context with the real world e. g. , spatial context. • Aggregation functions may be desired • The notion of re-use cannot be exploited • There may also be versions or variant configurations UML i. e variations of the same design. 13
Problems With the Relational Model - 1 • Nonhomogeneous collection of design objects. • Data Types: images, matrices, vectors; variable length. • Temporal and/or spatial data. • Many data types; few instances of each type. UML 14
Problems With the Relational Model - 2 • Schemas evolve during design. • Long running transactions: "checkout a design". • Versions; design log. UML 15
Problems With the Relational Model - 3 • Functions needed: – Making a design permanent, – Releasing design to production, – Archiving design, – etc. • Library of design objects: – minimize redundancy. UML 16
Object-Oriented Concepts - 1 • Complex Objects: – sets, – bags, – lists, – arrays, – tuples. UML 17
Object-Oriented Concepts - 2 • Object Identity: identify by object id (oid) rather than by an attribute value, never changes. • Encapsulation: Operations and Data available to user. • Implementation hidden. No other operations available. UML 18
Object-Oriented Concepts - 3 • Types and/or Classes: – Type: • Interface and Implementation. • Types declared, checked at compile-time – Class: • Instances created at run-time UML 19
Object-Oriented Concepts - 4 • Class or Type Hierarchies: – Inheritance: both data and function example: student: undergraduate, graduate • Overriding, overloading, and late binding: – Polymorphism UML 20
Object-Oriented Concepts - 5 • Computational Completeness: • Extensibility: – Means to define new types. – User types not distinguished from system types. • Persistence: – Not present in OO programming languages. – Should be implicit not explicit. UML 21
Object-Oriented Concepts - 6 • Secondary Storage Management: • Concurrency: • Recovery: • Ad Hoc Query Facility: UML 22
Review: Object • State (value) • Behavior (operations) – Signature or interface: operation name and arguments – Method or body: implementation • Identified by unique Object Identifier (OID) UML 23
Class • Group of similar objects • Class hierarchies – Inheritance • Persistence must be specified explicitly – Via entry point – Via reachability UML 24
Type Hierarchies and Inheritance (EER – superclass/subclass relationship) PERSON: Name, Address, Birthdate, Age, SSN EMPLOYEE: subtype-of PERSON: Salary, Hire. Date, Seniority STUDENT: subtype-of PERSON: Major, GPA EMPLOYEE: Name, Address, Birthdate, Age, SSN, Salary, Hire. Date, Seniority STUDENT: Name, Address, Birthdate, Age, SSN, Major, GPA UML 25
Object Data Management Group (ODMG) • • Object Model Object Definition Language (ODL) Object Query Language (OQL) Bindings to object-oriented programming languages – C++, Java, Smalltalk UML 26
- Simbol lrs
- Simbol weak entity
- Public interest entity
- Public interest entity
- Uml 2
- Eer
- Maksud dari shared-subclass pada model erd adalah
- Enhanced erd
- Contoh diagram eer
- Eer diagram
- Eer diagram
- Uml data types
- Contoh er diagram
- Tujuan erd
- Student course entity relationship diagram
- Elements of entity relationship diagram
- Simbol entity relationship diagram
- Fully attributed erd
- Chen erd
- Definisi erd
- Airbnb entity relationship diagram
- Airbnb erd
- Airbnb er diagram
- Pengertian entity relationship diagram
- What is multivalued attribute in er diagram
- Airbnb erd
- Erd supertype subtype