SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
Lecturer:
M.Zalmai “Rahmani”
rahmani.zalmai@gmail.com
Advanced Database Systems
Conceptual Modeling of Data
Lecture 02
Azma Institute
Database Department
Database Design Process
high level specs
conceptual schema
logical schema
(in DBMS model)
miniworld
conceptual design
logical design
physical design
functional analysis
application design
transaction implementation
Data requirementsfunctional requirements
application programs Physical schema
Requirement Analysis
Functional Design Database Design
Requirements of a Conceptual
Data Model
Expressiveness: should be expressive enough to allow modeling of
different types of relationships, objects and constraints of the miniworld.
Simplicity: non-specialists should be able to understand
Diagrammatic Representation: to ease interpretation
Formality: There should be no ambiguity in the specification
Entiities and Entity Sets
Entities
• nouns, ‘things’ in the world.
• E.g., students, courses, employees, departments, flights,
patients, ...
Attributes
• properties of entities.
• E.g., course name, deptname, departure time, age,
room#, ...
Entity set -- a set of entities that have the same attributes.
• an entity set is similar to a class, and an entity similar to an
instance
Attributes
single-valued vrs multi-valued:
• color of car could be multi-valued
• salary of employee is single-valued
atomic vrs composite:
• age of a person is atomic
• address of a person could be composite
stored vrs derived:
• derived attributes are those that can be derived from other
attributes or entities, e.g., age can be derived from date of birth.
• All other attributes are stored attributes
Relationships
sam 62900 main austin
pat 62901 north urbana
259 10000
245 2400
364 200000
305 20000
customer
account
Relationship:
• association between multiple entities
Relationship Set:
• set if relationships over the same entity sets
Binary,Ternary, 4-nary, … relationship sets
Cust-Account
Relationship set
Visualizing ER Relationships as a
Table
Relationship Set Corresponding to the Relationship Cust-Account
Row in the table
represents the pair
of entities
participating in
the relationship
Customer Account
John 1001
Megan 1001
Megan 2001
ER Diagram -- graphical
representation of ER schema
customer custacct account
cust name
ssno
street
city
acct number
balance
opening date
 Entity set -- rectangles; attributes -- ellipses; dashed ellipse -- derived
attribute; double ellipse -- multivalued attribute; relationship set --
diamonds; lines connect the respective relationship set with entity sets;
 Relationship sets may have 1 or many attributes associated with them --
known as relationship attributes.
Roles in a Relationship
The function that an entity plays in a relationship is called its role
Roles are normally not explicitly specified unless the meaning of the
relationship needs clarification
Roles needed when entity set is related to itself via a relationship.
employee works for
manager
worker
Constraints on Entity Sets
Key Constraint:
• With each entity set a notion of a key can be associated.
• A key is a set of attributes that uniquely identify an entity in entity set.
• Examples:
• designer may specify that {ssno} is a key for a entity set customer
entity with attributes {ssno, accountno, balance, name, address}
• designer may specify that {accountno} is also a key , that is, no joint
accounts are permitted.
• Denoted in ER diagram by underlining the attributes that form a key
• multiple keys may exist in which case one chosen as primary key and
underlined. Other keys called secondary keys either not indicated or
listed in a side comment attached to the diagram.
Constraints on Relationship Sets
Consider binary relationship set R between entity sets A and B
One to one: an entity in A is associated with at most one entity in B, and an
entity in B is associated with atmost one entity in A.
• an employee has only one spouse in a married-to relationship.
Many to One: An entity in A is associated with at most one entity in B, an
entity in B is associated with many entities in A.
• an employee works in a single department but a department consists of
many employees.
Constraints on Relationship
Sets(Cont.)
Many to Many: An entity in A is associated with many entities in B, and an
entity in B is associated with many entities in A.
• A customer may have many bank accounts. Accounts may be joint
between multiple customers.
Multiplicity of Relationships
Many-to-one One-to-oneMany-to-many
multiplicity of relationship in ER diagram represented by an
arrow pointing to “one”
Multiplicity of Relationships
Many-to-one One-to-oneMany-to-many
multiplicity of relationship in ER diagram represented by an
arrow pointing to “one”
Many to Many Relationship
• Multiple customers can share an account
• Many accounts may have one owner
customer custacct account
opening date
Customer Account Start Date
John 1001 Jan 20th
1999
Megan 1001 March 16th
1999
Megan 2001 Feb 18th
1994
Customer Account Start Date
John 1001 Jan 20th
1999
Megan 1001 March 16th
1999
legallegal
Many to One Relationship
• In a Many-One relationship, relationship attributes can be
repositioned to the entity set on the many side.
customer custacct account
opening date
customer custacct account
opening date
One to One Relationship
1 customer can have 1 account.
One account can be owned by
1 customer
relationship attributes can be
shifted to either of the entity
sets
Customer Account Start Date
Megan 1001 March 16th
1999
Megan 2001 Feb 18th
1994
Illegal
Customer Account Start Date
John 1001 Jan 20th
1999
Megan 1001 March 16th
1999
Illegal
Customer Account Start Date
Megan 1001 March 16th
1999
John 2001 Feb 18th
1994
Legal
customer custacct account
opening date
Weak Entity Sets
Entity sets that do not have sufficient attributes to form a key are called
weak entity sets.
A weak entity set existentially depend upon (one or more) strong entity
sets via a one-to-many relationship from whom they derive their key
A weak entity set may have a discriminator (or a partial key) that
distinguish between weak entities related to the same strong entity
key of weak entity set = Key of owner entity set(s) + discriminator
Weak Entity Sets (Cont.)
customer custacct account
cust name
ssno
street
city
acct number balance
opening date
transaction
Trans#
log
• Transaction is a weak entity set
related to accounts via log
relationship.
• Trans# distinguish different
transactions on same account
Weak Entity Sets (Cont.)
customer custacct account
cust name
ssno
street
city
acct number balance
opening date
transaction
Trans#
log
• Transaction is a weak entity set
related to accounts via log
relationship.
• Trans# distinguish different
transactions on same account
Conceptual Modeling of Data

