Hazırlayan MODELLING THE DATA STRUCTURE Entity Modelling & Entity Relationship Diagrams Yard.Doç.Dr. Zehra KAMIŞLI ÖZTÜRK.

Slides:



Advertisements
Similar presentations
Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
Advertisements

SYSTEMS ANALYSIS AND DESIGN TOOLS
Chapter 3 Data Modeling Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
MIS (Management Information System)
Data Design The futureERD - CardinalityCODINGRelationshipsDefinition.
ENTITY RELATIONSHIP MODELLING
Chapter 4 Enterprise Modeling.
ERD diagram Data Design - Mr. Ahmad Al-Ghoul
Chapter 4 Entity Relationship (E-R) Modeling
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Data Modelling II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Agenda for Week 1/31 & 2/2 Learn about database design
Entity-Relationship Model and Diagrams (continued)
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Entity-Relationship Modelling Introduced by Chen in 1976 The ER Model is used to construct the conceptual data model – independent of DBMS Most widely.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
L ECTURE 9 – PROCESS MODELLING PART 1 Data Flow Diagrams for Process Modelling Multi-level Data Flow Diagrams Logical Vs Physical DFDs Steps to Construct.
System Analysis and Design
DATA FLOW DIAGRAMS IT 155.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Entity/Relationship Modelling
Chapter 5 UNDERSTANDING AND DESIGNING ACCOUNTING DATA.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of.
Entity Relationship Modeling
Entity-Relationship Modeling I The cautious seldom err. Confucius.
COMM 226 Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson.
Structured Systems Analysis and Design Methodology Northern College Diploma Philip Bird.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Driving School Database
FatMax Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-ShareAlike 2.5.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Entity Relationship Diagram (ERD) 22 February 2011.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
G057 - Lecture 02 Introduction To Database System Concepts Mr C Johnston ICT Teacher
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.
1.  An introduction to data modelling  The purpose of data modelling  Modelling data relationships 2.
SYSTEMS ANALYSIS AND DESIGN TOOLS DATA FLOW DIAGRAMS.
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.
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.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
IMS 4212: Introduction to Data Modeling—Relationships 1 Dr. Lawrence West, Management Dept., University of Central Florida Relationships—Topics.
Description and exemplification of entity-relationship modelling.
Btec National - Advanced Databases 1 Advanced Databases Entity Relationship Diagrams.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
Database Systems ER Diagramming Tutor:Ian Perry Tel: Web:
44220: Database Design & Implementation Conceptual Data Modelling Ian Perry Room: C49 Tel Ext.: 7287
Entity/Relationship Modelling. Entity Relationship Modelling In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
DBMS ER model-2 Week 6-7.
Btec National - IT SYSTEMS ANALYSIS AND DESIGN 1 IT Systems Analysis and Design Entity Relationship Diagrams.
Database Relationships Objective 5.01 Understand database tables used in business.
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
CS422 Principles of Database Systems Entity-Relationship Model Chengyu Sun California State University, Los Angeles.
 DEFINE THE ENTITY  IDENTIFY THE ENTITY TYPES AND SETS OF ENTITY  EXPLAIN THE ATTRIBUTE AND A VALUE SET  EXPLAIN E-R MODEL EXPLAIN THE FOLLOWING RELATIONSHIP.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
1 Entity Relationship Approach u Top-down approach to data modeling u Uses diagrams u Normalization - confirms technical soundness u Entity Relationship.
Entity/Relationship Modelling
SSADM – Structured Systems Analysis and Design Method
Case Studies: Data Modeling
SSADM – Structured Systems Analysis and Design Method
Database Modeling using Entity Relationship Model (E-R Model)
Presentation transcript:

Hazırlayan MODELLING THE DATA STRUCTURE Entity Modelling & Entity Relationship Diagrams Yard.Doç.Dr. Zehra KAMIŞLI ÖZTÜRK

(Structured System Analysis & Design Methodology - SSADM) Data Flow Diagrams (DFD) DFDs show the processes, or functions, involved in a system. They don’t tell us much about the structure of the data. SSADM entity model (or Logical Data Model)

Entity Modelling SSADM Entity Models – Real data – How the data connected?

Entities SSADM things we might want to keep information about – People like CUSTOMER – Objects like PRODUCT Swillbuckets Club MEMBERS RECIPES EVENTS ARTISTES SUPPLIER DRINK Medical Centre PATIENT DOCTOR NURSE APPOINTMENT WORK DATA PRESCRIPTION

Is it an «entitty»? 1.An entity must be important to the organization. 2.An entity must have at least one attribute 3.An entity must occur more than once 4.Each entity occurrence must be uniquely identifiable SSADM MEMBERMembership number RECIPERecipe number

Representation form for entitites rectangles with rounded corners in Entity Models The name of the entity is always singular!! RECEIPT DRINK PATIENT SSADM

ATTRIBUTE 1980’lerin başında kullanılmaya başlanmıştır. SSADM SSADM, genellikle devlet bilgisayar projeleri için bir gereklilik olarak belirtilen İngiltere'de yaygın olarak kullanılan bir bilgisayar uygulama geliştirme yöntemidir. Giderek Avrupa'da kamu sektörü tarafından kabul edilmiştir. SSADM kamu malıdır ve İngiliz Standardı BS7738 ile belirtilir. Attributes are bits of data associated with the entity Entity: MEMBER Attributes: – Member Name – Membership Number – Member Address – Date of Birth – Type – Seconder – Renewal Date

