A Rational Software Whitepaper



Similar documents
Rose Data Modeler (logical)

Rational Software White Paper

Chapter 7 Database Design Models the UML Profile for Database Design

Fundamentals of Database Design

Using UML to Model Relational Database Operations

Umbrello UML Modeller Handbook

Chapter 10 Practical Database Design Methodology and Use of UML Diagrams

Data Modeling Basics

SQL Server An Overview

Using SQL Server Management Studio

Database Modelling in UML

Introduction This document s purpose is to define Microsoft SQL server database design standards.

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

SQL NULL s, Constraints, Triggers

An Oracle White Paper June Migrating Applications and Databases with Oracle Database 12c

Using Temporary Tables to Improve Performance for SQL Data Services

Using UML Part One Structural Modeling Diagrams

CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design

White Paper What Solutions Architects Should Know About The TOGAF ADM

Rational Unified Process for Systems Engineering RUP SE1.1. A Rational Software White Paper TP 165A, 5/02

Lecture 12: Entity Relationship Modelling

Oracle Database 10g Express

LAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development

DbSchema Tutorial with Introduction in SQL Databases

DATABASE MANAGEMENT SYSTEMS. Question Bank:

3.GETTING STARTED WITH ORACLE8i

Toad Data Modeler - Features Matrix

SYSML PLUGIN. version user guide

How to make a good Software Requirement Specification(SRS)

In this Lecture you will Learn: Systems Development Methodologies. Why Methodology? Why Methodology?

CSC 443 Data Base Management Systems. Basic SQL

Databases What the Specification Says

Oracle FLEXCUBE Universal Banking 12.0

Database Design Methodology

ClearCase VOB Database Troubleshooting Carem Bennett, CCNA, MCSE, NT-CIP

Chapter 10 Practical Database Design Methodology and Use of UML Diagrams

IT2305 Database Systems I (Compulsory)

Foglight. Dashboard Support Guide

Data Modeling. Database Systems: The Complete Book Ch ,

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

Database Query 1: SQL Basics

CA ERwin Data Modeler. Implementation Guide

ETL Process in Data Warehouse. G.Lakshmi Priya & Razia Sultana.A Assistant Professor/IT

Database Migration : An In Depth look!!

A Tool for Generating Relational Database Schema from EER Diagram

CDC UNIFIED PROCESS PRACTICES GUIDE

Configuring Data Masking

Once the schema has been designed, it can be implemented in the RDBMS.

Working with the Geodatabase Using SQL

Customer Bank Account Management System Technical Specification Document

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

TrendWorX32 SQL Query Engine V9.2 Beta III

Section of DBMS Selection & Evaluation Questionnaire

Guide to Upsizing from Access to SQL Server

5. CHANGING STRUCTURE AND DATA

The Entity-Relationship Model

Introduction to System Architect Student Edition (A Product of Popkin Software)

WebSphere Business Monitor


Information Server Documentation SIMATIC. Information Server V8.0 Update 1 Information Server Documentation. Introduction 1. Web application basics 2

Software Requirements Specification for DLS SYSTEM

Relational Database Basics Review

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Databases and DBMS. What is a Database?

CASE TOOLS. Contents

Metadata Application Understanding Software Migration

CA ERwin Data Modeler ODBC Reporting Guide

Creating Database Tables in Microsoft SQL Server

Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches

IBM Unica emessage Version 8 Release 6 February 13, User's Guide

How To Create A Table In Sql (Ahem)

Robert Takoushian, CVS/Caremark. Data Architect Session Code DM04

The Relational Data Model and Relational Database Constraints

Answers included WORKSHEET: INTEGRITY CONTROL IN RELATIONAL DATABASES

Unifying the Global Data Space using DDS and SQL

Information Management Metamodel

ReqXChanger Closing the Gap between Requirements and Modelling

The process of database development. Logical model: relational DBMS. Relation

A Rational Software & Context Integration white paper

A Short Tutorial on Using Visio 2010 for Entity-Relationship Diagrams

Planning a Project with the Rational Unified Process Author: David West

