SlideShare a Scribd company logo
ANALYSIS 3.1
Defining Entities and Relationships
Logical Design
• Logical design is the entity design without
regard to a relational database management
system.
• One of the principles of relational database is
that the logical design should be the same
regardless of the DBMS that will be used.
• This means you don’t consider the particular
limitations or features of a DBMS in the design
Physical Design
• Physical design is the logical design adapted to a particular
DBMS.
• The design can change slightly to fit into the limitations of a
DBMS or to take advantage of DBMS-specific features.
• Entity Relation Diagrams
• Entity relation diagrams are a common way of diagramming
entities, their attributes, and their relationships.
• An entity is represented as a rectangle divided into three
parts:
• The name of the entity
• The primary key
• The attributes
Entity
Relationships
• A relationship between entities is established
by repeating one field, usually the primary key
field, from one table in a second table, usually
as a foreign key.
• The primary key table is sometimes referred
to as the “parent” table.
• Tables with the foreign keys are referred to as
“child” tables.
• Crows’ Feet Notation for Relationships
Naming Conventions
• Naming conventions are crucial for good
design.
• Ideally you should have a consistent way of
naming database objects, such as tables,
attributes, keys, and any other database
objects, such as stored procedures and
triggers.
Book Naming Conventions
• Entities and tables are named as single nouns like
Tutor, Student, and Session.
• Attributes are named with the entity name followed by
the attribute name. There are no underscores
between. Each new word is capitalized:
TutorLastName,
• StudentLastName, and so on. This can make for long
attribute names, but it makes for maximum clarity.
• Primary keys end with the word “Key”: TutorKey,
StudentKey, and so on.
• Foreign keys retain the name of the primary key.
• Term Equivalencies
Repeating Fields
• When creating an entity that can contain
many of the same attributes, it is tempting to
list or number them.
• For example, a tutor can tutor many classes.
• The temptation is to create an entity like the
following (see next slide):
Repeating Attribute Entity
Resolution
• Numbering attributes is always a mistake.
• It is a sign that you should split the entity into
two separate entities
• Relationships
• There are three types of relationships between
entities:
• One to one
• One to many
• Many to many
One to One
• A one-to-one relationship means that for every
one record in the primary key table, there is no
more than one related record in the foreign key
table.
• One-to-one relationships are rare.
• They can be used to rid an entity of null (empty)
attributes that inevitably result when contents of
an entity have different attributes.
• They are sometimes used when data is split
between entities for security reasons.
One to Many
• A many-to-many relationship means that each
record in the primary entity can have many
related records in a second entity and each
record in the second entity can have many
related records in the primary entity.
• Many-to-many relationships are legal in logical
design, but no DBMS can implement them.
One to Many (Cont.)
• Many-to-many relationships must be resolved
into two one-to-many relationships.
• To do this, it is necessary to create a linking
between the two tables that have many-to-
many relationships.
Cardinality
• Cardinality describes the number of permissible
relationships between two entities.
• Maximum cardinality refers to the maximum
number of permitted relationships. (For example,
a customer can have no more than 4 listed
emails.)
• Minimum cardinality refers the minimum number
of permitted relationships. (For example, each
customer must have at least one purchase in the
purchase table.)

More Related Content

What's hot

Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300
Edwin Ayernor
 
physical and logical data independence
physical and logical data independencephysical and logical data independence
physical and logical data independence
apoorva_upadhyay
 
Sql server ___________session2-data_modeling
Sql server  ___________session2-data_modelingSql server  ___________session2-data_modeling
Sql server ___________session2-data_modeling
Ehtisham Ali
 
Mi0034 database management systems
Mi0034  database management systemsMi0034  database management systems
Mi0034 database management systems
smumbahelp
 
The relational database model chapter 2
The relational database model  chapter 2The relational database model  chapter 2
The relational database model chapter 2
Nargis Ehsan
 
RDBMS Arch & Models
RDBMS Arch & ModelsRDBMS Arch & Models
RDBMS Arch & Models
Sarmad Ali
 

