Slide 14UML Class DiagramIKI20700 - BASIS DATASEMESTER GENAP 2015/2016
Referenceo Elmasri & Navathe, Fundamental of Database Systems, 6th edition, 2004, Chapter 7o Connoly & Begg, Database Systems, 4th, Chapter 11o Introduction to Databases: UML Data Modeling, Stanford Coursera, 2011. BASIS DATA SEMESTER GENAP 2014/2015
Data Modelingo Data modeling ◦ How to represent data in our application?Higher-level DB design Entity-Relationship Model UML Data ModelTranslatorRelational DBMSBASIS DATA SEMESTER GENAP 2014/2015
Unified Modeling Language (UML)o UML is an standard object oriented modeling language, developed by Grady Booch, Jim Rumbaugh, and Ivar Jacobson arround 1990s.o In 1997, UML version 1 is proposed to Object Management Group (OMG)o UML has many diagrams, one can be used in data modeling is UML class diagram BASIS DATA SEMESTER GENAP 2014/2015
UML Class Diagram Data Modeling1. Classes2. Associations3. Associations Classes4. Subclasses5. Composition & Aggregation BASIS DATA SEMESTER GENAP 2014/2015
UML Data Modeling: Classeso Name, attributes, and methods ◦ Data modeling: drop methods Student CollegeSID CnameSname StateGPA <methods> <methods> BASIS DATA SEMESTER GENAP 2014/2015
UML Data Modeling: Associationso Relationship between objects of two classes Student Applied CollegeSID CnameSname StateGPA <methods> <methods> BASIS DATA SEMESTER GENAP 2014/2015
Multiplicity of Associationso Relationships between objects of two classes ◦ Each object in class c1 related with minimum m and maximum n object in class c2C1 C2 0..n m..n Am..* : m to infinitiy0..n : zero to n0..* / * : zero to infinity (infinite) BASIS DATA SEMESTER GENAP 2014/2015
Multiplicity of Associationso A student can register to minimum 1 and maximum 5 universities. A university can have maksimum 20.000 students.o Minimum object in C1 and C2?C1 C2 2..4 8..10 ABASIS DATA SEMESTER GENAP 2014/2015
Types of Relationshipo One-to-oneo Many-to-oneo Many-to-manyo Complete BASIS DATA SEMESTER GENAP 2014/2015
UML Data Modeling: AssociationClasseso Relationships between objects of two classes, with attributes on relationshipsStudent College Applied AppInfo Date DecisionNotes: only capture at most one relationship between twoobjects across two different relations BASIS DATA SEMESTER GENAP 2014/2015
Eliminating Association Classeso Unnecessary if 0..1 or 1..1 multiplicity C1 1..1 C2 AC A1 A2 BASIS DATA SEMESTER GENAP 2014/2015
Self-Associationso Associations between a class and itselfEmployee supervisee 1..n supervise 0..1 supervisorBASIS DATA SEMESTER GENAP 2014/2015
UML Data Modeling: Subclasses Student SID PK Sname GPA Foreign_Student DomesticStudentCountry StateBASIS DATA SEMESTER GENAP 2014/2015
UML Data Modeling:Composition & Aggregationo Objects of one class belong to objects of another class CompositionCollege 1..1 1..* Department 0..1 ApartmentAggregation 1..*BASIS DATA SEMESTER GENAP 2014/2015
ER diagram using UML Notationo In some ways, UML class diagram can be considered as an alternative notation to ER diagrams. BASIS DATA SEMESTER GENAP 2014/2015
EER diagram using UML Notation BASIS DATA SEMESTER GENAP 2014/2015
BASIS DATA SEMESTER GENAP 2014/2015 18
BASIS DATA SEMESTER GENAP 2014/2015 19
Search
Read the Text Version
- 1 - 19
Pages: