1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Chapter 12: Designing Databases
C6 Databases.
Introduction to Databases
Systems Analysis and Design in a Changing World, 6th Edition
Client/Server Databases and the Oracle 10g Relational Database
File Systems and Databases
CS 432 Object-Oriented Analysis and Design
Data Management Design
Organizing Data & Information
Introduction to Databases Transparencies
Chapter 11 Data Management Layer Design
Information Technology in Organizations
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
System Analysis and Design
Managing Data Resources. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits that represents a single.
Chapter 4 Database Management Systems. Chapter 4Slide 2 What is a Database Management System (DBMS)?  Database An organized collection of related data.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
5.1 © 2007 by Prentice Hall 5 Chapter Foundations of Business Intelligence: Databases and Information Management.
2Object-Oriented Analysis and Design with the Unified Process Objectives  Describe the differences and similarities between relational and object-oriented.
2Object-Oriented Analysis and Design with the Unified Process Objectives  Describe the differences and similarities between relational and object-oriented.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Architecture for a Database System
6 Chapter Databases and Information Management. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
Storing Organizational Information - Databases
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
Announcements. Data Management Chapter 12 Traditional File Approach  Structure Field  Record  File  Fixed All records have common fields, and a field.
MIS 327 Database Management system 1 MIS 327: DBMS Dr. Monther Tarawneh Dr. Monther Tarawneh Week 2: Basic Concepts.
C6 Databases. 2 Traditional file environment Data Redundancy and Inconsistency: –Data redundancy: The presence of duplicate data in multiple data files.
Chapter 12: Designing Databases
2Object-Oriented Analysis and Design with the Unified Process Objectives  Describe the differences and similarities between relational and object-oriented.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Databases Shortfalls of file management systems Structure of a database Database administration Database Management system Hierarchical Databases Network.
Fanny Widadie, S.P, M.Agr 1 Database Management Systems.
MANAGING DATA RESOURCES ~ pertemuan 7 ~ Oleh: Ir. Abdul Hayat, MTI.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Relational Theory and Design
Management Information Systems, 4 th Edition 1 Chapter 8 Data and Knowledge Management.
Managing Data Resources. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits that represents a single.
IAD 2263: System Analysis and Design Chapter 7: Designing System Databases, Interfaces and Security.
2Object-Oriented Analysis and Design with the Unified Process OBJECTIVES  Describe the differences and similarities between relational and object-oriented.
INFORMATION X INFO425: Systems Design Chapter 13 Database Design.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
3/6: Data Management, pt. 2 Refresh your memory Relational Data Model
Databases Chapter Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Faeez, Franz & Syamim.   Database – collection of persistent data  Database Management System (DBMS) – software system that supports creation, population,
1 Management Information Systems M Agung Ali Fikri, SE. MM.
Data Resource Management Lecture 8. Traditional File Processing Data are organized, stored, and processed in independent files of data records In traditional.
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Managing Data Resources File Organization and databases for business information systems.
12. Chapter 12: Designing Databases Systems Analysis and Design in a Changing World, Fourth Edition 12.
Chapter 4 Relational Databases
Database.
MANAGING DATA RESOURCES
Databases and Information Management
Presentation transcript:

1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases

2 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Objectives u Describe the differences and similarities between relational and object-oriented database management systems u Design a relational database schema based on an entity-relationship diagram u Design an object database based on a class diagram

3 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Objectives u Design a relational schema to implement a hybrid object-relational database u Describe the different architectural models for distributed databases

4 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Databases and DBMSs u Databases are integrated collections of stored data that are centrally managed and controlled l Described by a schema u DBMSs are system software components that manage and control access to a database

5 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Components of a DB and DBMS Figure 10-1

6 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd DBMS’s Important Capabilities u Simultaneous access by multiple users and applications u Access to data without application programs u Managing organizational data

7 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Database Models u Impacted by technology changes u Model Types l Hierarchical l Network l Relational l Object-oriented u Current systems generally use relational or object-oriented data models

8 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Relational Databases u The relational database management system organizes data into tables or relations u Tables: l Tuples: rows or records l Fields: columns or attributes u Tables have key field(s) which can be used to identify unique records u Keys relate tables to each other

9 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Partial Relational Database Table Figure 10-2

10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Designing Relational Databases 1.Create table for each entity type 2.Choose or invent primary key for each table 3.Add foreign keys to represent one-to- many relationships 4.Create new tables to represent many-to- many relationships

