Data Modelling II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.

Slides:



Advertisements
Similar presentations
Banking Business Scenario
Advertisements

Relational Data Analysis. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Systems Analysis and Design. SA&D Outline 9 Weeks of Lectures Supported by Tutorials Self Study Examples –Bushmouth –Lejk and Deeks.
ENTITY RELATIONSHIP MODELLING
Chapter 4 Enterprise Modeling.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Accounting System Design
L ECTURE 11 – D ATA M ODELLING Data Dictionaries Entity Relationship Diagram for Data Modelling Steps to Construct Entity Relationship Diagrams Validation.
Data Modelling I. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
Lecture Eleven Entity-Relationship Modelling
Tutorial 1 Entity Relationship Modelling. Entities and what they mean One-to-many Header-Items Invoice/ Invoice Items Customer/ Customer- Branch Bidirectional.
Introduction to Databases
Entity-Relationship Model and Diagrams (continued)
Data Modeling ISYS 464. Database Design Process Conceptual database design: –The process of creating a data model independent of implementation details.
Further Data Modelling …and the effect of time. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis –Further.
Entity-Relationship Modelling Introduced by Chen in 1976 The ER Model is used to construct the conceptual data model – independent of DBMS Most widely.
Systems Analysis and Design. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Relational Data Analysis II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Further Systems Analysis. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis –Further Data Modelling.
Lecture 3 :Database Analysis and Design (II)
Data Flow Modelling II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Methodology Conceptual Database Design
Database development (MIS 533) MBS in Management Information Systems and Managerial Accounting Systems (2007 / 2008) Fergal Carton Business Information.
Entity/Relationship Modelling
© 2008 Prentice Hall Business Publishing Accounting Information Systems, 11/e Romney/Steinbart1 of 138 C HAPTER 15 Database Design Using the REA Data Model.
ER Modeling Case Studies
Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Entity-Relationship modeling Transparencies
Data Modeling using Entity Relationship Diagramming (ERD)
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Database Systems Marcus Kaiser School of Computing Science Newcastle University.
CSE 441: Systems Analysis & Design
1 Lecture 3: Introducing Data Flow Diagrams (DFDs) Section 1 - The Concept of Diagrams Why use Diagrams? Diagrams as Working Documents Systems Analysis.
Entity Relationship Diagram (ERD) 22 February 2011.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
9/10/2012ISC 329 Isabelle Bichindaritz1 Entity Relationship (E-R) Modeling.
Concepts and Terminology Introduction to Database.
HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design.
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart1 of 96 C HAPTER 17 Special Topics in REA Modeling for the.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
Data Modelling. ICT5 Introduction Historical development with most organisations Small-scale origins Individual computers bought for particular applications.
Lecturer: Gareth Jones. How does a relational database organise data? What are the principles of a database management system? What are the principal.
1 n 1 n 1 1 n n Schema for part of a business application relational database.
1 Information Retrieval and Use Data Analysis & Data Modeling, Relational Data Analysis and Logical Data Modeling Geoff Leese September 2009.
© Pearson Education Limited, Chapter 9 Logical database design – Step 1 Transparencies.
1.  An introduction to data modelling  The purpose of data modelling  Modelling data relationships 2.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
1. Objectives At the end of this chapter you should be able to:  Discuss the use and features of a data model  Define the terms entity and attribute.
Chapter 1 1 Lecture # 1 & 2 Chapter # 1 Databases and Database Users Muhammad Emran Database Systems.
1 IRU – database design part one Geoff Leese September 2009.
Database Fundamentals Lecture 4 Useful website for MySQL download language.com/workshops/Default.asp ?workshop=21.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
Relational Database. I. Relational Database 1. Introduction 2. Database Models 3. Relational Database 4. Entity-Relationship Models 5. RDB Design Principles.
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
Normalisation RELATIONAL DATABASES.  Last week we looked at elements of designing a database and the generation of an ERD  As part of the design and.
Entity/Relationship Modelling. Entity Relationship Modelling In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes.
1 Database Systems Entity Relationship (E-R) Modeling.
© 2003 Prentice Hall, Inc.3-1 Chapter 3 Database Management Information Systems Today Leonard Jessup and Joseph Valacich.
Systems Analysis & Design
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
1 Lecture1 Introduction to Databases Systems Database 1.
Entity relationship diagrams
Conceptual Database Design
Presentation transcript:

Data Modelling II

Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance

Data Model Requirements Designers, end-users and programmers tend to view data in different ways We need a communications tool that will enable models to be understood by all –Non-technical –Un-ambiguous (Connolly & Begg, 2000)

Entity A thing that occurs more than once in the system about which we need to store information …occurs more than once… …about which we need to store information… (These are NOT the same as external entities in DFDS)

Identifying Entities One way of identifying possible entities is to find all the nouns in a description of a system But… –Some of these might be attributes –Some of these might be neither entities or attributes –This may not find all of the entities

Entities and Attributes Often an entity in one system will be an attribute in another system and might be neither in another system This depends on the context of the system we are studying We need to be clear about the system and its data and processing requirements

ERD Elements E.G. In a student enrolment system Student Student Number Name Address Phone Number Course Entity Name Key Attribute Non-Key Attributes

One-to-Many Mulchester University Student Student Number Course Course Code Enrolled on Enrols Parent/Master Child/Detail

Examples 1 to many (1 or more) 1 (or 0) to 1 1 (or 0) to many (1 or more) Many (1 or more) to Many (1 or more) Many (0, 1 or more) to 1 (or 0)

One-to-Many Mulchester University –Each Course MUST enrol one or more students –Each Student MUST be enrolled on one course –Student and Course cannot exist independently Student Student Number Course Course Code Enrolled on Enrols

One-to-Many Mulchester University –Each Course MAY enrol one or more students –Each Student MUST be enrolled on one course –A course may exist with no students enrolled on it Student Student Number Course Course Code Enrolled on Enrols

One-to-Many Mulchester University –Each Course MUST enrol one or more students –Each Student MAY be enrolled on one course –A student may exist that is not enrolled on a course Student Student Number Course Course Code Enrolled on Enrols

One-to-Many Mulchester University –Each Course MAY enrol one or more students –Each Student MAY be enrolled on one course –Both student and course may exist independently Student Student Number Course Course Code Enrolled on Enrols

Identifying Relationships One to One –Each member of staff manages one branch –Each branch managed by one member of staff StaffID S1001 S1003 S0110 Branch B001 B002 manages (Connolly & Begg, 2000)

Identifying Relationships One to Many –Each Branch has Many employees –Each employee works at one branch Branch B001 B002 StaffID S0001 S0002 S0110 S2345 has (Connolly & Begg, 2000)

CustID C1001 C1002 C5210 AccNo A001 A102 A307 Identifying Relationships Many to Many –£ach customer has many accounts –£ach account held by many customers (Connolly & Begg, 2000)

Identifying Relationships This is a useful exercise but… Things are not always as they appear at any given time Need to check with users –Historical facts –Future Requirements Have/will staff ever worked at multiple branches

Big Jim’s Bikes Big Jim sells Bikes on the Internet. Customers Big Jim with their details and those of the bike that they want to buy Bike details are taken from the bike list posted on Big Jim’s Website, where every bike is listed with a unique stock number On receipt of an Big Jim checks the bike details and then requests payment in full On receipt of payment Big Jim wraps the bike in brown paper and posts it to the customer using Royal Mail Big Jim stores customer details in case they buy another bike. No details of payments are stored.

Identify Entities Big Jim sells Bikes on the Internet. Customers Big Jim with their details and those of the bike that they want to buy Bike details are taken from the bike list posted on Big Jim’s Website, where every bike is listed with a unique stock number On receipt of an Big Jim checks the bike details and then requests payment in full On receipt of payment Big Jim wraps the bike in brown paper and posts it to the customer using Royal Mail Big Jim stores customer details in case they buy another bike. No details of payments are stored.

Draw ERD Each Customer can buy many bikes Each bike is bought by one customer Big Jim holds customer details before they buy a bike Bike details are held before they are bought Bike Stock Number Customer Customer Number Buys Bought by

Exercise 2 Big Jim has decided that it is too much work to list every bike. He now lists bikes by model and customers buy one of that model rather than a specific bike. Each bike still has a unique stock number. Example models in Big Jim’s system are: –Raleigh Chopper –Penny Farthing –Dahon Espresso –Shogun XC200 How does this effect the data model?

