SlideShare a Scribd company logo
1 of 33
Data Modeling for
Database Design 1
Yong Choi
School of Business
CSUB
Part # 2
2
Study Objectives
 Understand concepts of data modeling and its
purpose
 Learn how relationships between entities are
defined and refined, and how such relationships
are incorporated into the database design process
 Learn how ERD components affect database design
and implementation
 Learn how to interpret the modeling symbols
Part # 2
Data Model
 Model: an abstraction of a real-world object
or event
 Useful in understanding complexities of the real-
world environment
 Data model
 A diagram that displays a set of tables and the
relationships between them
 Next Slide: “Restaurant” Access data model
using Entity Relationship Diagram (ERD)
Part # 2
Access Data Model using ERD
4
Part # 2
What is an Entity Relationship
Diagram (ERD)?
 ERD is a data modeling technique used in
software engineering to produce a conceptual
data model of an information system.
 So, ERDs illustrate the logical structure of
databases.
 ERD development using a CASE tool
 Powerdesigner by SAP
 Data Modeler by Orcale
5
Part # 2
The Importance of Data Model
 Blue print: official documentation
 Blue print of house
 Employee’s w/o DB knowledge can understand
 a data model diagram vs. a list of tables
 Used as an effective Communication Tool
 Improve interaction among the managers, the
designers, and the end users
 Independence from a particular DBMS
 Network DB, Object-oriented DB, etc.
Part # 2
7
 The data modeling revolves around discovering
and analyzing organizational and users data
requirements.
 Requirements based on policies, meetings,
procedures, system specifications, etc.
 Identify what data is important
 Identify what data should be maintained
Data Model (con’t)
Part # 2
8
 The major activity of this phase is identifying
entities, attributes, and their relationships to
construct model using the Entity Relationship
Diagram.
 Entity  table
 Attribute  column
 Relationship  line
 Basics of Data Modeling Video
 Until business rules # 3 (9:20)
ERD
Part # 2
9
How to find entities?
 Entity:
 "...anything (people, places, objects, events, etc.)
about which we store information (e.g. supplier,
machine tool, employee, utility pole, airline seat,
etc.).”
 Tangible: customer, product
 Intangible: order, accounting receivable
 Look for singular nouns (beginner)
 BUT a proper noun is not a good candidate….
Part # 2
10
Entity Instance
Entity instance: a single occurrence of an entity.
 6 instances
Student
ID
Last
Name
First
Name
2144 Arnold Betty
3122 Taylor John
3843 Simmons Lisa
9844 Macy Bill
2837 Leath Heather
2293 Wrench Tim
Entity: student
instance
Part # 2
11
How to find attributes?
 Attribute:
 Attributes are data objects that either identify or
describe entities (property of an entity).
 In other words, it is a descriptor whose values are
associated with individual entities of a specific entity
type
 The process for identifying attributes is similar except now
you want to look for and extract those names that appear
to be descriptive noun phrases.
Part # 2
12
How to find relationships?
 Relationship:
 Relationships are associations between entities.
 Typically, a relationship is indicated by a verb
connecting two or more entities.
 Employees are assigned to projects
 Relationships should be classified in terms of
cardinality.
 One-to-one, one-to-many, etc.
Part # 2
13
How to find cardinalities?
 Cardinality:
 The cardinality is the number of occurrences in one
entity which are associated to the number of
occurrences in another.
 There are three basic cardinalities (degrees of
relationship).
 one-to-one (1:1), one-to-many (1:M), and many-to-
many (M:N)
Part # 2
14
“attributes that uniquely identify entity instances”
 Becomes a PK in RDS
 Composite identifiers are identifiers that consist
of two or more attributes
 Identifiers are represented by underlying the
name of the attribute(s)
 Employee (Employee_ID), student (Student_ID)
Identifier
Part # 2
Crow’s Foot Notation
 Known as IE notation (most popular)
 Entity:
 Represented by a rectangle, with its name on the
top. The name is singular (entity) rather than
plural (entities).
15
Part # 2
Attributes
 Identifiers are represented by underlying the
name of the attribute(s)
16
Part # 2
Basic Cardinality Type
 1-to-1 relationship
 1-to-M relationship
 M-to-N relationship
Part # 2
Cardinality con’t
Part # 2
19
Example Model
Part # 2
Data Model by Peter Chen’ Notation
(first - original)
Part # 2
Business Rule Example 1
 Finalized business rules must be
bi-directional.
 Draft: one sentence
 Finalized: two sentences
 A professor advises many
students (professor to student).
Each student is advised by one
professor (student to professor).
 A professor must teach many
classes. Each class must be
taught by one professor.
21
Part # 2
Business Rule 1
 Business Rules are used to define entities, attributes,
relationships and constraints.
 Usually though they are used for the organization
