SlideShare uma empresa Scribd logo
1 de 18
SE-381
Software Engineering
BEIT-V
Lecture # 19
(Entity Relationship and Attribute
Analysis & Data Modelling)
Data Modeling
– Data Modeling, Semantic Modeling, Entity Relationship
Diagrams, Entity Relationship Attribute Modeling, Object Data
Classes etc are various names for the same
technique, commonly known as Data Modeling.
– Different authors have used slightly different notations to
represent Entities, Relationships and Object Data Classes
– Notations used by Chen 1976 (the founder of the technique)
and Baynon-Davies 1989 are followed. Some unlearning and re-
learning may be required to those who have already learnt and
used it in their Data Bases course
– Data Modeling supplements the Process Modeling technique
and helps in identifying the data structures on which the system
is to be built
Entity Relationship Modelling
• One of the Oldest techniques used in Database
and Information Systems Design, proposed by
Chen 1976
• Representation of ‘Real World’ in terms of
Entities, Attributes and Relationships
between the Entities
An Entity is a thing which the enterprise recognizes as being
capable of an independent existence and which can be uniquely
identified (Howe, 1983)
An Entity may be an Object, concept or an event having
characteristics of independent existence and unique
identification, and should have data items or attributes
associated with it.
An Entity together with its attributes define an Entity Type of which
there may be many instances. Similarly, a Relationship Type
may have many instances, where occurrences of allied Entities
are participating
Relationship
A Relationship is
an association between two or more entities. (Howe, 1983)
The common attribute in two Entities, indicates they have some
relationship.
For N entities, there could be N(N-1)/2 possible relations, as every
Entity being part of the systems will be related to every other
entity so only direct relationships between the Entities are
considered
Parent Child School
GoesSponsors
Parent and Child and Child and School have direct
relationships, but the relationship between Parent and School is
indirect or derived relationship which should not be considered
Cardinality or Degree of the Relationship
• It is number of instances of the respective entity type
participating in the relationship.
• It can be one-to-one (1:1), one-to-many (1:M) or many-to-many
(M:N)
• Crow-Foot notation used to represent cardinality
Class Student
CourseStudent
Cheque PaymentBrings
Consists_of
Read
Membership Class or Optionality
• Membership is Mandatory if every occurrence of the entity
participates in the relationship
• Membership is Optional if some of the instances of respective
entity do exist but don’t participate in the relationship, or some
occurrences of the entity can exist independently
– Every Employee must be employed within a Department
– A Department may exist without any (full-time) Employee
• For Mandatory Entity we put in ‘a filled dot’ within the Entity, and
for Optional Entity it is put outside on the Relationship
Cheque PaymentBrings
Employee DeprttWorks
Cheque PaymentBrings
Assignment Rules
1:1 Relationship
– Membership Mandatory on Both Entity Types
– Membership Mandatory for only one Entity Type
Cheque PaymentBrings
Single table is needed
Cheque (Cheque_no, date, sign, amount, … , Payment_Id, …)
Employee CarUses
Two tables needed, post the identifier of Optional into Mandatory
Employee (Employee_no, Name, Designation, …)
Car (Reg_no, Model, Capacity, …., Employee_no )
Assignment Rules
– Membership Optional for both Entity Types
Employee CarUses
Three tables needed, one for each Entity and one for Relationship
Employee (Employee_no, Name, Designation, …)
Car (Reg_No, Model, Capacity, …. )
Uses ( Employee_no, Reg_no, …., Mileage_used_by)
Assignment Rules
1:M Relationship
– Membership of many ‘Entity’ is Mandatory,
Ward PatientContains
Two tables needed
Ward (Ward_no, Location, type, …)
Patient ( Patient_Id,, Name, date_of_Admiss, …, Ward_no)
– Membership of many ‘Entity’ is also Optional
Ward PatientContains
Three tables needed
Ward (Ward_no, Location, type, …)
Patient ( Patient_Id,, Name, date_of_Admiss, …)
Contains (Patient_no, Ward_no)
Assignment Rules
M:N Relationship
– Will need Three Tables irrespective of membership class
Teacher StudentTutors
Three tables needed
Teacher (Teacher_name, Subject, Qualification …)
Student ( Reg_no,, Name, date_of_Admiss, Semester …)
Tutors (Teacher_name, Reg_no)
Drawing of E-R Diagrams
Following steps be followed to draw E-R Diagrams
1. Identify Entities from the problem definition
2. Investigate and record their inter-relationships
3. Draw E-R diagram showing Entities and Relationships
4. Indicate Degree and Membership Class of each Relationship
5. Validate the ERD against the System Requirements
6. Rationalize
7. Revalidate
8. Using Assignment Rules, convert the diagram into set of fully
normalized tables
ERD - A Case Study
Design an appropriate information system for the patients’
appointments and operations activities of a large general
hospital. Initial analysis provide the following brief
description of the existing manual system:
• Patients are dealt with by an appointment system
• Patients must make an appointment for a clinic session held at
one of the hospital’s clinics
• Doctors are allocated one or more appointments within a clinic
session, but only one doctor will be present at each
appointment
• Operations are scheduled and allocated to one of a number of
theatre sessions held in the hospital’s operating theatres, each
doctor may perform a number of given operations on patients
1. First identify the set of Entities from the above description
Entities of the System
HOSPITAL
CLINIC
CLINIC-SESSION
APPOINTMENT
PATIENT
DOCTOR
OPERATION
OPERATING-THEATRE
THEATRE-SESSION
2. Investigate and record Inter-relationships
How many total relations are possible, Identify the direct Relations
3. Draw E-R diagram showing Entities and Relationships
First-Pass ERD
Eliminate the Indirect Relationships
4. Indicate and draw the Optionality of the relationships
Second-Pass ERD
Set of Tables Generated
References
1. NIIT (2005); System Analysis and Design for
Software Engineers; Printice-Hall of India, New
Delhi
2. Paul Beynon-Davies (1989); Information
Systems Development, Macmillan, London, UK;
Ch-5 Entity – Relationship Diagrams pp:38-54
3. P. P-S Chen (1976); the Entity-Relationship
Model – Toward a Unified View of Data; ACM
Transactions on Database Systems 1, pp:9-36
4. Any book on Data Bases or Data Modeling

