Further Data Modelling …and the effect of time. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis –Further.

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

ELH 1 ELHs - Part 2, Development Initial identification of events and assignment to functions Construction of event/entity Matrix Drawing entity life histories.
Normalisation.
CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
Intro to MIS – MGS351 Relational Database Design Extended Learning Module C.
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Relational Data Analysis. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
SYSTEMS ANALYSIS AND DESIGN TOOLS
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Normalisation Ensuring data integrity in database design 1.
Data Modelling II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Data Modelling I. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Tutorial 1 Entity Relationship Modelling. Entities and what they mean One-to-many Header-Items Invoice/ Invoice Items Customer/ Customer- Branch Bidirectional.
Agenda for Week 1/31 & 2/2 Learn about database design
Aims and Objectives In this session you will be able to: Define ELHs and describe why they are used in systems analysis. Recognise the structure of an.
Data modelling uses two main techniques Entity relationship (E-R) modelling: a top- down approach Normalisation: a bottom-up approach.
Relational Data Analysis II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Systems Analysis and Design in a Changing World, 6th Edition
Data Flow Modelling II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Week 2 Lecture 2 Structure of a database. External Schema Conceptual Schema Internal Schema Physical Schema.
Entity/Relationship Modelling
System Analysis Overview Document functional requirements by creating models Two concepts help identify functional requirements in the traditional approach.
Question 1: (20 Points – 4 Points Each)
CMIS 470 Structured Systems Design
Systems Analysis and Design in a Changing World, Fifth Edition
Modelling Techniques - Normalisation Description and exemplification of normalisation.Description and exemplification of normalisation. Creation of un-normalised.
CREATE THE DIFFERENCE Normalisation (special thanks to Janet Francis for this presentation)
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
Creating databases for web applications SQL. Systems design. ER diagrams. Data flow diagrams. Storyboards. Homework: Plan database and applications for.
Copyright © 2003 Addison-Wesley Jesper Rosholm Tørresø.
1 Lecture 3: Introducing Data Flow Diagrams (DFDs) Section 1 - The Concept of Diagrams Why use Diagrams? Diagrams as Working Documents Systems Analysis.
Week 5: Business Processes and Process Modeling MIS 2101: Management Information Systems.
Systems Analysis and Design in a Changing World, 6th Edition
Driving School Database
Introduction to Sequence Diagrams
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Lecture 3 Uses Cases Topics UML Use Cases pop quiz Readings: Chapter 3 January 24, 2008 CSCE 492 Software Engineering.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
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.
1 IRU – database design part one Geoff Leese September 2009.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
5 Systems Analysis and Design in a Changing World, Fifth Edition.
A “Whack-The-Balls” session: Every Friday the manager of Whack-The-Balls arranges the playing sessions for the week beginning in 4 weeks time. At the same.
Systems Analysis and Design in a Changing World, 6th Edition
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
Description and exemplification of entity-relationship modelling.
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
G045 Lecture 08 DFD Level 1 Diagrams (Data Flow Diagrams Level 1)
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
September 2002 HND Year 2 Database Management Systems Sept 2002.
Description and exemplification of entity/event modelling. Index and Key – –The Index/Key column of the data dictionary is used to indicate whether or.
Lecture 91 Introduction to Data Analysis and Logic Specification Objectives l Draw an entity-relationship diagram, and explain the types of entity relationships.
Topic 3 – Data Modeling Techniques Unit 1 – Database Analysis and Design Advanced Higher Information Systems St Kentigern’s Academy.
Object-Oriented Analysis and Design Use cases Finding classes Collaboration and Sequence diagrams Associations between classes.
Description and exemplification use of a Data Dictionary. A data dictionary is a catalogue of all data items in a system. The data dictionary stores details.
Lecture 3 : Hard Systems Modelling UFCE8V-20-3 Information Systems Development SHAPE Hong Kong 2010/11.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Year 12 > 13 Applied GCE ICT Unit 7 Using Database Software.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Intro to MIS – MGS351 Relational Database Design
Databases Chapter 9 Asfia Rahman.
Accounting System Design
Database Fundamentals
Accounting System Design
Business Analysis Entity Life History Chris Russell O2.41d
Entity Relationship Model
Presentation transcript:

Further Data Modelling …and the effect of time

Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis –Further Systems Analysis Topics

Relationships Remember… During Normalisation it is important to maintain the relationship between tables These relationships are maintained by Compound Keys (1NF) and foreign keys (3NF)

Example 1 – 3NF Student ID Module Code Grade Module Code Module Name Foreign Key Student ID Student Name Course ID Course Compound Key *

Relationships Relationships can now be drawn They will be 1:M relationships In general the many end “grabs” the foreign key Compound Keys are also treated as foreign keys

Example 1 – 3NF Student ID Module Code Grade Module Code Module Name Student ID Student Name Course ID Course *

Student Course Student/Module Module

Bottom Up Data Model A normalised set of data can now be represented as an ERD This will improve the communication aspect of Normalisation It also helps to check the sanity of your normalisation

Example 2 - 3NF Student ID Name Faculty Student ID Book ID Return Date Book ID Title Author Compound Key

