Conceptual Modelling Entity Relationship Model Overview Entities, Attributes and Relationship modelling Generating a Relational Database for an EAR model.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

More Diagramming & Practice with Relationship Modeling
the Entity-Relationship (ER) Model
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Database Systems: Design, Implementation, and Management Tenth Edition
Conceptual Data Modeling: ER
IT420: Database Management and Organization
Entity-Relation Modeling Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
ISMT221 Information Systems Analysis and Design Entity-Relationship Diagram Lab 4 Tony Tam.
Data, schemas and Applications IFIEKG Staff Chris Wallace – module leader and tutor Praminda Calib-Soley - tutor David Wyatt – tutor.
System Analysis - Data Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Week 23 - Revision1 Week 23 Revision DSA. Week 23 - Revision2 Agenda Section A: Multiple choice Section B: Problem-oriented questions Topics for revision.
Agenda for Week 1/31 & 2/2 Learn about database design
Entity-Relationship Model and Diagrams (continued)
Data Modelling. EAR model This modelling language allows a very small vocabulary: Just as English has nouns, verbs, adjectives, pronouns.., EAR models.
Physical, Logical, Conceptual DSA Lecture
Physical, Logical, Conceptual DSA Lecture
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
“DOK 322 DBMS” Y.T. Database Design Hacettepe University Department of Information Management DOK 322: Database Management Systems.
Systems Analysis and Design in a Changing World, 6th Edition
ERM to SQL. Abstraction Layers Conceptual –What data is held An Image and its meta-data Entity-Relationship model (ERM) Logical –How data is organised.
Entity/Relationship Modelling
APPENDIX C DESIGNING DATABASES
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
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.
Fall CIS 764 Database Systems Engineering L3: Two Assignments Relating to J2EE.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Web Application Development. Define ER model in QSEE Generate SQL Create Database mySQL Write Script to use TableEditor class Process to create A simple.
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Concepts and Terminology Introduction to Database.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
Information Systems & Databases 2.2) Organisation methods.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
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.
IT Applications Theory Slideshows By Mark Kelly Vceit.com Last modified : 6 Dec 2013 Databases II: Structure, naming, data types, data formats.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
 What is an Entity-Relationship Diagram? An entity-relationship diagram (ERD) is a snapshot of data structures. ERDs show entities in a database and.
+ Information Systems and Databases 2.2 Organisation.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 2 Introduction to a First Course in Database Systems.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Advanced Web 2012 Lecture 3 Sean Costain What is a Database? Sean Costain 2012 A database is a structured way of dealing with structured information.
Relational Databases. Relational database  data stored in tables  must put data into the correct tables  define relationship between tables  primary.
IT Applications Theory Slideshows Databases II: Structure, Naming, data types, data formats.
Database Basics BCIS 3680 Enterprise Programming.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
6.1 © 2007 by Prentice Hall Chapter 6 (Laudon & Laudon) Foundations of Business Intelligence: Databases and Information Management.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
Tutorial on E-R Diagrams 1.Learn basic terminology and symbols –See next four slides; refer to as needed in steps 2-4 below 2.Learn the basics of E-R diagramming.
Introduction to Database Programming with Python Gary Stewart
Data Modeling Using the Entity- Relationship (ER) Model
DataBase Logic in Business Applications
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
CSIS 115 Database Design and Applications for Business
Entity-Relationship Modelling
CS 174: Server-Side Web Programming February 12 Class Meeting
ERD’s REVIEW DBS201.
Entity-Relationship Modelling
Data Modeling for Database Design 2
Database Design Hacettepe University
ICT Database Lesson 2 Designing a Database.
Presentation transcript:

Conceptual Modelling Entity Relationship Model

Overview Entities, Attributes and Relationship modelling Generating a Relational Database for an EAR model Tutorial - Using the QSEE case tool

Abstraction Layers Conceptual –What data is held An Image and its meta-data Entity-Relationship model (ERM) Logical –How data is organised in storage Block and Directory structure Tables, keys Physical –How data is stored in bits JPEG as a stream of bytes A Database as files and records stored in a DBMS-specific format Abstraction Realisation (Refinement Reification) (Reverse Engineering) (Engineering, Model-Driven development

ER Model This modelling language allows a very small vocabulary: Just as English has nouns, verbs, adjectives, pronouns.. ER models have only 3 core concepts –Attribute – a simple, atomic data item like a date, a name, a number [also called Property or Field] –Entity – a group of attributes which are all related to the same thing [also called Entity Type or Class] –Relationship – a relationship between Entities.

Entities and Instances Employee SMITH Employee ALLEN Instances (entity instances, objects) Entity (entity type, class) isA Employee Data Schema

MMS application A simple web application which allows an account holder to send a photo from a mobile phone to a web site to be added to a photo gallery Server Technology –Data storage in MySQL relational database –Scripting language : PHP

mimedecode.php MMS mailbox mime2db.php MySql database php scripts mms1 index.php getpage.php getimage.php MMS Photo Gallery Documentation Originating phoneno

MMS Photo : EAR diagram Entity Attribute Relationship Primary key Data Type Each Member has created many Photos Diagram generated by QSEE Each Photo created by exactly one Member Or none

Other conceptual models ERM is not the only conceptual model in use –Object-role model (ORM) drop the distinction between attributes and relationships – its all relationships. –Single level models (RDF) drop the distinction between type and instance.

Case Tool - QSEEQSEE is a free download for individual use is available in the lab (older version  ) enables a wide range of diagram types to be created –UML –Data flow diagrams … –Entity-relationship diagram With generation of SQL for creating a database (with some fixes  - use Perl script to clean up)

Entity (type) Typically represents a type of thing –person, department, photo with properties of interest Similar to a Class in Object-Orientation (but no methods) Has a name –Name becomes the name of the table in a database –I prefer a singular noun – Employee, Department. The table will contain a varying number of entity instances but the Entity Type is singular Has attributes or properties (which might become fields or columns in a database) Entity instances are related (linked) to other entity instances – relationships Has an Annotation (in QSEE) –Text to describe the scope of this type (what things can be one of these), the meaning and usage, a typical example.

Attribute Name –Must be unique within the Entity –Avoid SQL reserved words Type (data type) –SQL provides a set of available data types – essential ones are: integer – a whole number numeric – number with decimal part character – fixed length string varchar – variable length string date – hold dates like blob – a very large field – such as a JPEG image Primary Key –An attribute(or several) which uniquely identify each instance of the entity within the set of all instances.

Relationships in QSEE Name –Names the relationship There can be multiple relationships between the same entity types e.g, –Employee –Department »Works in »Is manager of »Has worked in »Must never work in Relationship ends (roles) can be named too – I prefer to use this than relationship names which need a direction Cardinality –from source (start) to destination (end) Optional Identifier –For 1-M, does the source (partly) identify the destination Annotation –Text describing the meaning of this relationship

Relationship CARDINALITY M1 P4P5P1 M2 P3 P7 M4 One-one One-many Many-many MemberPhoto 1..n

It is hard to get this notation the right way round. –Always read it both ways Every X is related to how many Y’s? Every Y is related to how many X’s?

Relationship OPTIONALITY M1 P4P5P1 M2 P3 P7 M3 One-many MemberPhoto

QSEE

Class Exercise - KML A Folder has a name and contains zero, one or more PlaceMarks and some Styles A Placemark has attributes of : –A name –A description –A position defined by its longitude, latitude and Altitude, each represented by a signed decimal number A Style defines the appearance of a placemark – the symbol to show, the size, the foreground and background colour. Each Placemark has a Style Draw an ERM for this simplified description of a KML Folder.