Database Design – Lecture 11

Slides:



Advertisements
Similar presentations
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Advertisements

Information System Engineering
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
1 Lecture 2: Elaboration Tasks and Domain Modeling.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
Copyright W. Howden1 Lecture 2: Elaboration Tasks and Domain Modeling.
Use Case Analysis – continued
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
The chapter will address the following questions:
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
CMIS 470 Structured Systems Design
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
Last lecture. What is a Use Case Use cases are stories (scenarios) of how actors use (interact with) the system to fulfill his goal. Examples Process.
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
Introduction To System Analysis and Design
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Requirements Documentation CSCI 5801: Software Engineering.
Database Design Principles – Lecture 3
Review ♦ System sequence diagram ♦ Domain model
Systems Analysis and Design in a Changing World, 3rd Edition
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
Database Design – Lecture 3 Conceptual Database Design.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
PRJ566 System Sequence Diagrams.  A system sequence diagram …. Illustrates input and output events related to the system under discussion.  Larman,
Lecture 13-17, chitkara university.  Gives a conceptual framework of the things in the problem space  Helps you think – focus on semantics  Provides.
Chapter 9 Applying UML and Patterns -Craig Larman
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
SYS466: Analysis and Design Using OO Models Domain Class Diagram, Part 1.
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
Introduction To OOP 1.0 Fundamentals Of Java Programming Language 2.0 Exception Handling 3.0 Classes, Inheritance And Polymorphism © 2011 | PN AZRINA.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
Gerhard Dueck -- CS3013Analysis 1. Gerhard Dueck -- CS3013Analysis 2 Why analysis?  Yield a more precise specification of the requirements.  Introduce.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
DBS201: Data Modeling. Agenda Data Modeling Types of Models Entity Relationship Model.
Use Case Diagrams A Detailed Description. Use Case Diagrams Use case diagrams describe relationships between users and use cases A use case is a (usually.
© 2017 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
Elaboration popo.
Database Development Lifecycle
Chapter 9 Domain Models.
Object-Oriented Analysis and Design
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Software Design Lecture : 15.
ITEC 3220A Using and Designing Database Systems
Database Design Hacettepe University
Use Case Analysis – continued
Presentation transcript:

Database Design – Lecture 11 Introduction to Object Oriented Database Design

Lecture Objectives Why Object Oriented Approach? Objects Classes Universal Modeling Language (UML)

Why Object Oriented Approach? Advances in application development drove the object oriented approach Applications are more complex - graphical user interfaces utilizing diverse data types such as sound, video and text Applications are based on ‘object’ patterns that have been developed and tested - reusability

Why Object Oriented Approach? Object Oriented Databases differ from Relational Databases but there are similarities: Relational model emphasizes an entity and it’s attributes and keeps separate the data manipulation Object Oriented model emphasizes attributes and data process – encapsulating both into a single object

Why Object Oriented Approach? Self-contained objects can be reused and moved around with relative ease Supports direct many-to-many relationships OO databases are navigational - Access to data is through relationships stored within the data themselves (remember hierarchical and network databases?) Not well suited to ad hoc queries

Why Object Oriented Approach? Two types of OO Databases Pure object-oriented - based solely on the object-oriented data model (I.e. CA – Jasmine) Hybrid object oriented – primarily relational – stores objects in relations (this is what we will focus on)

Lecture Objectives Why Object Oriented Approach? Objects Classes Universal Modeling Language (UML)

Objects “An object is an abstract representation of some real world entity that has a unique identity, embedded properties, and the ability to interact with other objects and act upon itself” (text) It is a software construct that encapsulates state and behavior

Objects Each of these objects has a unique identity but they share common general characteristics such as name, address, date of birth

Objects Objects are described by attributes or instance variables Each attribute has a unique name, a base data type (integer, string etc) and a domain (constraint) An object’s attribute can be single-valued or multi-valued An object can reference one or more other objects

Base data type is ‘real’ with values between 0.00 and 4.00 * Represents an attribute that references one or more other objects MAJOR references another object called DEPARTMENT ADVISOR references another object called PROFESSOR COURSES_TAKEN references another object called COURSE COURSE is a collection object because Course is a list of objects

Objects Each object has a unique identifier, called an OID (Object ID) **Note: this is not a primary key OID is assigned by the system at the moment the object is created and can never be changed OID does not depend on the object’s attribute values OID is deleted when the object is deleted and can never be re-used

Objects Note: There is no PK or FK notation in object oriented data design!

Objects State A set of values that the object’s attributes have at any given time To change the objects state, you must change the values of the object’s attributes To change the value of the object’s attributes, send a message to the object The message will invoke a method

Object Methods The code that performs a specific operation on the object’s data Can change the object’s attribute values or can return the value of selected object attributes An object invokes a method by sending a message Represents the object’s behavior

Lecture Objectives Why Object Oriented Approach? Objects Classes Universal Modeling Language (UML)

Classes A collection of similar objects with shared structure (attributes) and behavior (methods) All objects in a class share the same structure and the same methods Each instance of an object is a class instance or an object instance Each instance of a CLASS is an OBJECT with a unique OID

Classes Class is similar to an Entity in a relational data model Class contains the common features for all the objects in a class, including their structure and methods Class is a template to create the object

Classes Types of classes generally used: Entity – these classes reflect real world data which relates to the business requirements Boundary – these classes handle the communication between the system surrounding and the inside of the system (usually relate to interfaces) Control – these classes coordinate the events needed to realize the behavior (I.e. they know where to find the data but not how to find it)

Classes We will focus on the Entity class

Lecture Objectives Why Object Oriented Approach? Objects Classes Universal Modeling Language (UML)

UML Universal Modeling Language A methodology to follow to model Object Oriented structures We will use Rational Rose to document our OO structures Structure of a class in UML notation: Class Name Attributes Operations (Methods)

UML How are classes identified? Classes are identified for a use case A use case represents a process with a system Use case descriptions describe what a use case does. Scenarios describe different paths through a use case

UML Sample Use Case Diagram

UML Sample Use Case Description Use Case Specification: Browse Catalog Brief Description This use case describes how a shopper can browse the catalog of items that are available to be bid on. Preconditions At the moment when the use case begins, the system is displaying the Online Auction Main Page. Basic Flow The use case begins when the shopper selects the Browse Catalog option on the Online Auction Main Page. The system retrieves the list of categories (E1) and the system displays the Category Page with a drop down list of categories and an Exit Button. If the shopper selects the Exit Button, the system performs Exit (S1). If the shopper selects an option from the drop down list, the system retrieves all the items for that category (E1) and displays an Item List Page showing a table with item names with a Display Button and an Exit Button.

UML To discover classes: Use existing models (will identify classes, attributes and methods/operations) Use a category list (will identify classes, attributes) Use noun phrases (will identify classes, attributes) Objective is to find the data that is required We will identify entities as we did for relational – through a business overview and we will document the class diagram in Rational Rose

Existing Data Models Already published and can be re-used Retrieved from: http://www.databaseanswers.org/data_models/bank_and_branches/index.htm

Conceptual Class Category Category List Focuses on a list of common categories which emphasis business information system needs Conceptual Class Category Examples Business Transactions Guidelines: These are critical. Sale, Payment Transaction Line items Guidelines: These are the line items associated with transactions. SalesLineItem Product or service related to a transaction or a transaction line item Guidelines: Transactions are for something (a product or service) Item Roles of people or organizations related to the transaction; actors in the use case Guidelines: We usually need to know about the parties involved in a transactions Cashier, Customer

Noun Filtering Done for each scenario (not for a use case description) Underline the noun phrases in the scenario Place the candidate noun phrases into a noun filter table template Filter the noun phrases through a process of elimination Draw class diagram

UML Sample Scenario with noun filtering System Actor Scenarios HD Browse Item Scenario Precondition: At the moment when the scenario begins, the system is displaying the Online Auction Main Page. Actor System Selects the Browse Catalog option on the Online Auction Main Page. Retrieves the list of categories and displays the Category Page with a drop down list of categories and an Exit Button. Selects an option from the drop down list Retrieves all the items for that category and displays an Item List Page showing a table with item names with a Display Button and an Exit Button. Selects an item and clicks the Display Button. Retrieves the product name, it’s picture and a description and displays the information on the Item Information Page with a Place Bid Button and an Exit Button. Clicks the Place Bid Button. Use case ends and starts the Place Bid use case.

UML Sample Sequence Diagram – used to discover methods

UML Sample Class Diagram methods/operations relationship Relationship name class attributes multiplicity

UML Class Syntax Name – should meaningfully reflect the responsibility of the class I.e. Customer Attributes – the set of characteristics necessary to describe the class I.e. firstName, lastName, initial, dateOfBirth Each attribute has a unique name and data type Similar to attributes in relational (columns in a table) Operations/Methods – what actions can be carried out on an instance of the class I.e. addDateOfBirth, retrieveLastName

UML Attributes Can be of a base data type or an abstract data type i.e. real, integer, string or character Subject to a predefined set of operations (i.e. integer base data type can be used for addition, subtraction, multiplication and division) Can have a domain (constraint) Abstract data type User defined Describes a set of similar objects

UML Object Oriented Data Model A conceptual model Drawn in MSVisio Identify the main entities Identify attributes (both base data type and abstract data type). If an abstract data type has attributes of its own, create a new class for that abstract data type and include the attributes in it

UML Sample class: abstract data types Base data type

Discovering Classes - Example Sun Life provides insurance plans to employees of Seneca. An employee must register for a plan. Each plan has a list of benefits associated with it (for instance, dental, orthodontic, prescriptions, glasses, long term disability etc). Employees can select which benefits they want (they don’t have to sign up for all of them). Employees can also cover their children (or dependents).

UML Sample Conceptual Class Diagram: Abstract data type Base data type

UML Sample Conceptual Class Diagram (with multiplicity):

Discovering Classes - Example Seneca College wants to create a website to allow an alumni or a company to be able to make contributions. These customers will be use an email id to track their contributions. Contributions will include customer name, address and phone number. When a contribution is made, the customer can select a specific area for their contribution amount to be directed. For instance, they may want to direct their contribution to the athletic department, student housing or to a specific academic department such as Computer Studies. Customers need to specify whether they want a tax receipt or not and they can either be invoiced for their contribution or they can pay for it by credit card.

UML Sample Conceptual Class Diagram: Abstract data types – refer to another class

OO Database Design vs Relational Database Design Model Phase OO Model Content Relational Model Conceptual Model Object Oriented Data Model (OODM) – MSVisio Major classes; some attributes defined; shows all relationships (including M:N) Entity Relationship Diagram (ERD) – MSVisio Major entities; some attributes defined; shows all relationships (may show M:N) Logical Model Class Diagram – Rational Rose Classes; attributes; relationships (can still have M:N) Entities; attributes; PKs, FKs, relationships (no M:N) Physical Model Relational Schema – MSAccess Tables; attributes, PKs, FKs, all attributes atomic, no MVD