SlideShare a Scribd company logo
DATABASE
MANAGEMENT
SYSTEMS
“
…repent therefore and be converted
2
…you must be born again
BIG CONCEPT
The Operating system is
a resource manager
3
Overview of Database Design
Database Design is a collection of processes that facilitate the
designing, development, implementation and maintenance of
enterprise data management systems.
• Properly designed databases are easy to maintain,
improves data consistency and are cost effective in terms
of disk storage space.
• The database designer decides how the data elements
correlate and what data must be stored.
4
Stages of Database Design
Three stages of Database Design
• Requirements Analysis: involves planning and system definition
• Database Designing: using models to represent the database.
• Implementation: implementing your created model on an
actual DBMS and making sure it works.
5
Database Design Models
• The main objectives of database design is to produce design
models of the proposed database system.
The logical model concentrates on
• the data requirements and the data to be stored.
It does not consider
• The physical database: how the data will be stored or where
it will be stored physically.
6
Database Design Models
The physical data design model
• The logical DB design of the database is translated onto a
physical media
• Uses hardware resources and software systems such as
database management systems (DBMS).
7
The Logical Model
Examples include:
• Hierarchical database model
• Relational model
• Network model
• Object-oriented database model
• Entity-relationship model 8
Entity-relationship model
• ER model stands for an Entity-Relationship model. It is a high-
level data model. This model is used to define the data
elements and relationship for a specified system.
• It develops a conceptual design for the database. It also
develops a very simple and easy to design view of data.
• In ER modeling, the database structure is portrayed as a
diagram called an entity-relationship diagram.
9
Component of ER Diagram
10
Entity-relationship model
• An entity is a representation of a real object, class, person or
place. In the ER diagram, an entity can be represented as
rectangles.
• Consider an organization as an example- manager, product,
employee, department etc. can be taken as an entity.
11
Entity-relationship model
Weak Entity
• An entity that depends on another entity called a weak
entity. The weak entity doesn't contain any key attribute of
its own. The weak entity is represented by a double
rectangle.
12
Entity-relationship model
Attribute
• The attribute is used to
describe the property of an
entity. Eclipse is used to
represent an attribute.
• For example, id, age, contact
number, name, etc. can be
attributes of a student.
13
Entity-relationship model
Key Attribute:
• represents an attribute or
group of attributes whose
values can be used to
uniquely identify an
individual entity.
• It is represented by an
underlined text
14
Entity-relationship model
Primary key:
• The primary key is a candidate key
that is to be used as an identifying
mechanism for the entity.
• It must uniquely identify tuples in a
table and not be null. The primary
key is indicated in the ER model by
underlining the attribute.
15
Entity-relationship model
Foreign key (FK) :
• An attribute in a table that references the primary key in another
table and can be null.
• Both foreign and primary keys must be of the same data type.
16
Entity-relationship model
Composite Attribute:
• An attribute that is composed
of many other attributes.
• It is represented by an ellipse,
which is connected with other
ellipses.
17
Entity-relationship model
Multivalued Attribute:
• An attribute that have more than one value.
• The double oval is used to represent multivalued attribute.
• For example, a student can have more than one phone
number.
18
Entity-relationship model
Derived Attribute:
• An attribute that can be derived
from other attribute.
• Represented by a dashed ellipse.
• Example: person's age. It changes
over time and can be derived
from another attribute like Date
of birth.
19
Entity-relationship model
Relationship:
• A relationship is used to describe the relation between entities.
• Diamond or rhombus is used to represent the relationship.
20
Entity-relationship model
Types of relationship are as follows::
One-to-One Relationship
• When only one instance of an entity is associated with the
relationship, then it is known as one to one relationship.
• For example, A female can marry one male, and a male can
marry one female.
21
Entity-relationship model
Types of relationship are as follows::
One-to-One Relationship
• When only one entity relates to only one other entity.
• For example, A female can marry one male, and a male can
marry one female.
22
Entity-relationship model
Types of relationship are as follows::
One-to-Many Relationship
• When only one entity relates to more than one entity.
• For example: a scientist can invent many inventions, but the
invention is done by the only specific scientist.
23
Entity-relationship model
Types of relationship
• Many-to-One Relationship
• Many-to-Many
24
Notations of ER Model
• A database can be
represented using the
notations.
• In ER model, many
notations are used to
express the cardinality.
These notations are as
follows:
25

More Related Content

Similar to DBMS-Lec2.pptx

er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
UmmerFarooq24
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modelling
g30162363
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
Enes Bolfidan
 
introduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.pptintroduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.ppt
rekhasai2468
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
Rupali Rana
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
raghuKatagall1
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
raghuKatagall1
 
Data Models
Data ModelsData Models
Data Models
BHARATH KUMAR
 
Database part3-
Database part3-Database part3-
Database part3-
Taymoor Nazmy
 
dbms (database management system )1.pptx
dbms (database management system )1.pptxdbms (database management system )1.pptx
dbms (database management system )1.pptx
227r1a0519
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
sandeep54552
 
RDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptxRDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptx
premak23
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
Slideshare
 
720 Class 04 - Data Modeling.pptx
720 Class 04 - Data Modeling.pptx720 Class 04 - Data Modeling.pptx
720 Class 04 - Data Modeling.pptx
SarahBarrett71
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
نبيله نواز
 
Data base management system(DBMS), sourav mathur
Data base management system(DBMS), sourav mathurData base management system(DBMS), sourav mathur
Data base management system(DBMS), sourav mathur
sourav mathur
 
ER modeling
ER modelingER modeling
ER modeling
Dabbal Singh Mahara
 
ER-Diagram.pptx
ER-Diagram.pptxER-Diagram.pptx
ER-Diagram.pptx
SherinRappai1
 