Más contenido relacionado

Destacado

Practical Conceptual Modeling at UX Detroit Feb 2015
Practical Conceptual Modeling at UX Detroit Feb 2015Practical Conceptual Modeling at UX Detroit Feb 2015
Practical Conceptual Modeling at UX Detroit Feb 2015Andrew Hinton
 
Conceptual modeling of information systems
Conceptual modeling of information systemsConceptual modeling of information systems
Conceptual modeling of information systemsegeda9
 
Practical Modeling: Making the Invisible Visible w/o speaker notes
Practical Modeling: Making the Invisible Visible w/o speaker notesPractical Modeling: Making the Invisible Visible w/o speaker notes
Practical Modeling: Making the Invisible Visible w/o speaker notesKaarin Hoff
 
A method for filtering large conceptual schemas
A method for filtering large conceptual schemasA method for filtering large conceptual schemas
A method for filtering large conceptual schemasAntonio Villegas
 
Delegation, Decentralization and centrlization
Delegation, Decentralization and centrlizationDelegation, Decentralization and centrlization
Delegation, Decentralization and centrlizationKhushbu Malara
 
The Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data QualityThe Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data QualityI.M.A. Ltd.
 
3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) modelKumar
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 
Lecture 4 conceptual models of learning
Lecture 4 conceptual models of learningLecture 4 conceptual models of learning
Lecture 4 conceptual models of learningRoel Hernandez
 
Meaning Modes in Design - Fluxible 2016
Meaning Modes in Design - Fluxible 2016Meaning Modes in Design - Fluxible 2016
Meaning Modes in Design - Fluxible 2016Marsha Haverty
 
Master data management (mdm) & plm in context of enterprise product management
Master data management (mdm) & plm in context of enterprise product managementMaster data management (mdm) & plm in context of enterprise product management
Master data management (mdm) & plm in context of enterprise product managementTata Consultancy Services
 
Gartner: Seven Building Blocks of Master Data Management
Gartner: Seven Building Blocks of Master Data ManagementGartner: Seven Building Blocks of Master Data Management
Gartner: Seven Building Blocks of Master Data ManagementGartner
 
The what, why, and how of master data management
The what, why, and how of master data managementThe what, why, and how of master data management
The what, why, and how of master data managementMohammad Yousri
 
Gartner: Master Data Management Functionality
Gartner: Master Data Management FunctionalityGartner: Master Data Management Functionality
Gartner: Master Data Management FunctionalityGartner
 
Master Data Management
Master Data ManagementMaster Data Management
Master Data ManagementSung Kuan
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...Christopher Bradley
 
M2. conceptual modeling intro
M2. conceptual modeling   introM2. conceptual modeling   intro
M2. conceptual modeling introMichele Missikoff
 

Destacado (20)

Practical Conceptual Modeling at UX Detroit Feb 2015
Practical Conceptual Modeling at UX Detroit Feb 2015Practical Conceptual Modeling at UX Detroit Feb 2015
Practical Conceptual Modeling at UX Detroit Feb 2015
 