A full membership record

Keys A key is a way of identifying something My key: Zehra Kamışlı Öztürk (It’s how other people identify me) SSADM Brilliant ?? Zehra Öztürk (Yard.Doç.Dr. Anadolu Üniversitesi) Zehra Öztürk (X Bank) Zehra Öztürk (Dr. Y Hospital) t.r. identity number

Keys Zehra KAMIŞLI ÖZTÜRK Zehra ÖZTÜRK - ANADOLU ÜNİVERSİTESİ ??

Keys an entity is made up of a number of attributes. To identify that entity, we need a key. Unique … primary key – it’s made up of just one attribute.

Relationships Entitites have relationships with other entities Swillbuckets Artistes entertain Members Members attend Events Artistes perform at Events Students attend Classes Students have Tutors Tutors give Classes

Relationships The entities are joined together by a verb which describes the relationship between them. In an entity model, related entities are joined by a line

Relation Types one-to-one (1:1)

Relation Types one-to-many (1:M)

Relation Types many-to-many (M:N)

Relation Types one-to-many (1:M) PATIENTDOCTOREVENTARTISTE

M:M Sadly, many-to-many relationships are not good for databases. They cannot be implemented effectively. So many-to-many relationships have to be resolved.

M:M many-to-many (M:M) STUDENTCOURSECUSTOMEPRODUCT

Resolving many-to-many relationships we have to split many-to- many relationships into two one-to-many relationships. This requires us to find a link entity which is a single occurrence of the many-to- many relationship. 1. Find a link entity

2Consider the attributes When we create a new link entity in this way, we need to consider which attributes will make up the new entity. There will be one or two from the original two entities, but there may be some completely new ones. Resolving many-to-many relationships

2Consider the attributes When we create a new link entity in this way, we need to consider which attributes will make up the new entity. There will be one or two from the original two entities, but there may be some completely new ones. Resolving many-to-many relationships

COURTDEFENDANT Court noDefendant no Court nameDefendant name Court addressDefendant address Postcode Court typedate of birth Court clerkCurrent status TRIAL Court no* DEfendant no* Trial no Trial date Judge Charge Defence lawyer Prosecutor

Simple steps in entity modelling 1.List the possible entities. 2.Check that the entities listed are really entities. 3.Draw a basic entity model, with boxes around the entities. 4.Identify which entities are related. Draw a line between them. 5.Give the relationship a name in each direction.

Simple steps in entity modelling 6 Identify the relationship type. (1:1, 1:M or M:N) 7 Resolve any one-to-one relationships. 8 Resolve any many-to-many relationships. Add in link entities. 9 Add the attributes, including primary keys and foreign keys.

Resolution and Naming the relationships

Entity Modeling The systems analyst will need to communicate regularly with the user during this process in order to check that all necessary entities have been identified and that the relationships are accurate.

CASE: Entity modelling at Swillbuckets 1.List the possible entities. ARTISTE EVENT MEMEBERDISH BREWERYDRINKRECIPE SUPPLIERMEDIA 1.An entity must be important to the organization. 2.An entity must have at least one attribute 3.An entity must occur more than once 4.Each entity occurrence must be uniquely identifiable

CASE: Entity modelling at Swillbuckets 3. Draw the basic entity model there may be more entities to come when we show the user our entity model.

CASE: Entity modelling at Swillbuckets 4 Identify the relationships. ARTISTEs attend EVENTsMEMBERs attend EVENTsEVENTs provide DISHesDISHes require RECIPEsSUPPLIERs supply DRINKsMEDIA cover EVENTs

CASE: Entity modelling at Swillbuckets 4 Identify the relationships.

CASE: Entity modelling at Swillbuckets 5 Give the relationships a name, in each direction!!

CASE: Entity modelling at Swillbuckets 6 Identify the type of relationship. each EVENT will only ever offer one dish (in order to keep Freddo Smitho just the right side of sane) and each dish will be offered at many EVENTs. each RECIPE could require many FOOD ORDERs and each FOOD ORDER could be required for many RECIPES.

CASE: Entity modelling at Swillbuckets 7 Resolve any one-to-one relationships.

CASE: Entity modelling at Swillbuckets 8 Resolve any many-to-many relationships. find a link entity

CASE: Entity modelling at Swillbuckets 8 Resolve any many-to- many relationships.

CASE: Entity modelling at Swillbuckets 9 Add the attributes and keys. Primary keys are underlined. Attribute names have been condensed into one word with no spaces – – spaces can cause problems in some systems. Capital letters are used to denote a new word in the name. An asterisk denotes a foreign key – – an attribute which acts as a link to another entity by appearing in both. It’s a primary key in one entity but not in the other. Address attributes are shown as just one attribute, but in reality they are – usually made up of a number of attributes e.g. Street, Town, County, Postcode.

CASE: Entity modelling at Swillbuckets

Physical data store/entity cross-reference 1 List all the data stores, by checking the current physical DFD M1 Membership shoebox M2 Artiste shoebox M3 Supplier shoebox M4 Events folder M5 Recipe book

Physical data store/entity cross-reference 2 Cross reference each data store with corresponding entities from the entity model. A data store can have more than one entity

Physical data store/entity cross-reference 3 Check that each data store has at least one entity. 4 Check that each entity is stored in a data store. We note that the entities EVENT TICKET and MEDIA do not have data stores. The fact that EVENT TICKET does not have a data store is expected.