Mais conteúdo relacionado

Mais procurados

SE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and DesignSE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and DesignAmr E. Mohamed
 
CLD Development and Coaching Workshop
CLD Development and Coaching WorkshopCLD Development and Coaching Workshop
CLD Development and Coaching WorkshopJay Hays
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMAmr E. Mohamed
 
Feature selection on boolean symbolic objects
Feature selection on boolean symbolic objectsFeature selection on boolean symbolic objects
Feature selection on boolean symbolic objectsijcsity
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentRishabh Soni
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologiesnaina-rani
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modelingShahid Riaz
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER DiagramsAdri Jovin
 
Lecture note05 slides
Lecture note05 slidesLecture note05 slides
Lecture note05 slidesSten99String
 
Mba2216 week 11 data analysis part 03 appendix
Mba2216 week 11 data analysis part 03 appendixMba2216 week 11 data analysis part 03 appendix
Mba2216 week 11 data analysis part 03 appendixStephen Ong
 
An experimental study of feature
An experimental study of featureAn experimental study of feature
An experimental study of featureijscai
 

Mais procurados (16)

SE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and DesignSE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and Design
 
CLD Development and Coaching Workshop
CLD Development and Coaching WorkshopCLD Development and Coaching Workshop
CLD Development and Coaching Workshop
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAM
 
SECh78
SECh78SECh78
SECh78
 
05 use case
05 use case05 use case
05 use case
 
Feature selection on boolean symbolic objects
Feature selection on boolean symbolic objectsFeature selection on boolean symbolic objects
Feature selection on boolean symbolic objects
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modeling
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
 
Lecture note05 slides
Lecture note05 slidesLecture note05 slides
Lecture note05 slides
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Uml use casediagrams assignment help
Uml use casediagrams assignment helpUml use casediagrams assignment help
Uml use casediagrams assignment help
 
Mba2216 week 11 data analysis part 03 appendix
Mba2216 week 11 data analysis part 03 appendixMba2216 week 11 data analysis part 03 appendix
Mba2216 week 11 data analysis part 03 appendix
 
An experimental study of feature
An experimental study of featureAn experimental study of feature
An experimental study of feature
 
Crc cards
Crc cardsCrc cards
Crc cards
 

Semelhante a Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling

Semelhante a Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling (20)