DBMS unit-2.pdf
DBMS unit-2.pdfDBMS unit-2.pdf
DBMS unit-2.pdf
Prof. Dr. K. Adisesha
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In Introduction
Rajeev Srivastava
 

Similar to DBMS-Lec2.pptx (20)

er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modelling
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
introduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.pptintroduction-to-dbms-unit-1.ppt
introduction-to-dbms-unit-1.ppt
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Data Models
Data ModelsData Models
Data Models
 
Database part3-
Database part3-Database part3-
Database part3-
 
dbms (database management system )1.pptx
dbms (database management system )1.pptxdbms (database management system )1.pptx
dbms (database management system )1.pptx
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
RDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptxRDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptx
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
720 Class 04 - Data Modeling.pptx
720 Class 04 - Data Modeling.pptx720 Class 04 - Data Modeling.pptx
720 Class 04 - Data Modeling.pptx
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Data base management system(DBMS), sourav mathur
Data base management system(DBMS), sourav mathurData base management system(DBMS), sourav mathur
Data base management system(DBMS), sourav mathur
 
ER modeling
ER modelingER modeling
ER modeling
 
ER-Diagram.pptx
ER-Diagram.pptxER-Diagram.pptx
ER-Diagram.pptx
 
DBMS unit-2.pdf
DBMS unit-2.pdfDBMS unit-2.pdf
DBMS unit-2.pdf
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In Introduction
 

Recently uploaded

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 

Recently uploaded (20)

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 

DBMS-Lec2.pptx

  • 2. “ …repent therefore and be converted 2 …you must be born again
  • 3. BIG CONCEPT The Operating system is a resource manager 3
  • 4. Overview of Database Design Database Design is a collection of processes that facilitate the designing, development, implementation and maintenance of enterprise data management systems. • Properly designed databases are easy to maintain, improves data consistency and are cost effective in terms of disk storage space. • The database designer decides how the data elements correlate and what data must be stored. 4
  • 5. Stages of Database Design Three stages of Database Design • Requirements Analysis: involves planning and system definition • Database Designing: using models to represent the database. • Implementation: implementing your created model on an actual DBMS and making sure it works. 5
  • 6. Database Design Models • The main objectives of database design is to produce design models of the proposed database system. The logical model concentrates on • the data requirements and the data to be stored. It does not consider • The physical database: how the data will be stored or where it will be stored physically. 6
  • 7. Database Design Models The physical data design model • The logical DB design of the database is translated onto a physical media • Uses hardware resources and software systems such as database management systems (DBMS). 7
  • 8. The Logical Model Examples include: • Hierarchical database model • Relational model • Network model • Object-oriented database model • Entity-relationship model 8
  • 9. Entity-relationship model • ER model stands for an Entity-Relationship model. It is a high- level data model. This model is used to define the data elements and relationship for a specified system. • It develops a conceptual design for the database. It also develops a very simple and easy to design view of data. • In ER modeling, the database structure is portrayed as a diagram called an entity-relationship diagram. 9
  • 10. Component of ER Diagram 10
  • 11. Entity-relationship model • An entity is a representation of a real object, class, person or place. In the ER diagram, an entity can be represented as rectangles. • Consider an organization as an example- manager, product, employee, department etc. can be taken as an entity. 11
  • 12. Entity-relationship model Weak Entity • An entity that depends on another entity called a weak entity. The weak entity doesn't contain any key attribute of its own. The weak entity is represented by a double rectangle. 12
  • 13. Entity-relationship model Attribute • The attribute is used to describe the property of an entity. Eclipse is used to represent an attribute. • For example, id, age, contact number, name, etc. can be attributes of a student. 13
  • 14. Entity-relationship model Key Attribute: • represents an attribute or group of attributes whose values can be used to uniquely identify an individual entity. • It is represented by an underlined text 14
  • 15. Entity-relationship model Primary key: • The primary key is a candidate key that is to be used as an identifying mechanism for the entity. • It must uniquely identify tuples in a table and not be null. The primary key is indicated in the ER model by underlining the attribute. 15
  • 16. Entity-relationship model Foreign key (FK) : • An attribute in a table that references the primary key in another table and can be null. • Both foreign and primary keys must be of the same data type. 16
  • 17. Entity-relationship model Composite Attribute: • An attribute that is composed of many other attributes. • It is represented by an ellipse, which is connected with other ellipses. 17
  • 18. Entity-relationship model Multivalued Attribute: • An attribute that have more than one value. • The double oval is used to represent multivalued attribute. • For example, a student can have more than one phone number. 18
  • 19. Entity-relationship model Derived Attribute: • An attribute that can be derived from other attribute. • Represented by a dashed ellipse. • Example: person's age. It changes over time and can be derived from another attribute like Date of birth. 19
  • 20. Entity-relationship model Relationship: • A relationship is used to describe the relation between entities. • Diamond or rhombus is used to represent the relationship. 20
  • 21. Entity-relationship model Types of relationship are as follows:: One-to-One Relationship • When only one instance of an entity is associated with the relationship, then it is known as one to one relationship. • For example, A female can marry one male, and a male can marry one female. 21
  • 22. Entity-relationship model Types of relationship are as follows:: One-to-One Relationship • When only one entity relates to only one other entity. • For example, A female can marry one male, and a male can marry one female. 22
  • 23. Entity-relationship model Types of relationship are as follows:: One-to-Many Relationship • When only one entity relates to more than one entity. • For example: a scientist can invent many inventions, but the invention is done by the only specific scientist. 23
  • 24. Entity-relationship model Types of relationship • Many-to-One Relationship • Many-to-Many 24
  • 25. Notations of ER Model • A database can be represented using the notations. • In ER model, many notations are used to express the cardinality. These notations are as follows: 25