Chapter 11: Data Management Layer Design

Similar documents
Information Systems Development COMM005 (CSM03) Autumn Semester 2009

Systems Analysis & Design

Systems Analysis & Design

Rekayasa Perangkat Lunak 2 (IN043): Pertemuan 8. Data Management Layer Design

Alan Dennis, Barbara Haley Wixom, and

Chapter 1: Introduction to Systems Analysis

8) A top-to-bottom relationship among the items in a database is established by a

Systems Analysis & Design

The functions performed by a typical DBMS are the following:

Solved MCQ on fundamental of DBMS. Set-1

Systems Analysis and Design

Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

CPS510 Database System Design Primitive SYSTEM STRUCTURE

OBJECTIVES. How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization.

Data about data is database Select correct option: True False Partially True None of the Above

Data, Databases, and DBMSs

COMM 391. Objectives. Introduction to Microsoft Access. What is in an Access database file? Introduction to Microsoft Access 2010

Chapter 3: AIS Enhancements Through Information Technology and Networks

Layers. External Level Conceptual Level Internal Level

Inputs. Decisions. Leads to

DATABASE MANAGEMENT SYSTEM

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Ch. 21: Object Oriented Databases

Chapter 9: Relational DB Design byer/eer to Relational Mapping Relational Database Design Using ER-to- Relational Mapping Mapping EER Model

22/09/2012 INFO2110. Copyright Warning. Revision of class diagram. Overview. Purpose of class diagram. Generalization Relationship

ER to Relational Mapping

DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?

Relational Model: History

Database Management

VU Mobile Powered by S NO Group All Rights Reserved S NO Group 2013

Agile Database Techniques Effective Strategies for the Agile Software Developer. Scott W. Ambler

Review -Chapter 4. Review -Chapter 5

RELATIONAL DATA MODEL

! Define terms. ! Interpret history and role of SQL. ! Write single table queries using SQL. ! Establish referential integrity using SQL

Basant Group of Institution

Information Management (IM)

TIM 50 - Business Information Systems

(ADVANCED) DATABASE SYSTEMS (DATABASE MANAGEMENTS) PROF. DR. HASAN HÜSEYİN BALIK (6 TH WEEK)

Mahathma Gandhi University

Chapter 4: Data Management

Relational Model. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

Assignment Session : July-March

Tutorial notes on. Object relational structural patterns

DATABASE MANAGEMENT SYSTEMS

Several major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their

How to design a database

ER-to-Relational Mapping


Systems Analysis & Design

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

MS-Access : Objective Questions (MCQs) Set 1

Chapter 2: Entity-Relationship Model

Course Outline Faculty of Computing and Information Technology

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

Chapter 1 SQL and Data

3. Object-Oriented Databases

An Introduction to Databases and Database Management Systems.

Data Strategies for Efficiency and Growth

Module 9: Managing Schema Objects

Part I: Structured Data

Database Management System 9

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases

IT 3203 Introduction to Web Development

Introduction to Information Technology Turban, Rainer and Potter John Wiley & Sons, Inc. Copyright 2005

Introduction to Geographic Information Science. Updates. Last Lecture. Geography 4103 / Database Management

Introduction to Information Systems

Middleware for Heterogeneous and Distributed Information Systems Sample Solution Exercise Sheet 5

CHAPTER 2 LITERATURE REVIEW

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

"Charting the Course... Agile Database Design Techniques Course Summary

Chapter 8: General Controls and Application Controls

TIM 50 - Business Information Systems


1Z0-526

Management Information Systems MANAGING THE DIGITAL FIRM, 12 TH EDITION FOUNDATIONS OF BUSINESS INTELLIGENCE: DATABASES AND INFORMATION MANAGEMENT

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 8 Data Modeling Advanced Concepts

Chapter 4. The Relational Model

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

The Relational Model

Introduction to Databases

Chapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations

Higher National Unit specification: general information. Relational Database Management Systems

THE RELATIONAL DATABASE MODEL

Introduction To Computers

CMPT 354 Database Systems I

EXAM Microsoft Database Fundamentals. Buy Full Product.

AN EFFICIENT OODB MODEL FOR ENSURING THE INTEGRITY OF USER-DEFINED CONSTRAINTS

COMP 3400 Mainframe Administration 1

Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M.

CMP-3440 Database Systems

MaanavaN.Com DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK

Chapter 17. Methodology Logical Database Design for the Relational Model

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

