1 IRU – database design part one Geoff Leese September 2009.

Slides:



Advertisements
Similar presentations
Chapter 2.1 V3.1 Napier University Dr Gordon Russell
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Database Systems: Design, Implementation, and Management Tenth Edition
SYSTEMS ANALYSIS AND DESIGN TOOLS
MIS (Management Information System)
Chapter 4 Enterprise Modeling.
Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Entity Relationship (ER) Modeling
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
Logical Data Modelling
Entity-Relationship Model and Diagrams (continued)
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Logical Data Structures (Entity Relationship Diagrams)
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
IT 244 Database Management System Data Modeling 1 Ref: A First Course in Database System Jeffrey D Ullman & Jennifer Widom.
Computer System Analysis Chapter 10 Structuring System Requirements: Conceptual Data Modeling Dr. Sana’a Wafa Al-Sayegh 1 st quadmaster University of Palestine.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Database Design Using the REA Data Model
Business Process Modeling
ITEC224 Database Programming
Database Systems: Design, Implementation, and Management Ninth Edition
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
Entity Relationship Diagram (ERD) 22 February 2011.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
Concepts and Terminology Introduction to Database.
G057 - Lecture 02 Introduction To Database System Concepts Mr C Johnston ICT Teacher
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
Information Systems & Databases 2.2) Organisation methods.
1.  An introduction to data modelling  The purpose of data modelling  Modelling data relationships 2.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
(Spring 2015) Instructor: Craig Duckett Lecture 10: Tuesday, May 12, 2015 Mere Mortals Chap. 7 Summary, Team Work Time 1.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Description and exemplification of entity-relationship modelling.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
In this session, you will learn to: Map an ER diagram to a table Objectives.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Week 2 Introduction to Data Modelling
MIS2502: Data Analytics Relational Data Modeling
DBMS ER model-2 Week 6-7.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
DBS201: Data Modeling. Agenda Data Modeling Types of Models Entity Relationship Model.
1 Entity Relationship Approach u Top-down approach to data modeling u Uses diagrams u Normalization - confirms technical soundness u Entity Relationship.
Database Development Lifecycle
TMC2034 Database Concept and Design
(Winter 2017) Instructor: Craig Duckett
Tables and Their Characteristics
Chapter 7: Entity-Relationship Model
Outline of the ER Model By S.Saha
Database Design Using the REA Data Model
ERD’s REVIEW DBS201.
Chapter 4 Entity Relationship (ER) Modeling
MIS2502: Data Analytics Relational Data Modeling
Database Design Chapters 17 and 18.
Review of Week 1 Database DBMS File systems vs. database systems
Database Management system
Database Management system
Presentation transcript:

1 IRU – database design part one Geoff Leese September 2009

2 The mission statement n “High level” purpose of the project n “The purpose of the student records database system is to collect, store, manage and control access to the data that supports the delivery of our HE courses”

3 The mission objectives n Each one identifies a particular task that the database must support n Examples ä To enter, update and delete data about students ä To perform searches on staff data ä To report on assessment data

4 The Requirements Specification Document (RSD) n Often a very formal document – avoids argument later! n Templates exist for their production n Clear, complete, unambiguous set of requirements n Often expressed as “user views” n Based on interviews, observation etc.

5 RSD example (VERY partial) n The module leader must be able to ä Maintain (enter, update delete) details about her module(s) ä Maintain (enter, update, delete) details about the sessions where her module is delivered ä Maintain (enter, update, delete) details about the assessments required in his module ä Report on which students are taking his module and their assessment progress

6 ERD implied by that view Module Session Assessment Student 1 is taught inM assesses 1 is assessed by M attends M is attended by M takes M is taken by M belongs to

7 Entities n An object or concept about which a system needs to hold information is known as an entity type or entity. n a person, place, a thing, an object, an event n which can be distinctly identified and is of interest. n e.g.: A specific student: Fred Smith ä Can be concrete like a company ä Can be abstract like an idea, concept

8 An entity must satisfy the following criteria: n There must be more than one occurrence of the entity n Each occurrence must be uniquely identifiable n There must be data that the organisation wants to hold about the entity n It should be of direct interest to the system

9 Entity relationship modelling n A method of analysing the logical structure of an organisations information. n graphical representation of: ä what the information is about ä how it relates to other information and business concepts ä how business rules are applied to its use in the system.

10 Concepts and notation n Many different notations used for drawing ER-diagrams n SSADM methodology: ä Logical Data Structures (LDS). –This approach uses four main concepts and symbols: –Entities, –Relationships –Degrees –Optionality