Database design
Database designDatabase design
Database design
 
Data Models
Data ModelsData Models
Data Models
 
Conceptual Data Modeling
Conceptual Data ModelingConceptual Data Modeling
Conceptual Data Modeling
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data Model
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
ICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdfICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdf
 
ERD.pdf
ERD.pdfERD.pdf
ERD.pdf
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Entity relationship-diagrams
Entity relationship-diagramsEntity relationship-diagrams
Entity relationship-diagrams
 
DBMS_unit2_Notes.pdf
DBMS_unit2_Notes.pdfDBMS_unit2_Notes.pdf
DBMS_unit2_Notes.pdf
 
chapter 3-Data Modelling using Entity Relationship .pdf
chapter 3-Data Modelling using Entity Relationship .pdfchapter 3-Data Modelling using Entity Relationship .pdf
chapter 3-Data Modelling using Entity Relationship .pdf
 
D I T211 Chapter 3
D I T211    Chapter 3D I T211    Chapter 3
D I T211 Chapter 3
 
DATA MODELING.pptx
DATA MODELING.pptxDATA MODELING.pptx
DATA MODELING.pptx
 
Use analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptxUse analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptx
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
D018212428
D018212428D018212428
D018212428
 
Database Management System
Database Management System Database Management System
Database Management System
 
Work System Perspective on Service, Service Systems, IT Services, and Service...
Work System Perspective on Service, Service Systems, IT Services, and Service...Work System Perspective on Service, Service Systems, IT Services, and Service...
Work System Perspective on Service, Service Systems, IT Services, and Service...
 
uml.pptx
uml.pptxuml.pptx
uml.pptx
 

Mais de babak danyal

Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Socketsbabak danyal
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streamsbabak danyal
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Javababak danyal
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the desbabak danyal
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network securitybabak danyal
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systemsbabak danyal
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systemsbabak danyal
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systemsbabak danyal
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systemsbabak danyal
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systemsbabak danyal
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systemsbabak danyal
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systemsbabak danyal
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systemsbabak danyal
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signababak danyal
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systemsbabak danyal
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniquesbabak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 

Mais de babak danyal (20)

applist
applistapplist
applist
 
Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Sockets
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Java
 
Tcp sockets
Tcp socketsTcp sockets
Tcp sockets
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the des
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systems
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systems
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systems
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systems
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systems
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systems
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systems
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systems
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signa
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systems
 
Lecture9
Lecture9Lecture9
Lecture9
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 