Let s briefly review important EER inheritance concepts

Top 88 Question Asked in Part I of MIS 150 EXAM #1 (Chapter 1-4, Appendix C) Exams questions gathered from old tests dating back to Fall 2000

Data, Information, and Databases

4. Entity Relationship Model

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM).

CSE 530A. ER Model to Relational Schema. Washington University Fall 2013

Transcription:

Systems Analysis and Design With UML 2.0 An Object-Oriented Oriented Approach, Second Edition Chapter 11: Data Management Layer Design Alan Dennis, Barbara Wixom, and David Tegarden 2005 John Wiley & Sons, Inc. Slide 1

Copyright 2005 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976 United States Copyright Act without the express written permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for redistribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein. Slide 2

Data Management Layer Design Chapter 11 Slide 3

Objectives Become familiar with several object-persistence formats. Be able to map problem domain objects to different object-persistence formats. Be able to apply the steps of normalization to a relational database. Be able to optimize a relational database for object storage and access. Become familiar with indexes for relational databases. Be able to estimate the size of a relational database. Be able to design the data access and manipulation classes. Slide 4

Data Management Layer Choose object-persistence format to support the system Problem domain objects drive object storage design Design of Data Storage Must optimize processing efficiency Data access and manipulation Slide 5 Separate problem domain classes from storage format Handle all communication with the database

Object Persistence Formats Files (Sequential and Random) Relational databases Object-relational databases Object-oriented databases Slide 6

Customer Order File Slide 7

Sequential and Random Access Files Sequential access files allow sequential operations Read, write, and search Efficient for report writing Searches are not efficient because an average of 50% of records have to be accessed Two versions Ordered unordered Slide 8

Random Access Files Allow only random or direct file operations Good for finding and updating a specific object Inefficient report writing Slide 9

Application File Types Master Files Look-up files Transaction files Audit file History file Slide 10

Relational l Databases Collection of tables Comprised of fields that define entities Primary key has unique values in each row of a table Foreign key is primary key of another table Tables related to each other Primary key field of a table is a field of another table and called a foreign key Relationship established by a foreign key of one table connecting to the primary key of another table Slide 11

Customer Order Database Please Eliminate this line Slide 12

Database Management System (DBMS) Software that creates and manipulates a database RDBMS is a DBMS for a relational database RDBMS usually support Referential Integrity Slide 13

Referential Integrity the idea of ensuring that values linking the tables together through h the primary and foreign keys are valid and correctly synchronized. Slide 14

Referential Integrity Example Cust. ID is a primary key for the customer table Cust. ID is a foreign key for the order table A violation of referential integrity would happen if an order was entered in the order table for a Cust. ID that had not been entered into the customer table first An RDBMS prevents such a record from being entered Slide 15

Example of Referential Integrity Slide 16

Structured Query Language (SQL) Standard language for accessing data in tables SQL Commands Slide 17 Create, edit, and delete tables Add, edit, and delete data Display data from one or more related tables Display data computed from data in one or more related tables

Object-Relational l Databases Relational database management systems with extensions that handle object storage in the relational table structure This is done by user defined types Example: Create a map data type Slide 18

Vendors Support ORDBMS SQL designed for simple data types Vendors extend SQL to handle user data types in Object Relational l Databases Usually they don t support most object oriented features e.g. inheritance Slide 19

Object-Oriented Databases (OODBMS) Add persistence extensions to an object-oriented programming language Create a entirely separate database management system Slide 20

OODBMS Terminology Extent is a collection of objects Set of instances associated with a particular class (RDBMS table) Each instance of a class has a unique identifier called an object ID Referential integrity still important Supports a form of inheritance Slide 21

OODBMS Support Allow repeating groups or multivalued attributes Supports multimedia or other complex data applications CAD/CAM Financial services Geographic information systems Health care Slide 22

Major Strengths & Weaknesses Files Very efficient for given task Manipulation done by OOPL Redundant data usually results RDBMS Proven commercial technology Handle diverse data No support for object orientation Slide 23

More Strengths and Weaknesses ORDBMS Inherit RDBMS strengths Support complex data types Limited support for object-orientation (vendor dependent) OODBMS Support complex data types Support object-orientation directly Still maturing (lacks skilled labor and may have a steep learning curve) Slide 24

