1 Unified Modeling Language Classes Associations Aggregations.

Slides:



Advertisements
Similar presentations
Relational Database Design Via ER Modelling
Advertisements

ER Modeling Case Studies
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Chapter 4 Notes. Entity-Relationship Model E/R Diagrams Weak Entity Sets Converting E/R Diagrams to Relations.
1 Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – EER Model –21th June.
1 Relational Model and Translating ER into Relational.
Winter 2002Arthur Keller – CS 18015–1 Schedule Today: Feb. 28 (TH) u Datalog and SQL Recursion, ODL. u Read Sections , Project Part 6.
Winter 2002Arthur Keller – CS 18012–1 Schedule Today: Feb. 19 (T) u Object-Relational Systems. u Read Sections 4.5, Assignment 5 due. Feb. 21.
Fall 2001Arthur Keller – CS 18015–1 Schedule Nov. 15 (TH) Object Queries (OQL). u Read Sections 9.1. Project Part 6 due on Sunday night. Nov. 20 (T) More.
Winter 2002Arthur Keller – CS 1808–1 Schedule Today: Jan. 29 (T) u Modifications, Schemas, Views. u Read Sections Assignment 3 due. Jan. 31 (TH)
Winter 2002Arthur Keller – CS 18016–1 Schedule Today: Mar. 5 (T) u More ODL, OQL. u Read Sections 9.1. Assignment 7 due. Mar. 7 (TH) u More OQL. u Read.
Winter 2002Judy Cushing12–1 Schedule Today (week 8): u Object-Relational Systems. Sections 4.5, u Assignment 5 debriefed. u Transactions, Authorization.
1 The Relational Data Model Tables Schemas Conversion from E/R to Relations.
1 Other High-Level Design Languages Unified Modeling Language Object Description Language.
Other Data Models. Text New edition (DBS the complete book): Chapter 4 Old edition (First course in DBS): –Section 2.1 –Section –Section 2.4.1,
1 XML Semistructured Data Extensible Markup Language Document Type Definitions.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to- Relational Mapping.
1 Announcements Research Paper due Monday November 22.
Databases Illuminated Chapter 7 The Object-Oriented Model.
1 XML Semistructured Data Extensible Markup Language Document Type Definitions.
1 Relational Data Model CS 157B Nidhi Patel. 2 What is a Data Model? A notation for describing data or information A notation for describing data or information.
Jennifer Widom UML UML Data Modeling. Jennifer Widom UML Modeling Data Modeling How to represent data for application  Relational model  with design.
Ch 6: ER to Relational Mapping
Chapter 91 ER & EER to Relational Mapping. Chapter 92 ER to Relational Mapping Step 1: For each regular entity type E in the ER schema, create a relation.
ER- and EER-to-Relational Mapping
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
Relational Model 2015, Fall Pusan National University Ki-Joune Li.
1 Announcements Research Paper due Friday November 19 For Wednesday read
CSCE 520- Relational Data Model Lecture 2. Relational Data Model The following slides are reused by the permission of the author, J. Ullman, from the.
Conceptual Data Modeling. What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data A detailed model.
Database Management COP4540, SCS, FIU Relational Model Chapter 7.
1 CE223 Database Systems Introduction DBMS Overview, Relational Model, Schemas, SQL Semistructured Model, XML.
Constraints on Relations Foreign Keys Local and Global Constraints Triggers Following lecture slides are modified from Jeff Ullman’s slides
Databases : Entity-Relationship Model 2007, Fall Pusan National University Ki-Joune Li These slides are made from the materials that Prof. Jeffrey D. Ullman.
1 CS1368 Introduction* Relational Model, Schemas, SQL Semistructured Model, XML * The slides in this lecture are adapted from slides used in Standford's.
Object Definition Language
1 Introduction Relational Model, Schemas, SQL Semistructured Model, XML The slides were made by Jeffrey D. Ullman for the Introduction to Databases course.
SE305 Database System Technology 23/10/2014 Quiz-2.
Entity-Relationship Model
DatabaseIM ISU1 Chapter 7 ER- and EER-to-Relational Mapping Fundamentals of Database Systems.
ER/EER to Relational Mapping Chapter 9. STEP 1 ENTITY TYPE E (non weak) -> NEW RELATION T RELATION T: – includes all simple attributes (non composite,
CSCE 520- Relational Data Model Lecture 2. Oracle login Login from the linux lab or ssh to one of the linux servers using your cse username and password.
CS 157B Database Systems Dr. T Y Lin. Updates 1.Red color denotes updated data (ppt) 2.Class participation will be part of “extra” credits to to “quiz.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
© D. Wong Security and User Authorization in SQL 8.7 pp. 410  Authorization ID = user name  Special authorization ID: PUBLIC  Privileges for:
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
Relational Database Design by ER- and EER-to-Relational Mapping
1 Unified Modeling Language. 2 UML  UML is designed to model software, but has been adapted as a database modeling language. – No multiway relationships.
High-level Database Models Prof. Yin-Fu Huang CSIE, NYUST Chapter 4.
1 Database Design: DBS CB, 2 nd Edition Logical Database Model: Entity Relationship Model & Object Description Language & Unified Modeling Language Ch.
1 The Relational Data Model Tables Schemas Conversion from E/R to Relations.
1. 2 Standards group: ODMG = Object Data Management Group. ODL = Object Description Language, like CREATE TABLE part of SQL. OQL = Object Query Language,
CPSC-310 Database Systems
Relational Database Design by ER- and EER-to- Relational Mapping
EER Model – Chapter
ER- and EER-to-Relational
CPSC-310 Database Systems
CS 440 Database Management Systems
UML UML Data Modeling.
CPSC-310 Database Systems
UML UML to Relations.
CPSC-310 Database Systems
Lec 3: Object-Oriented Data Modeling
2018, Fall Pusan National University Ki-Joune Li
UML UML to Relations.
Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the.
CSC Database Management Systems
CMSC-461 Database Management Systems
CE223 Database Systems Introduction
2019, Fall Pusan National University Ki-Joune Li
Presentation transcript:

1 Unified Modeling Language Classes Associations Aggregations

2 A Bit of Roadmap uWe started with modeling: E/R and relational. uWe then spent 5 weeks talking about various aspects of database programming: SQL, JDBC, relational algebra, etc., etc. uNow it is back to modeling.

3 Roadmap --- (2) uUML (Unified Modeling Language) --- a more “object-oriented” version of E/R. uODL (Object-Description Langauge) --- a completely object-oriented view of the world. uXML (Extensible Markup Language) --- models data as trees or graphs.

4 Roadmap --- (3) uIn the middle, we’ll talk about: wOQL (Object-Query Language) --- the query language built on ODL. wXQuery --- the query language for XML data. Special feature: the XQuery lectures will be given by Don Chamberlin, the inventor of both SQL and XQuery.

5 UML uUML is designed to model software, but has been adapted as a database modeling language. uMidway between E/R and ODL. wNo multiway relationships as in E/R. wBut allows attributes on binary relationships, which ODL doesn’t. wHas a graphical notation, unlike ODL.

6 Classes uSets of objects, with attributes (state ) and methods (behavior ). uAttributes have types. uPK indicates an attribute in the primary key (optional) of the object. uMethods have declarations = arguments (if any) and return type.

7 Example: Bar Class Bar PK Name: string Addr: string setName(n) setAddr(a) getName() : string getAddr() : string sellsBud() : boolean

8 Associations uBinary relationships between classes. uRepresented by named lines (no diamonds as in E/R). uMultiplicity at each end. wm..n means between m and n of these associate with one on the other end. w* = “infinity”; e.g. 1..* means “at least one.”

9 Example: Association BarBeer Sells 0..*

10 Comparison With E/R Multiplicities E/R UML 0..* 0..* * 1..1

11 Association Classes uAttributes on associations are permitted. wCalled an association class. wAnalogous to attributes on relationships in E/R.

12 Example: Association Class BarBeer * Sells price: float

13 Subclasses uLike E/R, but subclass points to superclass with a line ending in a triangle. uThe subclasses of a class can be: wComplete (every object is in at least one subclass) or partial. wDisjoint (object in at most one subclass) or overlapping.

14 Example: Subclasses Beer name: string manf: string Ale color: string

15 Conversion to Relations uWe can use any of the three strategies outlined for E/R to convert a class and its subclasses to relations. 1.E/R-style: each subclass’ relation stores only its own attributes, plus key. 2.OO-style: relations store attributes of subclass and all superclasses. 3.Nulls: One relation, with NULL’s as needed.

16 Aggregations uRelationships with implication that the objects on one side are “owned by” or are part of objects on the other side. uRepresented by a diamond at the end of the connecting line, at the “owner” side. uImplication that in a relational schema, owned objects are part of owner tuples.

17 Example: Aggregation Beer name: string manf: string Award title: string year: int 0..1 Won 0..*

18 Compositions uLike aggregations, but with the implication that every object is definitely owned by one object on the other side. uRepresented by solid diamond at owner. uOften used for subobjects or structured attributes.

19 Example: Composition Beer name: string manf: string Award title: string year: int 1..1 Won 0..*

20 Conversion to Relations uWe could store the awards of a beer with the beer tuple. uRequires an object-relational or nested- relation model for tables, since there is no limit to the number of awards a beer can win.

21 Example: Composition Bar name: string phone: int Addr street:string city: string zip: int 1..1 Won 0..1

22 Conversion to Relations uSince a bar has at most one address, it is quite feasible to add the street, city, and zip attributes of Addr to the Bars relation. uIn object-relational databases, Addr can be one attribute of Bars, with structure.