1 Object Diagrams Customer firstName: String Lastname: String id: int getAddress(): Address :Customer johnSmith :Customer JohnSmith :Customer firstName:

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
Class Scope class Student { private: string id; string firstName, lastName; float gpa; public: void Read() { cin >> id >> firstName >> lastName >> gpa;
1. Write an Excel text function in cell Company Data!A4, which may be copied down, to string together the first and last name with only the first letter.
Student Data Score First Name Last Name ID GPA DOB Phone... How to store student data in our programs? 1.
String in C++. String Series of characters enclosed in double quotes.“Philadelphia University” String can be array of characters ends with null character.
Assignment Design Methodology A structured approach that uses procedures, techniques, tools, and documentation aids to support and facilitate the.
Greg Riccardi Florida State University. Using SQL to Manipulate Database Content and Structure How to create queries in SQL –Simple select statements.
Tutorial 6: normalize the following relation to 1NF, 2NF, and 3NF TransIDRentDateCustomerIDLastNamePhoneAddressVideoIDCopy#TitleRent 14/18/043Washington
--The Entity Relationship Model(3)--1 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  Uses Crows.
SQL SQL (Structured Query Language) is used to define, query, and modify relational databases Every relational database system understands SQL SQL is standard:
Copyright © 2003 Addison-Wesley Defining Relational Databases What is an Access database? How do you create an Access database? How do you create and modify.
Aalborg Media Lab 27-Jun-15 Workshop / Exercises Lecture 9 Summary, Exercises.
UML UML Language? –Provides the semantics and syntax (notation) for each model element e.g., class, interface, association, attributes, etc. etc.
1Exercises Each customer can buy multiple insurance products. –The properties of each insurance product: Product ID, product name, insurer’s name, deductible,
MySql In Action Step by step method to create your own database.
Introduction to UML Lian Yu Department of Computer Science and Engineering Arizona State University Tempe, AZ
Object Oriented Design and UML
Object-Based Databases Jose Reyes Jose. Overview Object-relational data model extends the relational data model by providing a richer type system including.
University of Manitoba Asper School of Business 3500 DBMS Bob Travica
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Your name here. Improving Schemas and Normalization What are redundancies and anomalies? What are functional dependencies and how are they related to.
1 Object Oriented Design and UML Class Relationships –Dependency –Aggregation –Inheritance Reading for this Lecture: L&L 6.4 – 6.5.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
© Pearson Education Limited, Chapter 9 Logical database design – Step 1 Transparencies.
4/24/ :58 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
1. 3 x = x 3 2. K + 0 = K (3 + r) = (12 + 3) + r 4. 7 (3 + n) = n Name the Property Commutative of Multiplication Identity of Addition.
Design Patterns Introduction to Design Patterns Eriq Muhammad Adams J. Mail : | Blog :
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
By: Richard Fleischman & Sharon Young Advanced Data Models.
Copyright © 2003 Addison-Wesley Sree Nilakanta. Copyright © 2003 Addison-Wesley Developing Relational Models What is the relational model and what is.
 An entity-relationship diagram (ERD) is a specialized graphic that illustrates the interrelationships between entities in a database.
1 Chapter 5 - Object-Oriented Programming 1 What is inheritance? Object-oriented systems allow classes to be defined in terms of other classes. Classes.
1 COP 4710 Databases Fall, 2000 Today’s Topic Chapter 7: SQL David A. Gaitros October 9th, 2000 Department of Computer Science.
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 7: SQL, the Structured Query Language Instructor’s name and.
public class UsLocationRecord { public int Id { get; set; } public string ZipCode { get; set; } public string City { get; set; } public string.
Double click here to add event title Double click here to add event date Double click here to add event time Double click here to add event location.
Prepare an ERD for the following scenario Renting a movie at Blockbuster: Each movie is described by an ID, name, genre (horror, comedy, drama, romantic,
A: A: double “4” A: “34” 4.
1. Write an Excel text function in cell Company Data!A4, which may be copied down, to string together the first and last name with only the first letter.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Builder Pattern. What’s Builder: TO find a solution to the telescoping constructor Problem: Too many parameters Solution: To get an abstract object, a.
Chapter 2: Entity-Relationship Model. 3.2 Chapter 2: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
public class UsLocationRecord { public int Id { get; set; } public string ZipCode { get; set; } public string City { get; set; } public string State.
Hibernates - Many to One Association. May 12, 2011 What is Association? Association is the relation between two objects. One class holds a reference of.
25/2/16. Software Design (UML) ClassName attributes operations A class is a description of a set of objects that share the same attributes, Operations.
Mortgage Security Valuations Pre-Sale/Pre-Purchase Valuations Rental Determination/Rental Reviews Strata Building.
© 2004 Pearson Addison-Wesley. All rights reserved November 2, 2007 Class Relationships ComS 207: Programming I (in Java) Iowa State University, FALL 2007.
Data Base Design Steps 1.Define Entity Classes (Relations/Tables) and Keys. 2.Define Relationships between Entity Classes. Normalization Steps Eliminate.
Entity Relationship Model
COP5725 Database Management ER DIAGRAM AND RELATIONAL DATA MODEL
CS 3630 Database Design and Implementation
Presentation Title Your company information.
Presentation Title Your company information.
Production Company Name
Hire identical iPad Rentals for your next Event in Dubai
Object Oriented Programming
Review Operation Bingo
Quiz 1 1. Given two sets S = {3, 5, 7} and T = {2, 4, 6}. List all elements of the following set: {(s, t) | (s, t)  S  T and s + t = 9} Result (3, 6)
Domain Classes Chapter 9.
Context Level DFD Video Purchase System Video Information Management
ER Diagram Master How to use this template
1.6 – Variables on Both Sides
Projecting output in MySql
Chapter 7: Entity-Relationship Model
Day 2 - Basic Database Backbone
Title Firstname Lastname 1, Firstname Lastname 2 and Firstname Lastname 3 1 Affiliations. Dummy text, dummy text, dummy text 2 Affiliations. Dummy text,
Presentation transcript:

1 Object Diagrams Customer firstName: String Lastname: String id: int getAddress(): Address :Customer johnSmith :Customer JohnSmith :Customer firstName: String Lastname: String id: int getAddress(): Address Address Street: String city: String state: String zipCode: int getCity(): String Class diagram Object diagram :Address homeAddr : Address Street: String city: String state: String zipCode: int getCity(): String

2 Customer firstName: String Lastname: String id: int getAddress(): Address Address Street: String city: String state: String zipCode: int getCity(): String 1 - homeAddr Class diagram Object diagram johnSmith :Customer homeAddr : Address

3 Customer firstName: String Lastname: String id: int getAddress(): Address [1..2] Address Street: String city: String state: String zipCode: int getCity(): String addresses Class diagram Object diagram johnSmith :Customer homeAddr : Address officeAddr : Address

4 What can be classes? Traditionally… –Nouns in a specification Each class’s instances/objects should have its own identity, behavior and state. Physical/logical objects Identifier for each physical/logical object People, organizations Person’s and organization’s roles Places and locations Transactions made among classes Events

5 Video rental –Each customer can rent up to 10 video tapes. –Each video tape has its own ID.

6 Video rental –Each customer can rent up to 10 video tapes. –Each video tape has its own ID. Customer tapesRented: VideoTape[0..10] VideoTape - id: int - title: String - rented: boolean isRented(): boolean rent(): void

7 Customer tapesRented: VideoTape[0..10] VideoTape - id: int - title: String - rented: boolean isRented(): boolean rent(): void Object diagram a :Customer : VideoTape 00 :id “Spiderman” :title true : rented 10 :id “Spiderman2” :title true : rented Class diagram b :Customer : VideoTape 01 :id “Spiderman” :title true : rented

8 What if… –you need to maintain individual video’s properties? Rental cost, # of rentals, production company, distribution company, distribution year, director’s name, rating (R-rated, PG13, etc.), etc.

9 Customer tapesRented: VideoTape[0..10] VideoTape - id: int - title: String - rented: boolean - rentalCost: double - directorName:String - numRental: int isRented(): boolean rent(): void a :Customer : VideoTape 00 :id “Spiderman” :title true : rented 1.00: rentalCost “…” : directorName 1: numRental b :Customer : VideoTape 01 :id “Spiderman” :title true : rented 1.00: rentalCost “…” : directorName 10: numRental Object diagram Class diagram

10 How can we remove the redundancy?

11 How can we remove the redundancy? Separate the properties of individual video tapes and video titles.

12 Customer VideoTape - tapeId: int - rented: boolean - numRental: int isRented(): boolean rent(): void 0..*1 Title - id: int - title: String - rentalCost: double - directorName:String … a :Customer : VideoTape 00 :id true : rented 1: numRental b :Customer : VideoTape 01 :id true : rented 10: numRental Object diagram Class diagram : Title 001 :id “Spiderman” :title 1.00: rentalCost “…” : directorName