What's hot (20)

Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
physical and logical data independence
physical and logical data independencephysical and logical data independence
physical and logical data independence
 
Sql server ___________session2-data_modeling
Sql server  ___________session2-data_modelingSql server  ___________session2-data_modeling
Sql server ___________session2-data_modeling
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Relational Model
Relational ModelRelational Model
Relational Model
 
Mi0034 database management systems
Mi0034  database management systemsMi0034  database management systems
Mi0034 database management systems
 
An hour with Database and SQL
An hour with Database and SQLAn hour with Database and SQL
An hour with Database and SQL
 
Er diagram
Er diagramEr diagram
Er diagram
 
Entity relationship diagram for dummies
Entity relationship diagram for dummiesEntity relationship diagram for dummies
Entity relationship diagram for dummies
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Entity-Relationship Data Model in DBMS
Entity-Relationship Data Model in DBMSEntity-Relationship Data Model in DBMS
Entity-Relationship Data Model in DBMS
 
Er model
Er modelEr model
Er model
 
DATA BASE MODEL Rohini
DATA BASE MODEL RohiniDATA BASE MODEL Rohini
DATA BASE MODEL Rohini
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and Development
 
The relational database model chapter 2
The relational database model  chapter 2The relational database model  chapter 2
The relational database model chapter 2
 
RDBMS Arch & Models
RDBMS Arch & ModelsRDBMS Arch & Models
RDBMS Arch & Models
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Presentation1
Presentation1Presentation1
Presentation1
 

Viewers also liked

Power Preparedness vs Recovery PTS
Power Preparedness vs Recovery PTSPower Preparedness vs Recovery PTS
Power Preparedness vs Recovery PTS
Kent McLemore
 

Viewers also liked (16)

Semana1 m2-del14-18 nov
Semana1 m2-del14-18 novSemana1 m2-del14-18 nov
Semana1 m2-del14-18 nov
 
Power Preparedness vs Recovery PTS
Power Preparedness vs Recovery PTSPower Preparedness vs Recovery PTS
Power Preparedness vs Recovery PTS
 
Semana 10 febrero7 al 10-m2
Semana 10 febrero7 al 10-m2Semana 10 febrero7 al 10-m2
Semana 10 febrero7 al 10-m2
 
155 695-1-pb
155 695-1-pb155 695-1-pb
155 695-1-pb
 
Guia de estudio 1er. par.calculo dif
Guia de estudio 1er. par.calculo difGuia de estudio 1er. par.calculo dif
Guia de estudio 1er. par.calculo dif
 
Think kidneys for care homes somerset
Think kidneys for care homes somersetThink kidneys for care homes somerset
Think kidneys for care homes somerset
 
Tics
TicsTics
Tics
 
Photography awardsslideshow
Photography awardsslideshowPhotography awardsslideshow
Photography awardsslideshow
 
St. Louis Office Outlook | Q1 2016
St. Louis Office Outlook | Q1 2016St. Louis Office Outlook | Q1 2016
St. Louis Office Outlook | Q1 2016
 
Дворец из мороженого
Дворец из мороженогоДворец из мороженого
Дворец из мороженого
 
Regional trails strategy presentation
Regional trails strategy presentation  Regional trails strategy presentation
Regional trails strategy presentation
 
Pix
PixPix
Pix
 
Preliminary task and planning & research
Preliminary task and planning & research   Preliminary task and planning & research
Preliminary task and planning & research
 
Aki and Care Homes
Aki and Care Homes Aki and Care Homes
Aki and Care Homes
 
Actividad ciudadano digital
Actividad ciudadano digitalActividad ciudadano digital
Actividad ciudadano digital
 
Acute kidney injury(AKI)
Acute kidney injury(AKI)Acute kidney injury(AKI)
Acute kidney injury(AKI)
 

Similar to Analysis 3 1

Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...
Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...
Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...
Anwar Patel
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
JasmineMichael1
 
introduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.pptintroduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.ppt
rekhasai2468
 
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdfSQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
RiturajDas28
 