Student Loan Book

Example 3 - 3NF Customer ID Customer Name Address Branch No* Branch No Branch Manager Customer ID Stock ID Title Format Foreign Key Compound Key

Customer Branch Customer/Item Item

Data Modelling Entity Relationship Diagrams –Top down view of data modelling –Gives a good overview of system –Good communication tool –May lack accuracy Normalisation –Bottom up view of data modelling –Difficult with large systems –Poor communication tool –Very accurate

Data Modelling A hybrid approach gives the benefits of –good communication –more formal approach This is done as follows: –Develop an ERD of the system –Check each entity is in 3NF

Data Modelling Another approach to data modelling –Divides the system into user views –Develop an ERD for each Each view is then combined into one whole system ERD TopDog is a Good Example Similar to a Use Case based approach See also (Conolly and Begg, 2000)

Further Data Modelling …and the effect of time

Entity Life Histories Remember that an entity occurrence is a instance of an entity –E.g. Each student is an occurrence of the entity student Every Occurrence shares the same attributes Every Occurrence is also effected by the same set of events

Events External Events –In Big John’s Store, receipt of a customer order caused the creation of an order, and maybe also a customer Internal Events –In the Ticket Agency, the creation of a list of pre- purchase events causes an order to be placed. Time Based –In CD Hotels a statement is produced every week.

Events Events will affect entity occurrences in a number of ways Create –A new student record is created when a student registers on a course. Delete –A student record is deleted when a student leaves a course. Update –A student successfully completes year 1 and so their year attributes is updated to Year 2.

Events All entity occurrences will be created …all will have some events update them during their lifetime …and all will be deleted at some point The description of these events and the order in which they occur is called an Entity Life History

Order of Events The Order in which events can occur is Governed by three primary structures: –Sequence –Selection –Iteration

Entity Life History Entity CreationLifeDeletion This diagram represents a sequence of events. This sequence is always read from left to right and is always carried out in the exact order shown.

Entity Life History Student RegistrationUpdate RecordsStudent Leaves Student records are created when a student registers, various changes occur during the life of a student entity. Student records are deleted when a student leaves. Example: Student Record at Mulchester University This diagram represents a sequence of events. This sequence is always read from left to right and is always carried out in the exact order shown.

Sequence Student RegistrationUpdates 3 Years after departure Student Leaves Mulchester realise that they might need to keep student record after a student has left – so they modify their system so that records are kept for 3 years after a student leaves.

Sequence Student RegistrationUpdates 3 Years after departureStudent LeavesCourse Completed A student leaves after a course is complete.

Check the Model! This is only correct if a student always leaves after course completed Sometime a student may leave before the course is finished This means there are two conditions under which a student leaves –Either they complete the course and then leave OR they leave pre-maturely This is an example of a Selection

Selection Option 2Option n OO Option 1 O ……… Option boxes have an “O” in the top right hand corner The order is no longer important as we are only using one of the options We show selection in ELHs as follows:

Selection Student RegistrationUpdates 3 Years after departure Student Leaves (Premature) O Student Leaves (C. Complete) O Note that we do not put the options on the same level as the original sequence. They are placed on the level below with an empty box marking their place in the sequence. In general we do not mix logical structures at the same level on an ELH diagram

Updates During the life of the entity, many updates to a student’s personal details occur (student’s move house etc.) These updates can occur one or more times and there is no logical order to them This is an example of an Iteration Structure and its general form is as follows:

Iteration Iterated Event * Iteration boxes have a “ * ” in the top right hand corner The event can happen zero, one or many times

Iteration Student Registration 3 Years after departure Student Leaves (Premature) O Student Leaves (C. Complete) O Amend Personal Details * Note that, again the iteration is not shown on the same level as the original sequence, but a placeholder is used to show its position in that sequence.

Adding More Detail The university realises that it also needs to amend a student’s module details throughout their time on the course This will again be iterative as it can occur any number of times These updates occur anytime between student registration and a student leaving

A Solution? Student Registration 3 Years after departure Amend Personal Details * Amend Module Details * Student Leaves (Premature) O Student Leaves (C. Complete) O It says that Module details will only be amended after all amendments to personal detail have been done. This is wrong!

A Solution! Student Registration 3 Years after departure * Student Leaves (Premature) O Student Leaves (C. Complete) O Amend Personal Details O Amend Module Details O When an update occurs it could be to the personal details or it could be to the module details – it doesn’t matter which, and now the order in which these occur doesn’t matter. This is correct!

A Useful Structure Student Registration 3 Years after departure * Student Leaves (Premature) O Student Leaves (C. Complete) O Amend Personal Details O Amend Module Details O This is a common structure for the life of an entity as it allows updates in any order

Further ELH There are other structures that can be applied –Quit/Resume (bit like GOTO) –Parallel Structures –State Indicators State Diagrams are another way of showing the same thing

References Lejk, M. and D. Deeks (2002) Systems Analysis Techniques, Addison Wesley 2002 Connolly, T. and C. Begg (2000) Database Solutions, Addison-Wesley, 2000