that stores or uses data to be an explanation of a
policy, procedure, or principle.
 The data can be considered significant only after
business rules are defined.
 W/o them it cannot be considered as data for RDS but just
records.
22
Part # 2
Business Rule 2
 When creating business rules, keep them simple,
easy to understand, and keep them broad.
 so that everyone can have a similar understanding and
interpretation.
 Sources of business rules:
 Direct interviews with internal & external stakeholders
 Site visitations (collect data) and observation of the work
process or procedure
 Review and study of documents (Policies, Procedures,
Forms, Operation manuals, etc..)
23
Part # 2
Discovering Business Rules
 Real world example on the class website
 After reviewing and studying the interview and
various forms, develop a draft business rules -
does not need to be bi-directional and less precise
wording…
 Keep on going until “optimized”
 Then, finalize Business Rules: bi-directional.
Part # 2
Business Rule Example 2
 A sales representative must write
many invoices. Each invoice has to
be written by one sales
representative.
 Each sales representative must be
assigned to many department.
Each department has only one
sales representative.
 A customer has to generate many
invoices. An invoice is generated
by only one customer.
25
Part # 2
26
“Describe detail information about an entity ”
 Entity: Employee
 Attributes:
 Employee-Name
 Address (composite)
 Phone Extension
 Date-Of-Hire
 Job-Skill-Code
 Salary
Attributes
Part # 2
27
Classes of attributes
 Simple attribute
 Composite attribute
 Derived attributes
 Single-valued attribute
 Multi-valued attribute
Part # 2
28
 A simple attribute cannot be subdivided.
 Examples: Age, Gender, and Marital status
 A composite attribute can be further
subdivided to yield additional attributes.
 Examples:
 ADDRESS -- Street, City, State, Zip
 PHONE NUMBER -- Area code, Exchange number
Simple/Composite attribute
Part # 2
29
 is not physically stored within the database
 instead, it is derived by using an algorithm.
 Example 1: Late Charge of 2%
 MS Access: InvoiceAmt * 0.02
 Example 2: AGE can be derived from the date of
birth and the current date.
 MS Access: int(Date() – Emp_Dob)/365)
Derived attribute
Part # 2
30
 can have only a single (atomic) value.
 Examples:
 A person can have only one social security number.
 A manufactured part can have only one serial number.
 A single-valued attribute is not necessarily a
simple attribute.
 Part No: CA-08-02-189935
 Location: CA, Factory#:08, shift#: 02, part#: 189935
Single-valued attribute
Part # 2
31
 can have many values.
 Examples:
 A person may have several college degrees.
 A household may have several phones with
different numbers
 A car color
Multi-valued attributes
Part # 2
32
Example - “Movie Database”
 Entity:
 Movie Star
 Attributes:
 SS#: “123-45-6789” (single-valued)
 Cell Phone: “(661)123-4567, (661)234-5678”
(multi-valued)
 Name: “Harrison Ford” (composite)
 Address: “123 Main Str., LA, CA” (composite)
 Gender: “Female” (simple)
 Age: 24 (derived)
Part # 2
Procedure of ERD
 Relatively simple representations of complex
real-world data structures
 Data modeling is iterative process.
 “complete” and “100% error free” model is
not possible!
 Only “Optimized” model is possible….
33

More Related Content

Similar to ERD_01.ppt

Analysis modeling in software engineering
Analysis modeling in software engineeringAnalysis modeling in software engineering
Analysis modeling in software engineeringMuhammadTalha436
 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsShailaja Jayaprakash
 
software_engg-chap-03.ppt
software_engg-chap-03.pptsoftware_engg-chap-03.ppt
software_engg-chap-03.ppt064ChetanWani
 
Informatica Data Modelling : Importance of Conceptual Models
Informatica Data Modelling : Importance of  Conceptual ModelsInformatica Data Modelling : Importance of  Conceptual Models
Informatica Data Modelling : Importance of Conceptual ModelsZaranTech LLC
 
A2 databases
A2 databasesA2 databases
A2 databasesc.west
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Typesaakanksha s
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPTTrinath
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxInfotech27
 
3Individual Assignment Social, Ethical and Legal Implicat.docx
3Individual Assignment Social, Ethical and Legal Implicat.docx3Individual Assignment Social, Ethical and Legal Implicat.docx
3Individual Assignment Social, Ethical and Legal Implicat.docxrhetttrevannion
 
1RUNNING HEAD Normalization2NormalizationNORM.docx
1RUNNING HEAD Normalization2NormalizationNORM.docx1RUNNING HEAD Normalization2NormalizationNORM.docx
1RUNNING HEAD Normalization2NormalizationNORM.docxdrennanmicah
 

Similar to ERD_01.ppt (20)