Solution

What do we know? How to identify Entities and Attributes Why we need a Key Attribute How to describe the Relationships between Entities How to draw an Entity Relationship Diagram

What problems still exist? There are some problems associated with M:N relationships that need to be resolved We may need to examine attributes in more detail We need to check our model against the required transactions There are additional relationships we could describe

Implementing the model At some point we will build a database from our data model It is likely that this will be a relational database –Access –Oracle –SQL Server –MySQL –DB2

Implementing the model The relational data model Does Not Support many-to-many relationships These must be resolved

How to resolve M:N Example 1- Students and Modules Student Student Number Module Module Code Enrolled on Enrols

How to resolve M:N Student Student Number Module Module Code Student/Module Student Number Module Code Remove the M:N relationship Replace it with a “link” entity Note the key attribute is compound Add two new 1:M relationships

How to resolve M:N Student Student Number Module Module Code Enrolment Student Number Module Code We can give the new entity a more meaningful name

How to resolve M:N Student Student Number Module Module Code Enrolment Student Number Module Code Grade It is likely that we will find new attributes that belong to the new entity

How to resolve M:N Example 2 – Orders and Stock Items Order Order Number Stock Items Stock Code Contains Appears on

How to resolve M:N Order Order Number Stock Item Stock Code Stock/Order Order Number Stock Code

How to resolve M:N Order Order Number Stock Item Stock Code Order Line Order Number Stock Code

How to resolve M:N Order Order Number Stock Item Stock Code Order Line Order Number Stock Code Qty Line Total

How to resolve M:N Example 3 – Books and Authors Book/Title ISBN Title Author Author Name Written by Author of

Structural Problems Some structural problems may exist in our model –Fan Traps –Chasm Traps

Fan Traps Staff StaffID Car CarNo Branch BranchNo Base for has at Based at (Connolly & Begg, 2000) How do we know which car is allocated to which staff?

Fan Traps StaffID S1003 S1010 Branch B001 B002 CarNo V001 V002 V003 (Connolly & Begg, 2000)

Fan Traps StaffID S1003 S1010 Branch B001 B002 CarNo V001 V002 V003 (Connolly & Begg, 2000)

Fan Traps Staff StaffID Car CarNo Branch BranchNo Base for has at Based at allocated Allocated to (Connolly & Begg, 2000)

Chasm Traps Branch BranchNo Staff StaffNo Car CarNo How do we know which staff work at a branch? (Connolly & Begg, 2000) Base for Based at allocated

Chasm Traps Branch B001 B002 CarNo V001 V002 StaffID S1003 S1010 (Connolly & Begg, 2000)

Chasm Traps Branch B001 B002 CarNo V001 V002 StaffID S1003 S1010 (Connolly & Begg, 2000)

Chasm Traps Branch BranchNo Staff StaffNo Car CarNo (Connolly & Begg, 2000) Base for Based at allocated has at

Other relationships Boat BoatID Surfboard SurfboardNo Customer Customer Number Customer can either book boats or surfboards but not both a a

What do we know? How to identify relationships How to resolve M:N relationships What chasm and fan traps look like Other ways of representing relationships

Normalisation ERDs provide a top-down means of modelling data Normalisation is a complimentary approach which works from the bottom up We can also use normalisation to ensure that we have removed redundant data from our ERD

References Whiteley, D. (2004) Introduction to Information Systems, Palgrave, Lejk, M. and D. Deeks (2002) Systems Analysis Techniques, Addison Wesley 2002 Mason, D. and L. Willcocks (1994), Systems Analysis, Systems Design, Alfred Waller, 1994.

References Yeates, D. and T. Wakefield (2004) Systems Analysis and Design, FT/Prentice Hall 2004 Gane, C. and T. Sarson (1979) Structured Systems Analysis, Prentice Hall, 1979 Eva, M (1994) SSADM Version 4: A users guide, McGraw hill, 1994

References DeMarco, T. (1979) Structured Analysis and System Specification, Yourdon, 1979 Royce, W. (1970) Managing the development of large software systems, In: Proceedings of IEEE WESCON, 1970 pp1-9. Connolly, T. and C. Begg (2000) Database Solutions, Addison-Wesley, 2000