ORACLE: Database management system student
ORACLE: Database management system studentORACLE: Database management system student
ORACLE: Database management system student
jomerson remorosa
 

Similar to Analysis 3 1 (20)

demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
overview of database concept
overview of database conceptoverview of database concept
overview of database concept
 
Database design
Database designDatabase design
Database design
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
DATA MODELS.pptx
DATA MODELS.pptxDATA MODELS.pptx
DATA MODELS.pptx
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
 
Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...
Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...
Lecture Basic HTML tags. Beginning Web Site Design Stanford University Contin...
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)
 
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
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
introduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.pptintroduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.ppt
 
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdfSQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
 
Access
AccessAccess
Access
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
ORACLE: Database management system student
ORACLE: Database management system studentORACLE: Database management system student
ORACLE: Database management system student
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
YibeltalNibretu
 

Recently uploaded (20)

50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

Analysis 3 1

  • 1. ANALYSIS 3.1 Defining Entities and Relationships
  • 2. Logical Design • Logical design is the entity design without regard to a relational database management system. • One of the principles of relational database is that the logical design should be the same regardless of the DBMS that will be used. • This means you don’t consider the particular limitations or features of a DBMS in the design
  • 3. Physical Design • Physical design is the logical design adapted to a particular DBMS. • The design can change slightly to fit into the limitations of a DBMS or to take advantage of DBMS-specific features. • Entity Relation Diagrams • Entity relation diagrams are a common way of diagramming entities, their attributes, and their relationships. • An entity is represented as a rectangle divided into three parts: • The name of the entity • The primary key • The attributes
  • 4. Entity Relationships • A relationship between entities is established by repeating one field, usually the primary key field, from one table in a second table, usually as a foreign key. • The primary key table is sometimes referred to as the “parent” table. • Tables with the foreign keys are referred to as “child” tables. • Crows’ Feet Notation for Relationships
  • 5. Naming Conventions • Naming conventions are crucial for good design. • Ideally you should have a consistent way of naming database objects, such as tables, attributes, keys, and any other database objects, such as stored procedures and triggers.
  • 6. Book Naming Conventions • Entities and tables are named as single nouns like Tutor, Student, and Session. • Attributes are named with the entity name followed by the attribute name. There are no underscores between. Each new word is capitalized: TutorLastName, • StudentLastName, and so on. This can make for long attribute names, but it makes for maximum clarity. • Primary keys end with the word “Key”: TutorKey, StudentKey, and so on. • Foreign keys retain the name of the primary key. • Term Equivalencies
  • 7. Repeating Fields • When creating an entity that can contain many of the same attributes, it is tempting to list or number them. • For example, a tutor can tutor many classes. • The temptation is to create an entity like the following (see next slide):
  • 8. Repeating Attribute Entity Resolution • Numbering attributes is always a mistake. • It is a sign that you should split the entity into two separate entities • Relationships • There are three types of relationships between entities: • One to one • One to many • Many to many
  • 9. One to One • A one-to-one relationship means that for every one record in the primary key table, there is no more than one related record in the foreign key table. • One-to-one relationships are rare. • They can be used to rid an entity of null (empty) attributes that inevitably result when contents of an entity have different attributes. • They are sometimes used when data is split between entities for security reasons.
  • 10. One to Many • A many-to-many relationship means that each record in the primary entity can have many related records in a second entity and each record in the second entity can have many related records in the primary entity. • Many-to-many relationships are legal in logical design, but no DBMS can implement them.
  • 11. One to Many (Cont.) • Many-to-many relationships must be resolved into two one-to-many relationships. • To do this, it is necessary to create a linking between the two tables that have many-to- many relationships.
  • 12. Cardinality • Cardinality describes the number of permissible relationships between two entities. • Maximum cardinality refers to the maximum number of permitted relationships. (For example, a customer can have no more than 4 listed emails.) • Minimum cardinality refers the minimum number of permitted relationships. (For example, each customer must have at least one purchase in the purchase table.)