Tutorial 2 Data Modelling. 3 Terminology & Notation(1) An entity is an object about which the system needs to hold information –Customer, Student, Course.

Slides:



Advertisements
Similar presentations
Banking Business Scenario
Advertisements

Chapter 2.1 V3.1 Napier University Dr Gordon Russell
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
Entity Relationship Diagrams Basic Elements and Rules.
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
Data Modeling with ERD ISYS 363. Entity-Relationship Diagram An entity is a “thing” in the real world, such as a person, place, event for which we intend.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Entity-Relationship Model and Diagrams (continued)
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
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 Chapter 2. Goal of all Information Systems  To add value –Reduce costs –Increase sales or revenue –Provide a competitive advantage.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Lecture 3 :Database Analysis and Design (II)
Entity/Relationship Modelling
Data Modeling and Entity- Relationship Model I IST2101.
Entity Relationships. Relationships Relationships exist between entities The type of relationship is entirely dependent on the business rules The business.
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Entity-Relationship Modeling I The cautious seldom err. Confucius.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Database Design Concepts
Business Process Modeling
CSE 441: Systems Analysis & Design
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Conceptual Design Lecture - 2 Database Development.
Conceptual Design Revision Database Development. Basic constructs of the Entity Relationship Model Entity  Representation of an Entity on an ER diagram.
Chapter 5 Entity–Relationship Modeling
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.
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
Concepts and Terminology Introduction to Database.
G057 - Lecture 02 Introduction To Database System Concepts Mr C Johnston ICT Teacher
CSC 240 (Blum)1 Introduction to Database. CSC 240 (Blum)2 Data versus Information When people distinguish between data and information, –Data is simply.
© Relational Databases. © Entities Data is stored in tables. Each table is concerned with one entity An entity is a.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Entity – Relationship Model (E-R Model)
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
44220: Database Design & Implementation Conceptual Data Modelling Ian Perry Room: C49 Tel Ext.: 7287
Lesson 4: The Relational Model. Lesson Overview Database Design Entities Relationships E-R Diagrams.
INTRODUCTION TO DATA MODELING CS 260 Database Systems.
Dr Gordon Russell, Napier University Data Analysis 1 - V2.0 1 Data Analysis 1 Unit 2.1.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Information Modelling and the logical data structure.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Data Modeling and Entity-Relationship Model I
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
IT 5433 LM2 ER & EER Model. Learning Objectives: Explain importance of data modeling Define and use the entity-relationship model Define E/R terms Describe.
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.
Data Model Basic Building Blocks
Database Design – Lecture 4
Implementation of Entity Relationships
Entity-Relationship Model and Diagrams (continued)
IST 318 Database Administration
Presentation transcript:

Tutorial 2 Data Modelling

3 Terminology & Notation(1) An entity is an object about which the system needs to hold information –Customer, Student, Course –often represent things in real world An occurrence of an entity describes, for example, one particular customer or product The attributes of an entity are the data items that make up the entity –StudentName, StudentAddress, –only record attributes that are of significance to the system

Terminology & Notation(2) The value of an attribute is the value of that attribute for a particular entity occurrence –John Browne is value of StudentName attribute. A key to an entity is an attribute or set of attributes that uniquely identify each occurrence of the entity. –the attribute StudentNo is key to entity Student as Name will not necessarily uniquely identify a student.

Exercise Read the Football Competition Case Study given to you. Name the entities about which you think the council needs to keep data. Which of these things are entities? Attributes? Values?

Terminology & Notation(3) Candidate keys are any possible keys for a entity –the attributes Name and DateOfBirth is a candidate key for the entity Student. A primary key is the candidate key that is decided to be used as the key. Primary keys should have the following properties –must be uniques for each occurrence of an entity –must always have a value –e.g. students are always assigned a number as soon as they register –should not contain an attribute that is likely to change –e.g. using name or telephone number

Terminology & Notation(4) A foreign key is an attribute in a entity which is a primary key in another entity –e.g. Student and Course entities Foreign keys act as links or navigational routes between entities –e.g. who is the course director for student A

Exercise Look at the entities you have chosen in the Football competition. Can you see any primary keys? Can you see any foreign keys?

Relationships A relationship is a link between two entities which is significant for the system –e.g. Customer ‘places’ an Order –relationships trace the access from one entity to another e.g. find the orders placed by a customer –Relationships are implemented using foreign keys

5 Relationships Relationships are named by giving them a label –there are two relationships in each link –e.g. Course “is attended by” Students Student “registers for” a Course

Relationship cardinality/degree describes the type of relationship – I.e. how many of each entity is involved in the relationship –One to one –One to many –N to many –Many to many –Reflexive

one-to-one relationship any occurrence of the first entity is related to one and only one occurrence of the second entity –e.g. Husband and Wife one to many relationship - any occurrence of the first entity is related to one or more occurrences of the second entity –e.g. Doctor and Patient Course and Student

many to many relationship - two entities are related to each other by many to many relationships –e.g. Musician and Concert Course and Lecturer –N to many relationship –E.g. game and team, match and player

reflexive relationship - an occurrence of an entity is related to other occurrences of the same entity –e.g. “manages” relationship “part” relationship

6 A relationship between two entities is optional if an occurrence of the first entity can exist without being associated with an occurrence of the second entity –e.g. Course and Student A relationship is mandatory if every occurrence of the first entity must participate in a relationship with an occurrence of the second entity –e.g. Student and Course Optionality

7 Characteristics of a good data model –Data items should be grouped in logical groups e.g customer’s name, address, phone, etc.. –Each entity should have a unique primary key –There should be no redundant data data items that are never used by the system same data items in different entities data in one place can be derived from data held elsewhere Two ways of getting there - E-R modelling and normalisation Data Modelling - continued