Analysis modeling in software engineering
Analysis modeling in software engineeringAnalysis modeling in software engineering
Analysis modeling in software engineering
 
ER modeling
ER modelingER modeling
ER modeling
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
 
Data modelling interview question
Data modelling interview questionData modelling interview question
Data modelling interview question
 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-models
 
DB design
DB designDB design
DB design
 
software_engg-chap-03.ppt
software_engg-chap-03.pptsoftware_engg-chap-03.ppt
software_engg-chap-03.ppt
 
Informatica Data Modelling : Importance of Conceptual Models
Informatica Data Modelling : Importance of  Conceptual ModelsInformatica Data Modelling : Importance of  Conceptual Models
Informatica Data Modelling : Importance of Conceptual Models
 
A2 databases
A2 databasesA2 databases
A2 databases
 
database1
database1database1
database1
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Erd1
Erd1Erd1
Erd1
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptx
 
Datamodels.pptx
Datamodels.pptxDatamodels.pptx
Datamodels.pptx
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
3Individual Assignment Social, Ethical and Legal Implicat.docx
3Individual Assignment Social, Ethical and Legal Implicat.docx3Individual Assignment Social, Ethical and Legal Implicat.docx
3Individual Assignment Social, Ethical and Legal Implicat.docx
 
1RUNNING HEAD Normalization2NormalizationNORM.docx
1RUNNING HEAD Normalization2NormalizationNORM.docx1RUNNING HEAD Normalization2NormalizationNORM.docx
1RUNNING HEAD Normalization2NormalizationNORM.docx
 
DataModeling.pptx
DataModeling.pptxDataModeling.pptx
DataModeling.pptx
 
8.pptx
8.pptx8.pptx
8.pptx
 

Recently uploaded

Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 

Recently uploaded (20)

Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 