Conceptual modeling of information systems
Conceptual modeling of information systemsConceptual modeling of information systems
Conceptual modeling of information systems
 
Practical Modeling: Making the Invisible Visible w/o speaker notes
Practical Modeling: Making the Invisible Visible w/o speaker notesPractical Modeling: Making the Invisible Visible w/o speaker notes
Practical Modeling: Making the Invisible Visible w/o speaker notes
 
A method for filtering large conceptual schemas
A method for filtering large conceptual schemasA method for filtering large conceptual schemas
A method for filtering large conceptual schemas
 
Delegation, Decentralization and centrlization
Delegation, Decentralization and centrlizationDelegation, Decentralization and centrlization
Delegation, Decentralization and centrlization
 
The Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data QualityThe Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data Quality
 
Conceptual modeling
Conceptual modelingConceptual modeling
Conceptual modeling
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
Lecture 4 conceptual models of learning
Lecture 4 conceptual models of learningLecture 4 conceptual models of learning
Lecture 4 conceptual models of learning
 
Meaning Modes in Design - Fluxible 2016
Meaning Modes in Design - Fluxible 2016Meaning Modes in Design - Fluxible 2016
Meaning Modes in Design - Fluxible 2016
 
Master data management (mdm) & plm in context of enterprise product management
Master data management (mdm) & plm in context of enterprise product managementMaster data management (mdm) & plm in context of enterprise product management
Master data management (mdm) & plm in context of enterprise product management
 
Gartner: Seven Building Blocks of Master Data Management
Gartner: Seven Building Blocks of Master Data ManagementGartner: Seven Building Blocks of Master Data Management
Gartner: Seven Building Blocks of Master Data Management
 
The what, why, and how of master data management
The what, why, and how of master data managementThe what, why, and how of master data management
The what, why, and how of master data management
 
Ebook - The Guide to Master Data Management
Ebook - The Guide to Master Data Management Ebook - The Guide to Master Data Management
Ebook - The Guide to Master Data Management
 
Gartner: Master Data Management Functionality
Gartner: Master Data Management FunctionalityGartner: Master Data Management Functionality
Gartner: Master Data Management Functionality
 
Master Data Management
Master Data ManagementMaster Data Management
Master Data Management
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...
 
M2. conceptual modeling intro
M2. conceptual modeling   introM2. conceptual modeling   intro
M2. conceptual modeling intro
 

Similar a Conceptual Modeling of Data

Similar a Conceptual Modeling of Data (20)

PHP/MySQL Programming Class Lecture 03
PHP/MySQL Programming Class Lecture 03PHP/MySQL Programming Class Lecture 03
PHP/MySQL Programming Class Lecture 03
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptx
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
E R Model details.ppt
E R Model details.pptE R Model details.ppt
E R Model details.ppt
 
database.pptx
database.pptxdatabase.pptx
database.pptx
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
 
abuukarE r model
abuukarE r modelabuukarE r model
abuukarE r model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
dbms er model
dbms er modeldbms er model
dbms er model
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
 
DBMS Class 3
DBMS Class 3DBMS Class 3
DBMS Class 3
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
Er model
Er modelEr model
Er model
 
dbms
dbmsdbms
dbms
 

Último

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 