Select the Crow s Foot entity relationship diagram (ERD) option. Create the entities and define their components.

IT2304: Database Systems 1 (DBS 1)

Integrating CaliberRM with Software Configuration Management Tools

CA ERwin Data Modeler. ODBC Reporting Guide

Information Technology NVEQ Level 2 Class X IT207-NQ2012-Database Development (Basic) Student s Handbook

Reaching CMM Levels 2 and 3 with the Rational Unified Process

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

EXCEL IMPORT user guide

Introduction to Triggers using SQL

ASCII Interface Version NT1316-ORACLE FCUBSV.UM [January] [2010] Oracle Part Number E

A McKnight Associates, Inc. White Paper: Effective Data Warehouse Organizational Roles and Responsibilities

Transcription:

The UML and Data Modeling A Rational Software Whitepaper

Table of Contents Introduction...1 The UML Data Modeling Profile...1 Database...1 Schema...2 Table...2 Key...3 Index...4 Relationship...5 Column...6 Datatype...6 Constraint...6 Summary...8

Introduction The power of the Unified Modeling Language is not limited to object oriented software development. More and more, the UML is being applied to other areas of software development, such as data modeling, enhancing practitioners ability to communicate their needs and assessments to the rest of the team. Data analysts primarily gather data out of documented business requirements. The database itself traditionally has been described by notations called entity relationship diagrams, using graphic representation that is similar but not identical to that of the UML. The UML can be used to describe the complete development of relational and object relational databases 1 from business requirements through the physical data model. However, modeling of the physical data model must express a detailed description of the database. This is done using Rational s Data Modeling Profile for the UML 2. The UML Data Modeling Profile This white paper describes in detail the Data Modeling profile for the UML as implemented by Rational Rose Data Modeler, including descriptions and examples for each concept including database, schema, table, key, index, relationship, column, constraint and trigger. It is written for those who have experience in traditional data modeling as well as some familiarity with the UML. Database The Database is the system for data storage and controlled access to stored data. It is the biggest element a data model supports. The relational database is the standard database supported by the Data Modeling UML profile. An object relational database, an extension of the relational database, is also supported by the UML profile. The stereotype <<Database>>, when used as a UML component, defines a database. As a component the database must have a name. In the component view, a database is a target dependent element, since it references a database type. A corresponding icon can represent the stereotype as shown in Figure 1. Figure 1 1 Object oriented databases are supported by UML through modeling of persistent classes. 2 Data Modeling Profile for UML is not yet approved by OMG. 1

The 3 possible representations of a Database component are shown in Figure 2. Schema Figure 2 The full description of the data model to be used for retrieval and storage of data is stored in a schema inside of a database. The schema is the biggest unit that can be worked with at any given time. A package using the <<Schema>> stereotype in a UML model represents a database schema. In a browser, a schema is shown as a package. (Figure 3) Figure 3. In a diagram, the representation is a package with the Schema stereotype. (Figure 4) Figure 4. Note that there can be more than one schema associated to a database. Table A table is the basic modeling structure of a relational database. It represents a set of records of the same structure, also called rows. Each of these records contains data. The information about the structure of a table is stored in the database itself. A class with the <<Table>> stereotype represents a relational table in a schema of a database. 2

In the browser a table is represented by a table symbol. (Figure 5) Figure 5 The representation in a diagram uses the Table stereotype and stereotype icon. (Figure 6) Figure 6 Hosting the table in the schema package creates the association of a table to a schema. Key Keys are used to access the table. Primary keys uniquely identify a row in a table, while foreign keys access data in other related tables. The key is represented as a key constraint and as a tagged value on the column. A primary key uses a PK tag in front of the column as shown. (Figure 7) Figure 7 3

In a diagram, the PK tag represents the primary key, and the PK stereotyped operation is the primary key constraint. (Figure 8) Figure 8 A foreign key represents a column, which is a part of a relationship to another table. An FK tag represents the foreign key. It generates the foreign key constraint, which is represented by a stereotype FK on an operation. Read about relationships for more on foreign keys. Index An Index is a physical data structure that speeds up data access. It does not change the quality or the quantity of data retrieved. An index can include multiple columns or just a single column. The Index does not exist in the logical view. The Index stereotype on an operation represents a key constraint for an index. (Figure 9) Figure 9 4