11 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Designing Relational Databases (con’t.) 5.Define referential integrity constraints 6.Evaluate schema quality and make necessary improvements 7.Choose appropriate data types and value restrictions (if necessary) for each field

12 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd RMO Entity Relationship Diagram Figure 10-5

13 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Enforcing Referential Integrity u Consistent relational database state u Every foreign key also exists as a primary key value u DBMS enforces referential integrity automatically once schema designer identifies primary and foreign keys

14 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Automatic Enforcement for Referential Integrity u When rows containing foreign keys are created, DBMS ensures that the value also exists as a primary key in related table u When row is deleted, DBMS ensures no foreign key in related tables have the same value as primary key of deleted row u When primary key value is changed, DBMS ensures no foreign key values in related tables contain the same value

15 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Evaluating Schema Quality u High quality features l Uniqueness of table rows and primary keys l Ease of implementing future data model changes (flexibility and maintainability) l Lack of redundant data u Design is judgment-based

16 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Database Normalization u Ensure database quality by minimizing data redundancy u Normal forms l 1NF - no repeating fields or groups of fields l Functional dependency - one-to-one relationship between the values of two fields l 2NF - in 1NF and if each non-key element is functionally dependent on entire primary key l 3NF - in 2NF and if no non-key element is functionally dependent on any other non-key element

17 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Decomposition of 1NF Table into 2NF Tables Figure 10-12

18 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Conversion of 2NF Table into 3NF Tables Figure 10-13

19 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Object-Oriented Databases u Direct extension of the OO design and programming paradigm u ODBMS stores data as objects or classes u Object definition language (ODL) l Standard language for describing structure and content of an object database

20 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Designing Object Databases 1.Determine which classes require persistent storage 2.Define persistent classes 3.Represent relationships among persistent classes 4.Choose appropriate data types and value restrictions (if necessary) for each field.

21 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Representing Classes u Transient l Exist only during lifetime of program or process l Examples: view window, pop-up menu u Persistent l Not destroyed when program or process ceases execution l Exist independently of program l Examples: customer information, employee information

22 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Representing Relationships u Object identifiers l Used to identify objects uniquely l Physical storage address or reference l Relate objects of one class to another u ODBMS uses attributes containing object identifiers to find objects that are related to other objects

23 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Representing Relationships (con’t.) u Keyword relationship can be used to declare relationships between classes u Advantages include: l ODBMS assumes responsibility for determining connection l ODBMS assumes responsibility for maintaining referential integrity u Type of relationships l 1:1, 1:M, M:M l Association class used with M:M

24 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd 1:1 Relationship Represented with Attributes* Containing Object Identifiers Figure *attributes shown in color

25 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd 1:M Relationship Between Customer and Order Classes Figure 10-17

26 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd 1:M with Attributes Containing Object Identifiers Figure 10-18

27 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd M:M Relationship between Employee and Project Classes Figure 10-19

28 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd M:M Relationship Represented with two 1:M Relationships Figure 10-20

29 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Generalization Hierarchy within the RMO Class Diagram Figure 10-21

30 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Hybrid Object-Relational Database Design u Relational database management system used to store object attributes and relationships u Two design tasks l Developing complete relational schema l Developing equivalent set of classes u Problems l Programmer defined method storage and execution l Relationships are restricted l ERDs cannot represent methods

31 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Relationships and Inheritance in Hybrid Design u Relationships must be represented with foreign keys u Inheritance l Combine all tables into a single table containing a superset of all class attributes but excluding all invented fields from child classes l Use separate tables to represent child classes and substitute the primary key of the parent for the invented keys of the child

32 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Data Types u Storage format and allowable content of a program variable u Primitive data types l Pointer, Boolean, integer, etc. u Complex data types l Dates, times, audio streams, video images l User-Defined data types

33 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Object DBMS Data Types u Comparable to RDBMS data types u Schema designer can create new data types and associated constraints u Classes are complex user-defined data types that contain methods to manipulate data

34 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Distributed Databases u Rare for all organizational data to be stored in one location in a single database u Different information systems in an organization are developed at different times u Parts of an organization’s data may be owned and controlled by different units u System performance is increased when data is near primary applications

35 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Single Database Server Architecture Figure 10-26

36 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Replicated Database Server Architecture Figure 10-27

37 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Partitioning Database Schema into Client Access Subsets Figure 10-28

38 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Partitioned Database Server Architecture Figure 10-29

39 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Federated Database Server Architecture Figure 10-30