Último (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

Conceptual Modeling of Data

  • 1. Lecturer: M.Zalmai “Rahmani” rahmani.zalmai@gmail.com Advanced Database Systems Conceptual Modeling of Data Lecture 02 Azma Institute Database Department
  • 2. Database Design Process high level specs conceptual schema logical schema (in DBMS model) miniworld conceptual design logical design physical design functional analysis application design transaction implementation Data requirementsfunctional requirements application programs Physical schema Requirement Analysis Functional Design Database Design
  • 3. Requirements of a Conceptual Data Model Expressiveness: should be expressive enough to allow modeling of different types of relationships, objects and constraints of the miniworld. Simplicity: non-specialists should be able to understand Diagrammatic Representation: to ease interpretation Formality: There should be no ambiguity in the specification
  • 4. Entiities and Entity Sets Entities • nouns, ‘things’ in the world. • E.g., students, courses, employees, departments, flights, patients, ... Attributes • properties of entities. • E.g., course name, deptname, departure time, age, room#, ... Entity set -- a set of entities that have the same attributes. • an entity set is similar to a class, and an entity similar to an instance
  • 5. Attributes single-valued vrs multi-valued: • color of car could be multi-valued • salary of employee is single-valued atomic vrs composite: • age of a person is atomic • address of a person could be composite stored vrs derived: • derived attributes are those that can be derived from other attributes or entities, e.g., age can be derived from date of birth. • All other attributes are stored attributes
  • 6. Relationships sam 62900 main austin pat 62901 north urbana 259 10000 245 2400 364 200000 305 20000 customer account Relationship: • association between multiple entities Relationship Set: • set if relationships over the same entity sets Binary,Ternary, 4-nary, … relationship sets Cust-Account Relationship set
  • 7. Visualizing ER Relationships as a Table Relationship Set Corresponding to the Relationship Cust-Account Row in the table represents the pair of entities participating in the relationship Customer Account John 1001 Megan 1001 Megan 2001
  • 8. ER Diagram -- graphical representation of ER schema customer custacct account cust name ssno street city acct number balance opening date  Entity set -- rectangles; attributes -- ellipses; dashed ellipse -- derived attribute; double ellipse -- multivalued attribute; relationship set -- diamonds; lines connect the respective relationship set with entity sets;  Relationship sets may have 1 or many attributes associated with them -- known as relationship attributes.
  • 9. Roles in a Relationship The function that an entity plays in a relationship is called its role Roles are normally not explicitly specified unless the meaning of the relationship needs clarification Roles needed when entity set is related to itself via a relationship. employee works for manager worker
  • 10. Constraints on Entity Sets Key Constraint: • With each entity set a notion of a key can be associated. • A key is a set of attributes that uniquely identify an entity in entity set. • Examples: • designer may specify that {ssno} is a key for a entity set customer entity with attributes {ssno, accountno, balance, name, address} • designer may specify that {accountno} is also a key , that is, no joint accounts are permitted. • Denoted in ER diagram by underlining the attributes that form a key • multiple keys may exist in which case one chosen as primary key and underlined. Other keys called secondary keys either not indicated or listed in a side comment attached to the diagram.
  • 11. Constraints on Relationship Sets Consider binary relationship set R between entity sets A and B One to one: an entity in A is associated with at most one entity in B, and an entity in B is associated with atmost one entity in A. • an employee has only one spouse in a married-to relationship. Many to One: An entity in A is associated with at most one entity in B, an entity in B is associated with many entities in A. • an employee works in a single department but a department consists of many employees.
  • 12. Constraints on Relationship Sets(Cont.) Many to Many: An entity in A is associated with many entities in B, and an entity in B is associated with many entities in A. • A customer may have many bank accounts. Accounts may be joint between multiple customers.
  • 13. Multiplicity of Relationships Many-to-one One-to-oneMany-to-many multiplicity of relationship in ER diagram represented by an arrow pointing to “one”
  • 14. Multiplicity of Relationships Many-to-one One-to-oneMany-to-many multiplicity of relationship in ER diagram represented by an arrow pointing to “one”
  • 15. Many to Many Relationship • Multiple customers can share an account • Many accounts may have one owner customer custacct account opening date Customer Account Start Date John 1001 Jan 20th 1999 Megan 1001 March 16th 1999 Megan 2001 Feb 18th 1994 Customer Account Start Date John 1001 Jan 20th 1999 Megan 1001 March 16th 1999 legallegal
  • 16. Many to One Relationship • In a Many-One relationship, relationship attributes can be repositioned to the entity set on the many side. customer custacct account opening date customer custacct account opening date
  • 17. One to One Relationship 1 customer can have 1 account. One account can be owned by 1 customer relationship attributes can be shifted to either of the entity sets Customer Account Start Date Megan 1001 March 16th 1999 Megan 2001 Feb 18th 1994 Illegal Customer Account Start Date John 1001 Jan 20th 1999 Megan 1001 March 16th 1999 Illegal Customer Account Start Date Megan 1001 March 16th 1999 John 2001 Feb 18th 1994 Legal customer custacct account opening date
  • 18. Weak Entity Sets Entity sets that do not have sufficient attributes to form a key are called weak entity sets. A weak entity set existentially depend upon (one or more) strong entity sets via a one-to-many relationship from whom they derive their key A weak entity set may have a discriminator (or a partial key) that distinguish between weak entities related to the same strong entity key of weak entity set = Key of owner entity set(s) + discriminator
  • 19. Weak Entity Sets (Cont.) customer custacct account cust name ssno street city acct number balance opening date transaction Trans# log • Transaction is a weak entity set related to accounts via log relationship. • Trans# distinguish different transactions on same account
  • 20. Weak Entity Sets (Cont.) customer custacct account cust name ssno street city acct number balance opening date transaction Trans# log • Transaction is a weak entity set related to accounts via log relationship. • Trans# distinguish different transactions on same account