The diagram representation uses the Index stereotype in front of the operation. (Figure 10) Figure 10 The index constraint specifies the columns included and optionally the uniqueness of the index. Relationship A dependency of any kind between tables in a data model is called a relationship. A relationship is a summary of a stereotyped association and a set of primary and foreign keys. Every relationship is between a parent and child table, where a parent table must have a primary key defined. The child table creates a foreign key column and foreign key constraint to address the parent table. A non-identifying association represents a relationship between two independent tables. The foreign key of the child table does not contain all of the primary key columns. (Figure 11) Figure 11 An identifying relationship is a relation between two dependent tables, where the child table cannot exist without the parent table. All of the primary keys of the parent table (Person, in this example) become both primary and foreign key columns in the child table (Account). (Figure 12) 5

ACCOUNT BALANCE : FLOAT ACCOUNT_NO : FLOAT SOCIAL_ID : INTEGER <<PK>> PK_ACCOUNT0() <<FK>> FK_ACCOUNT1() +FK_ACCOUNT1 0..* 1 +PK_PERSON1 PERSON SOCIAL_ID : INTEGER NAME : CHAR <<PK>> PK_PERSON1() Figure 12 A relationship has two roles associated with it. They define the role of one table in association with the other. It is possible to assign more than one relationship between two tables using different roles. Each relationship creates migrated keys from the parent to the child table. Column A table contains columns which are tagged attributes. Columns can contain data, when they are instantiated as a row. A column must have a defined data type (see below for details). The column can be either persistent or computed. Computed columns are defined by an expression. Persistent columns can be tagged as primary key columns, nullable columns, and unique columns. They can also contain a default value. Constraints can be checked for any column. Datatype Supporting relational databases requires the support of standard datatypes. Examples of datatypes are char, date, float, long, number, nvarchar2, raw, varchar2. Object relational databases also require support of any enumeration designed in the model. Constraint A constraint is a rule applied to the structure of the database. This rule extends the structure and can be applied to a column and/or table. All constraints are defined as stereotyped operations. All the constraints described below are implemented here in one class. (Figure 13) 6

Figure 13 Primary key The primary key constraint defines the primary key as a rule on the table. Foreign key The foreign key constraint defines the foreign key as a rule on the table. Trigger A trigger is an activity executed by the DBMS as a side effect or instead of a modification of a table or view to ensure consistent system behavior on data operations. The Trigger stereotype on an operation represents the trigger on the table. (Figure 14) Figure 14 The trigger is displayed as a Trigger stereotype on the operation. (Figure 15) Figure 15 7

An example of a trigger is the logging of an insert into another table in the case where the balance is below 0 or greater than 100.000. Valid value The valid value constraint checks the value of data according to a given expression. The Check stereotype on an operation represents the validation check constraint. (Figure 16) Figure 16 An example of the check constraint is BALANCE > 0. Uniqueness The unique constraint assures that every row contains a different value in a column. The unique stereotype represents the uniqueness constraint. (Figure 17) Figure 17 The unique constraint can be applied on composite columns and it can also exist on a single column. Summary With the data modeling for UML profile, the UML fully supports data modeling needs. It allows the support of software development and data modeling with one unified language. Using the UML data modeling profile, Rational Rose Data Modeler unifies software development teams with a single, shared tool. 8

Corporate Headquarters 18880 Homestead Rd. Cupertino, CA 95014 Toll-free: 800.728.1212 Tel: 408.863.9900 Fax: 408.863.4120 Email: info@rational.com Web site: www.rational.com For International Offices: www.rational.com/corpinfo/worldwide/location.jtmpl The word Rational and Rational s products are trademarks of Rational Software Corporation. References to other companies and their products use trademarks owned by the respective companies and are for reference purposes only. Copyright 2000 by Rational Software Corporation. TP-180 3/00 Subject to change without notice. All rights reserved