Último

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Último (20)

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling

  • 1. SE-381 Software Engineering BEIT-V Lecture # 19 (Entity Relationship and Attribute Analysis & Data Modelling)
  • 2. Data Modeling – Data Modeling, Semantic Modeling, Entity Relationship Diagrams, Entity Relationship Attribute Modeling, Object Data Classes etc are various names for the same technique, commonly known as Data Modeling. – Different authors have used slightly different notations to represent Entities, Relationships and Object Data Classes – Notations used by Chen 1976 (the founder of the technique) and Baynon-Davies 1989 are followed. Some unlearning and re- learning may be required to those who have already learnt and used it in their Data Bases course – Data Modeling supplements the Process Modeling technique and helps in identifying the data structures on which the system is to be built
  • 3. Entity Relationship Modelling • One of the Oldest techniques used in Database and Information Systems Design, proposed by Chen 1976 • Representation of ‘Real World’ in terms of Entities, Attributes and Relationships between the Entities An Entity is a thing which the enterprise recognizes as being capable of an independent existence and which can be uniquely identified (Howe, 1983) An Entity may be an Object, concept or an event having characteristics of independent existence and unique identification, and should have data items or attributes associated with it. An Entity together with its attributes define an Entity Type of which there may be many instances. Similarly, a Relationship Type may have many instances, where occurrences of allied Entities are participating
  • 4. Relationship A Relationship is an association between two or more entities. (Howe, 1983) The common attribute in two Entities, indicates they have some relationship. For N entities, there could be N(N-1)/2 possible relations, as every Entity being part of the systems will be related to every other entity so only direct relationships between the Entities are considered Parent Child School GoesSponsors Parent and Child and Child and School have direct relationships, but the relationship between Parent and School is indirect or derived relationship which should not be considered
  • 5. Cardinality or Degree of the Relationship • It is number of instances of the respective entity type participating in the relationship. • It can be one-to-one (1:1), one-to-many (1:M) or many-to-many (M:N) • Crow-Foot notation used to represent cardinality Class Student CourseStudent Cheque PaymentBrings Consists_of Read
  • 6. Membership Class or Optionality • Membership is Mandatory if every occurrence of the entity participates in the relationship • Membership is Optional if some of the instances of respective entity do exist but don’t participate in the relationship, or some occurrences of the entity can exist independently – Every Employee must be employed within a Department – A Department may exist without any (full-time) Employee • For Mandatory Entity we put in ‘a filled dot’ within the Entity, and for Optional Entity it is put outside on the Relationship Cheque PaymentBrings Employee DeprttWorks Cheque PaymentBrings
  • 7. Assignment Rules 1:1 Relationship – Membership Mandatory on Both Entity Types – Membership Mandatory for only one Entity Type Cheque PaymentBrings Single table is needed Cheque (Cheque_no, date, sign, amount, … , Payment_Id, …) Employee CarUses Two tables needed, post the identifier of Optional into Mandatory Employee (Employee_no, Name, Designation, …) Car (Reg_no, Model, Capacity, …., Employee_no )
  • 8. Assignment Rules – Membership Optional for both Entity Types Employee CarUses Three tables needed, one for each Entity and one for Relationship Employee (Employee_no, Name, Designation, …) Car (Reg_No, Model, Capacity, …. ) Uses ( Employee_no, Reg_no, …., Mileage_used_by)
  • 9. Assignment Rules 1:M Relationship – Membership of many ‘Entity’ is Mandatory, Ward PatientContains Two tables needed Ward (Ward_no, Location, type, …) Patient ( Patient_Id,, Name, date_of_Admiss, …, Ward_no) – Membership of many ‘Entity’ is also Optional Ward PatientContains Three tables needed Ward (Ward_no, Location, type, …) Patient ( Patient_Id,, Name, date_of_Admiss, …) Contains (Patient_no, Ward_no)
  • 10. Assignment Rules M:N Relationship – Will need Three Tables irrespective of membership class Teacher StudentTutors Three tables needed Teacher (Teacher_name, Subject, Qualification …) Student ( Reg_no,, Name, date_of_Admiss, Semester …) Tutors (Teacher_name, Reg_no)
  • 11. Drawing of E-R Diagrams Following steps be followed to draw E-R Diagrams 1. Identify Entities from the problem definition 2. Investigate and record their inter-relationships 3. Draw E-R diagram showing Entities and Relationships 4. Indicate Degree and Membership Class of each Relationship 5. Validate the ERD against the System Requirements 6. Rationalize 7. Revalidate 8. Using Assignment Rules, convert the diagram into set of fully normalized tables
  • 12. ERD - A Case Study Design an appropriate information system for the patients’ appointments and operations activities of a large general hospital. Initial analysis provide the following brief description of the existing manual system: • Patients are dealt with by an appointment system • Patients must make an appointment for a clinic session held at one of the hospital’s clinics • Doctors are allocated one or more appointments within a clinic session, but only one doctor will be present at each appointment • Operations are scheduled and allocated to one of a number of theatre sessions held in the hospital’s operating theatres, each doctor may perform a number of given operations on patients 1. First identify the set of Entities from the above description
  • 13. Entities of the System HOSPITAL CLINIC CLINIC-SESSION APPOINTMENT PATIENT DOCTOR OPERATION OPERATING-THEATRE THEATRE-SESSION 2. Investigate and record Inter-relationships How many total relations are possible, Identify the direct Relations 3. Draw E-R diagram showing Entities and Relationships
  • 15. Eliminate the Indirect Relationships 4. Indicate and draw the Optionality of the relationships
  • 17. Set of Tables Generated
  • 18. References 1. NIIT (2005); System Analysis and Design for Software Engineers; Printice-Hall of India, New Delhi 2. Paul Beynon-Davies (1989); Information Systems Development, Macmillan, London, UK; Ch-5 Entity – Relationship Diagrams pp:38-54 3. P. P-S Chen (1976); the Entity-Relationship Model – Toward a Unified View of Data; ACM Transactions on Database Systems 1, pp:9-36 4. Any book on Data Bases or Data Modeling