Criteria for Object Persistence Formats Data types supported Types of application systems (transaction processing, DSS, ) Existing Storage Formats Future Needs Other miscellaneous Criteria (cost, concurrency control, ) Slide 25

Mapping Objects to Object- Persistence Formats Slide 26

Multiple Inheritance Effect Rules Results when you have more than one super class Rule 1a. Add an attribute(s) t to the OODBMS class to represent the additional super class Rule 1b. Flatten the inheritance hierarchy and remove additional super classes from the design Slide 27

Mapping to Single I-B OODBMS Slide 28

Using Rule 1a Added an attribute to Class1-OODBMS that represents an association with Super-Class2- OODBMS, Added attributes to Class2-OODBMS that represents an association with Super-Class2- OODBMS, Added a pair of attributes to SuperClass2- OODBMS that represents an association with Class1-OODBMS and Class2-OODBMS, for completeness sale, and Added d associations between Class2-OODBMS and SuperClass2-OODBMS and Class1-OODBMS and SuperClass2-OODBMS that have the correct multiplicities and the XOR constraint explicitly shown. Slide 29

Mapping PDO to ORDBMS Slide 30

Mapping Table to PD Classes Slide 31

Mapping PD Objects to RDBMS Schema Rule 1: Map all concrete problem domain classes to the RDBMS tables. Rule 2: Map single valued attributes to columns of the tables. Rule 3: Map methods to stored procedures or to program modules. Rule 4: Map single-valued aggregation and association relationships to a column that can store the key of the related table Rule 5: Map multi-valued attributes and repeating groups to new tables and create a one-to-many association from the original table to the new ones. Rule 6: Map multi-valued aggregation and association relationships to a new associative table that relates the two original tables together. Copy the primary key from both original tables to the new associative table Rule 7: For aggregation and association relationships of mixed type, copy the primary key from the single-valued side (1..1 or 0..1) of the relationship to a new column in the table on the multi-valued side (1..* or 0..*) of the relationship that can store the key of the related table Rule 8a: Ensure that the primary key of the subclass instance is the same as the primary key of the superclass.. OR Rule 8b: Flatten the inheritance Slide 32

Mapping RDBMS Tables to Problem Domain Classes Slide 33

Optimize RDBMS Object Storage No redundant data Wastes space Allow more room for error Few null values in tables Difficult to interpret Slide 34

Example of Non-normalized Data Slide 35

Normalization Slide 36

Normalization Example Original Model Slide 37

3NF Normalized Model Slide 38

Problems with RDBMS To access data in multiple tables, the tables must be joined This can result in many database operations and lead to huge tables and slow processing Slide 39

Speeding up access Denormalization Adds data from one table to another in order to speed processing and eliminate a join operation Example: Add customer last name to order table to avoid joining i order to customer to get just last name Slide 40

Example Slide 41

Denormalization i Candidates Lookup Tables one-to-one relationships include a parent entity s attributes in its child entity on the physical data model Slide 42

Clustering Interfile clustering Arrange records on storage media so that similar records are stored close together inter-file cluster would be similar to storing peanut butter, jelly, and bread next to each other in a grocery store since they are often purchased together. Slide 43

Indexing An index in data storage is like an index in the back of a textbook; it is a mini table that contains values from one or more columns in a table and the location of the values within the table. A query can use an index to find the locations of only those records that are included cudedin the equery yanswer,,and a table can have an unlimited number of indexes but too many can add overhead Slide 44

Indexing Example Slide 45

Estimating i Data Storage Size sum the values of the average width of each column (field) to find total record size Add overhead (vendor may provide an estimate) t Estimate the number of records you plan to have in the database Slide 46

Data Sizing i Example Slide 47

DESIGNING DATA ACCESS AND MANIPULATION CLASSES Design data access and manipulation classes Prevent data management functionality from creeping into the problem domain classes Slide 48

Mapping PD Objects Slide 49

CD Selections Example Most of the data would be text and numbers Thus a relational l database would be able to handle the data effectively However, images for the catalog require complex data objects for sound and video Slide 50

Looking at the Data Needs Slide 51

Object Persistent t Design Slide 52

Optimizing i i Application Slide 53

Problem Domain Layer Slide 54

Summary Choose an object-persistent format Files (sequential or Random Access) Databases (RDBMS, ORDBMS, OODBMS) Map problem domain objects to Data Optimizing object storage Normalization Denormalization, clustering, Indexes Design Data Access and Manipulation Classes Slide 55