11 Attribute n The attributes describe the entity ä e.g. Sales Invoice entity may have the following attributes: –Sales invoice number –Customer Number –Sales invoice date ä The detail of the attributes belonging to entities can be recorded as part of the diagram or in a separate textual description.

12 Relationships n Entities do not remain isolated they are related to other entities. n Represents a logical and not physical explanation of a system. n The relationships between entities represent business associations or rules and not physical links. n Any entities which are related are joined by a line on the diagram. The line is labelled with the name of the relationship in both directions and the relationship is two way

13 Degree of relationship (1) n Denotes the number of occurrences of each entity type in the relationship n SSADM notation this is shown using ‘crows feet’.

14 Degree of relationship (2) n One to one (1:1) This shows that each occurrence of Entity A is related to only one of entity B and each occurrence of B is related to only one occurrence of A. n Example - each student has one set of personal data, and each set of personal data is related to only one student.

15 Degree of relationship (3) n One to Many (1:M) This shows that each occurrence of entity A may be related to many occurrences of entity B. n Example: each sales invoice may be sent to only one customer but each customer may receive one or more sales invoices. This reflects one of the business rules of the organisation.

16 Degree of relationship (4) n Many to one (M:1) This shows that many occurrences of Entity A may be related to a single occurrence of Entity B. (It’s 1:M the other way around!) n Many to Many (M:N) n Relationships which are 1:1 or M:N are usually converted to 1:M on closer inspection.

17 Optionality n Each relationship can be further annotated to show if it must exist for all occurrences of the participating entity types. n If there can be occurrences of one entity that are not related to at least one occurrence of the other entity, then the relationship is optional. n shown by the use of a dashed line at the optional end(s) in the SSADM approach.

18 Part of an ERD Supplier Purchase order So what does it mean? May be sent Is sent to

19 It means……….. n Each supplier may be the supplier for one or more purchase Orders and each Purchase Order must be placed with one supplier.

20 One to try………. StudentCourse

21 Use of ERDs n SSADM uses it in the feasibility phase as well as in the investigation of the current system and in the logical design of the proposed system. n RAD approaches concentrate on the proposed system and so use ERDs to model the proposed system alone.

22 Tips on drawing ERDs n Diagrams are easier to follow if you avoid crossing lines where ever possible. n For 1:M relationships you should aim to keep the entity at the ‘1’ end above and/or to the left of the entity at the ‘M’ end. (Not always possible). n At all times the diagram should agree with the users understanding of the system.

23 Resolving many to many relationships: n The main reasons for this are: ä The M:N relationship hides many master- detail relationships ä M:N relationships make navigation around the model very difficult or even impossible. ä M:N relationships invariably hide information about the participating relationships or the entities themselves. ä Many DBMS’s (MS-Access included!) can’t implement M:N relationships!

24 How to resolve M:N n Take the primary key from the entity at each end of the M:N relationship. n Merge them to form an “interposing” or “joining” entity between the original two. n Determine a primary key for the new entity n Re-examine dependencies

25 Resolving one to one relationships n achieved either by merging the two entities involved n or by replacing the 1:1 relationship by a I :M relationship which reads one or more, the reason for this is: ä 1:1 relationships often obscure an underlying single entity ä There may be a “missing link” entity.

26 Resolving M:N relationships n A sales invoice consists of one or more sales invoice lines, and an invoice line is associated with one invoice. n A sales invoice line comprises one item of stock, and an item of stock may appear on one or more sales invoice lines. n The M:N relationship was hiding the entity invoice line.

27 Removing redundant relationships n a “route map” navigates between any pair of entities, possibly by a number of different routes. n One of the aims of drawing a clear diagram should be to include only the minimum number of relationships needed to apply all the business rules relating to the data. n Any unnecessary relationships are redundant and will involve a maintenance overhead if implemented in the final system

28 ERDs in software n Access uses the relationship view to show ERDs for the database n On the Tools menu, select Relationships to see an ERD of your database (only works with multiple tables) n Access Help has topics on relationships

29 ERM Summary n Aims to facilitate communication between the database designer and the end user during the requirements analysis. n To facilitate such communication, the designer needs adequate communication tools. n Entity-Relationship diagrams are such tools that enable the system analyst to display the overall view of the enterprise data structure (the enterprise conceptual schema).

30 Further Reading n Rolland Chapter 2 n Date C.J ((2004); An introduction to Database Systems (8 th edn); Chapter 14 n Ritchie C (1998); Relational Database Principles; chapters 3 and 4 n Avison D.E. and Fitzgerald G. (1995); Information Systems Development... ; Section 4.5