ERD_01.ppt

  • 1. Data Modeling for Database Design 1 Yong Choi School of Business CSUB
  • 2. Part # 2 2 Study Objectives  Understand concepts of data modeling and its purpose  Learn how relationships between entities are defined and refined, and how such relationships are incorporated into the database design process  Learn how ERD components affect database design and implementation  Learn how to interpret the modeling symbols
  • 3. Part # 2 Data Model  Model: an abstraction of a real-world object or event  Useful in understanding complexities of the real- world environment  Data model  A diagram that displays a set of tables and the relationships between them  Next Slide: “Restaurant” Access data model using Entity Relationship Diagram (ERD)
  • 4. Part # 2 Access Data Model using ERD 4
  • 5. Part # 2 What is an Entity Relationship Diagram (ERD)?  ERD is a data modeling technique used in software engineering to produce a conceptual data model of an information system.  So, ERDs illustrate the logical structure of databases.  ERD development using a CASE tool  Powerdesigner by SAP  Data Modeler by Orcale 5
  • 6. Part # 2 The Importance of Data Model  Blue print: official documentation  Blue print of house  Employee’s w/o DB knowledge can understand  a data model diagram vs. a list of tables  Used as an effective Communication Tool  Improve interaction among the managers, the designers, and the end users  Independence from a particular DBMS  Network DB, Object-oriented DB, etc.
  • 7. Part # 2 7  The data modeling revolves around discovering and analyzing organizational and users data requirements.  Requirements based on policies, meetings, procedures, system specifications, etc.  Identify what data is important  Identify what data should be maintained Data Model (con’t)
  • 8. Part # 2 8  The major activity of this phase is identifying entities, attributes, and their relationships to construct model using the Entity Relationship Diagram.  Entity  table  Attribute  column  Relationship  line  Basics of Data Modeling Video  Until business rules # 3 (9:20) ERD
  • 9. Part # 2 9 How to find entities?  Entity:  "...anything (people, places, objects, events, etc.) about which we store information (e.g. supplier, machine tool, employee, utility pole, airline seat, etc.).”  Tangible: customer, product  Intangible: order, accounting receivable  Look for singular nouns (beginner)  BUT a proper noun is not a good candidate….
  • 10. Part # 2 10 Entity Instance Entity instance: a single occurrence of an entity.  6 instances Student ID Last Name First Name 2144 Arnold Betty 3122 Taylor John 3843 Simmons Lisa 9844 Macy Bill 2837 Leath Heather 2293 Wrench Tim Entity: student instance
  • 11. Part # 2 11 How to find attributes?  Attribute:  Attributes are data objects that either identify or describe entities (property of an entity).  In other words, it is a descriptor whose values are associated with individual entities of a specific entity type  The process for identifying attributes is similar except now you want to look for and extract those names that appear to be descriptive noun phrases.
  • 12. Part # 2 12 How to find relationships?  Relationship:  Relationships are associations between entities.  Typically, a relationship is indicated by a verb connecting two or more entities.  Employees are assigned to projects  Relationships should be classified in terms of cardinality.  One-to-one, one-to-many, etc.
  • 13. Part # 2 13 How to find cardinalities?  Cardinality:  The cardinality is the number of occurrences in one entity which are associated to the number of occurrences in another.  There are three basic cardinalities (degrees of relationship).  one-to-one (1:1), one-to-many (1:M), and many-to- many (M:N)
  • 14. Part # 2 14 “attributes that uniquely identify entity instances”  Becomes a PK in RDS  Composite identifiers are identifiers that consist of two or more attributes  Identifiers are represented by underlying the name of the attribute(s)  Employee (Employee_ID), student (Student_ID) Identifier
  • 15. Part # 2 Crow’s Foot Notation  Known as IE notation (most popular)  Entity:  Represented by a rectangle, with its name on the top. The name is singular (entity) rather than plural (entities). 15
  • 16. Part # 2 Attributes  Identifiers are represented by underlying the name of the attribute(s) 16
  • 17. Part # 2 Basic Cardinality Type  1-to-1 relationship  1-to-M relationship  M-to-N relationship
  • 20. Part # 2 Data Model by Peter Chen’ Notation (first - original)
  • 21. Part # 2 Business Rule Example 1  Finalized business rules must be bi-directional.  Draft: one sentence  Finalized: two sentences  A professor advises many students (professor to student). Each student is advised by one professor (student to professor).  A professor must teach many classes. Each class must be taught by one professor. 21
  • 22. Part # 2 Business Rule 1  Business Rules are used to define entities, attributes, relationships and constraints.  Usually though they are used for the organization that stores or uses data to be an explanation of a policy, procedure, or principle.  The data can be considered significant only after business rules are defined.  W/o them it cannot be considered as data for RDS but just records. 22
  • 23. Part # 2 Business Rule 2  When creating business rules, keep them simple, easy to understand, and keep them broad.  so that everyone can have a similar understanding and interpretation.  Sources of business rules:  Direct interviews with internal & external stakeholders  Site visitations (collect data) and observation of the work process or procedure  Review and study of documents (Policies, Procedures, Forms, Operation manuals, etc..) 23
  • 24. Part # 2 Discovering Business Rules  Real world example on the class website  After reviewing and studying the interview and various forms, develop a draft business rules - does not need to be bi-directional and less precise wording…  Keep on going until “optimized”  Then, finalize Business Rules: bi-directional.
  • 25. Part # 2 Business Rule Example 2  A sales representative must write many invoices. Each invoice has to be written by one sales representative.  Each sales representative must be assigned to many department. Each department has only one sales representative.  A customer has to generate many invoices. An invoice is generated by only one customer. 25
  • 26. Part # 2 26 “Describe detail information about an entity ”  Entity: Employee  Attributes:  Employee-Name  Address (composite)  Phone Extension  Date-Of-Hire  Job-Skill-Code  Salary Attributes
  • 27. Part # 2 27 Classes of attributes  Simple attribute  Composite attribute  Derived attributes  Single-valued attribute  Multi-valued attribute
  • 28. Part # 2 28  A simple attribute cannot be subdivided.  Examples: Age, Gender, and Marital status  A composite attribute can be further subdivided to yield additional attributes.  Examples:  ADDRESS -- Street, City, State, Zip  PHONE NUMBER -- Area code, Exchange number Simple/Composite attribute
  • 29. Part # 2 29  is not physically stored within the database  instead, it is derived by using an algorithm.  Example 1: Late Charge of 2%  MS Access: InvoiceAmt * 0.02  Example 2: AGE can be derived from the date of birth and the current date.  MS Access: int(Date() – Emp_Dob)/365) Derived attribute
  • 30. Part # 2 30  can have only a single (atomic) value.  Examples:  A person can have only one social security number.  A manufactured part can have only one serial number.  A single-valued attribute is not necessarily a simple attribute.  Part No: CA-08-02-189935  Location: CA, Factory#:08, shift#: 02, part#: 189935 Single-valued attribute
  • 31. Part # 2 31  can have many values.  Examples:  A person may have several college degrees.  A household may have several phones with different numbers  A car color Multi-valued attributes
  • 32. Part # 2 32 Example - “Movie Database”  Entity:  Movie Star  Attributes:  SS#: “123-45-6789” (single-valued)  Cell Phone: “(661)123-4567, (661)234-5678” (multi-valued)  Name: “Harrison Ford” (composite)  Address: “123 Main Str., LA, CA” (composite)  Gender: “Female” (simple)  Age: 24 (derived)
  • 33. Part # 2 Procedure of ERD  Relatively simple representations of complex real-world data structures  Data modeling is iterative process.  “complete” and “100% error free” model is not possible!  Only “Optimized” model is possible…. 33