Entity-Relationship (E-R) Diagrams

Slides:



Advertisements
Similar presentations
Normalisation Ensuring data integrity in database design 1.
Advertisements

Concepts of Database Management Sixth Edition
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Entity-Relationship Model and Diagrams (continued)
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Concepts of Database Management Seventh Edition
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
Database Design Concepts
Normalization. Introduction Badly structured tables, that contains redundant data, may suffer from Update anomalies : Insertions Deletions Modification.
Week 6 Lecture Normalization
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
The REA Model. The REA model provides structure for developing an accounting database It helps to identify It helps to The REA Model.
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
Concepts and Terminology Introduction to Database.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
PLUG IT IN 3 Fundamentals of Relational Database Operations.
CORE 2: Information systems and Databases NORMALISING DATABASES.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
1 A Guide to MySQL 2 Database Design Fundamentals.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Access Review. Access Access is a database application A database is a collection of records and files organized for a particular purpose Access supports.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
Description and exemplification of entity-relationship modelling.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
 An entity-relationship diagram (ERD) is a specialized graphic that illustrates the interrelationships between entities in a database.
System and data modeling tools Revision. Schemas A schema shows the organisational structure of a database. It should show the entities (the tables in.
ENTITY RELATIONSHIP DIAGRAM ENTITY RELATIONSHIP DIAGRAM IS A SPECIALIZED GRAPHIC THAT ILLUSTRATES THE INTERRELATIONSHIPS BETWEEN ENTITIES IN A DATABASE.
Relational Theory and Design
SQL LANGUAGE and Relational Data Model TUTORIAL Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
©NIIT Normalizing and Denormalizing Data Lesson 2B / Slide 1 of 18 Objectives In this section, you will learn to: Describe the Top-down and Bottom-up approach.
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
9/23/2012ISC329 Isabelle Bichindaritz1 Normalization.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Entity-Relationship Diagram Presentation Gianna-lee Williams 6AQ Ms. Anderson.
Entity relationship diagram Name: Quian Crosby Form:6AQ Subject: Information Technology Teacher: Ms. D. Anderson.
Done By : Gillian Swaby. Objectives: 1. What is an Entity-Relationship Diagram? 2.What are the symbols used in ERD? Explain each. 3. What is a one- to-
What is an Entity Relationship Diagram?. An Entity Relationship Diagram is a graphic that is speacialized to illustrate or give examples of the inter.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Logical Database Design and the Relational Model.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
Microsoft Access 2010 Chapter 11 Database Design.
Databases Database Normalisation. Learning Objectives Design simple relational databases to the third normal form (3NF).
Normalization. Overview Earliest  formalized database design technique and at one time was the starting point for logical database design. Today  is.
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
5 1 Normalization of Database Tables. 5 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures to minimize.
Moya messam.  Definition: An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
NORMALISATION OF DATABASES. WHAT IS NORMALISATION? Normalisation is used because Databases need to avoid have redundant data, which makes it inefficient.
Databases – Exam questions
Entity-Relationship Model and Diagrams (continued)
Entity relationship diagrams
Database Normalisation
Lesson Objectives Aims You should know about: 1.3.2:
Presentation transcript:

Entity-Relationship (E-R) Diagrams Databases Entity-Relationship (E-R) Diagrams

Learning Objectives Draw entity-relationship (E-R) diagrams to represent data models diagrammatically. Design simple relational databases to the third normal form (3NF).

Data Modelling terms Entity: Attribute Relationship An object, person, event or ‘thing’ a data model requires data to be recorded about. Attribute A property / characteristic of an entity. A field (column) in a database table. Relationship An association or link between two entities.

Entity-Relationship (E-R) Diagrams (Entity or data model) A diagrammatic means of showing a data model / database. Illustrates the relationships between entities in the database and attributes of each entity.

Example Data Model Every student in a school belongs to a form. Every student achieves many exam grades. Every form has a form tutor and all the form tutors are members of the teaching body.

Entities & their relationships in this example data model STUDENT Many students can be in a FORM. Many STUDENTs can achieve many grades. GRADE Many GRADEs can be achieved by many STUDENTs. FORM One form for many students (students cannot be members of more than one form). A FORM can only have one TUTOR. TUTOR A TUTOR can only be in one FORM. Many TUTORS can be in the teaching body. TEACHING BODY There is only one TEACHING BODY(teaching body) for all TUTORs. N.B. All entities are written in the singular.

Symbols for relationships between entities one-to-one represented by one-to-many represented by many-to-one represented by many-to-many represented by

has responsibility for ER diagram for example data model (not in 3NF – see next slides for an explanation) has FORM GRADE STUDENT achieved by members of achieves has has responsibility for TEACHING BODY contains TUTOR is a member

Forming Relationships between Entities Try many to many. If that doesn’t work then try many to one. If that doesn’t work try one to many. If that doesn’t work then it has to be one to one. Note: I suggest this order of attempt as it helps avoid problems.

Database Normalization A technique for designing relational database tables to minimize duplication of information which can lead to inconsistencies, leading to a loss of data integrity. Third Normal Form (3NF) eradicates (or at least minimizes) any data duplication.

To change an ER diagram into Third Normalised Form (3NF) Example No many-to-many relationships. Removed by placing a link in between which has a many to one relationship to each of the other two entities. has FORM GRADE STUDENT achieved by members of achieves has One-to-one relationships should be removed (but not all mark schemes appear to force this but I suggest you always do so anyway). Removed by removing one of the entities and joining it to the entity that is left. has responsibility for TEACHING BODY contains TUTOR is a member

ER diagram for example data model in 3NF LINK achieves STUDENT/ GRADE GRADE STUDENT members of achieved by has responsibility for FORM_TUTOR Joint entity is a member has TEACHING BODY

Third Normalised Form (3NF) No many-to-many relationships. Removed by placing a link in between which has a many to one relationship to each of the other two entities. One-to-one relationships should be removed (but not all mark schemes appear to force this but I suggest you always do so anyway). Removed by removing one of the entities and joining it to the entity that is left.

Plenary A sports club runs a number of sports teams. Each team is made up of a number of members of the club and each member may play for more than one team. Each team has a number of coaches, but the coach’s job is so time consuming that each coach can only coach one team. Represent the above information on an entity relation (ER) diagram, in 3rd normal form, stating the primary key for each entity. You can either draw this on paper or use the relationship images and text boxes on the next slide.

Plenary