SlideShare a Scribd company logo
RELATIONSHIP
IN DBMS
 ADARSHA DALABEHERA-220301120183
 RUDRA PRASAD BARAL-220301120187
 G. SIPRARANI PATRA-220301120188
 ABHIPSA SAHOO-220301120189
 NYAYABRATA DAS -220301120191
CONTENTS:-
Introduction
How are relationships established ?
keys
Why are relationships important in a Database ?
Relationship
Types of relationship
Importance of relationship in DBMS
Conclusion
INTRODUCTION:-
A relationship in DBMS is the way in which two or
more data sets are linked i.e, any association between
two entity types is called a relationship.
The main feature of relational database is relationships.
Different relationship types control how the data and
tables relate to one another.
Establishing relationship makes this database type
unique, and knowing how relationship works helps
broaden database modeling capabilities.
 How are relationships established ?
The two following elements define how a database
relationship is established.
 Primary key
 Foreign key
KEYS :-
Keys play an important role in the relational database.
It is used to uniquely identify any record or row of data from the table.
 It is also used to establish and identify relationships between tables.
PRIMARY KEY:-
It is the first key used to identify one and only one instance of an entity uniquely. An
entity can contain multiple keys, as we saw in the PERSON table. The key which is
most suitable from those lists becomes a primary key.
In the EMPLOYEE table, ID can be the primary key since it is unique for each
employee. In the EMPLOYEE table, we can even select License Number and Passport
Number as primary keys since they are also unique.
For each entity, the primary key selection is based on requirements and developers.
FOREIGN KEY:-
When tables relate , the primary key of one table becomes a foreign key of the
other table.
For the example, in the two tables on the right , employees table as a primary
key and in the order as a foreign key .
FOREIGN KEY when tables are linked by the primary key, the related field in
the second table is known as the foreign key.
CANDIDATE KEY:-
A candidate key is an attribute or set of attributes that can uniquely
identify a tuple(A tuple in DBMS is a collection of attribute values in
which no two unique items have the same name.).
Except for the primary key, the remaining attributes are considered a
candidate key.
 The candidate keys are as strong as the primary key.
Example:-
• In the EMPLOYEE table, id is best suited for the primary key. The rest of the
attributes, like SSN, Passport_Number, License_Number, etc., are considered a
candidate key.
Candidate key
SUPER KEYS :
• Super key is an attribute set that can uniquely identify a tuple. A super
key is a superset of a candidate key.
• For example: In the EMPLOYEE table, for(EMPLOEE_ID,
EMPLOYEE_NAME), the name of two employees can be the same,
but their EMPLYEE_ID can't be the same. Hence, this combination
can also be a key.
ALTERNATE KEY:-
Alternate Key or Secondary Key is the key that has not been selected to be
the primary key, but are candidate keys.
 However, it is considered a candidate key for the primary key.
For example, employee relation has two attributes, Employee_Id and
PAN_No, that act as candidate keys. In this relation, Employee_Id is
chosen as the primary key, so the other candidate key, PAN_No, acts as
the Alternate key.
COMPOSITE KEY:-
Whenever a primary key consists of more than one attribute, it is known
as a composite key. This key is also known as Concatenated Key.
For example, in employee relations, we assume that an employee may
be assigned multiple roles, and an employee may work on multiple
projects simultaneously. So the primary key will be composed of all three
attributes, namely Emp_ID, Emp_role, and Proj_ID in combination. So
these attributes act as a composite key since the primary key comprises
more than one attribute.
ARTIFICIAL KEY:-
The key created using arbitrarily assigned data are known as artificial keys.
These keys are created when a primary key is large and complex and has no
relationship with many other relations.
The data values of the artificial keys are usually numbered in a serial order.
For example, the primary key, which is composed of Emp_ID, Emp_role,
and Proj_ID, is large in employee relations. So it would be better to add a new
virtual attribute to identify each tuple in the relation uniquely.
 Why are relationships important
in a Database ?
Relationships in a database help create meaningful information. As
a result, database relationships result in:
 Reduced data redundancy : Relationships help reference
information stored in existing tables, reducing repetition.
Better organized database : Relationships help implement
database normalization techniques. Normalization helps yield a
better organized and robust database.
 Referential integrity : As database grow, joins quires and sorting become
expensive. Relationships help reduce the number of transactions and improve
data validity.
RELATIONSHIP:-
DBMS, or Database Management Systems, is the process through which a Database
is managed or controlled.
A database is a collection of data. It may be in the form of tables, columns, charts,
texts, etc.
The way these databases are acted upon gives us , we call Database management
systems or DBMS.
The different steps that are taken to retrieve the data as well as store it, keeping in
mind strict security concerns, is the ideal definition of a DBMS.
CONTINUED:-
The different steps that are taken to retrieve the data as well as store
it, keeping in mind strict security concerns, is the ideal definition of a
DBMS.
A relationship is used to describe the relation between entities.
Diamond or rhombus is used to represent the relationship.
TYPES OF RELATIONSHIPS IN DBMS:-
There are four types of relationships that can be
found in DBMS:-
One to One
One to Many
Many to one
Many to Many
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 to one
male, and a male can marry to one
female.
CONTINUED :-
In a one-to-one relationship, one record in a tables is associated with one and
only one record in another table. For example, in a school database, each
student has only one student ID, and each student ID is assigned to only one
person.
A one-to-one relationship looks like this in the relationships graph.
CONTINUED :-
In this example, the key field in each table, Student ID, is designed to
contain unique values. In the students table, the student ID field is the
Primary key; in the contact info table, the student ID field is a Foreign
key.
This relationship returns related records when the value in the Student
ID field in the Contact Info table is the same as the Student ID field in
the Students table.
ONE-TO-MANY RELATIONSHIP:-
When only one instance of the entity on the left, and more than one instance of an
entity on the right associates with the relationship then this is known as a one-to-
many relationship.
For example, Scientist can invent many inventions, but the invention is done by
the only specific scientist.
CONTINUED :-
To support a one-to-many relationship, we need to design
two tables.
We can then create the one-to-many relationship by storing
the primary key of the table Teacher (i.e., teacherID) (the
"one"-end or the parent table) in the table classes (the
"many"-end or the child table), as illustrated below.
The column teacherID in the child table Classes is known
as the foreign key. A foreign key of a child table is a
primary key of a parent table, used to reference the parent
table.
MANY-TO-ONE RELATIONSHIP:-
When more than one instance of the entity on the left, and only one
instance of an entity on the right associates with the relationship then it
is known as a many-to-one relationship.
For example, Student enrolls for only one course, but a course can have
many students.
In relational databases, many-to-one relationships are often enforced by
foreign key/primary key relationships, and the relationships typically are
between fact and dimension tables and between levels in a hierarchy.
The relationship is often used to describe classifications or groupings.
MANY-TO-MANY RELATIONSHIP:-
When more than one instance of the entity on the left, and more than
one instance of an entity on the right associates with the relationship
then it is known as a many-to-many relationship.
For example, Employee can assign by many projects and project can
have many employees.
CONTINUED :-
In this table where each row represent an item
of a particular order. For orderdetails table the
primary key consists of two columns : orderID
and productID, that uniquely identifies each
row.
The many-to-many relationship is, in fact,
implemented as two one-to-many relationships,
with the introduction of the junction table.
An order has many items in OrderDetails. An
OrderDetails item belongs to one particular
order.
A product may appear in many OrderDetails.
Each OrderDetails item specified one product.
CONTINUED:-
An order has many items in OrderDetails. An OrderDetails item belongs to one
particular order.
A product may appear in many OrderDetails. Each OrderDetails item specified one
product.
CONCLUSION:-
The relationship in a Database Management System (DBMS)
is the most essential part of its functioning. Without proper
relationships, the entire database structure would become
useless. We also need to keep in mind that though it is
essential to create relationships that may look to be complex
at times, it has to be thought after and well-defined for a
favorable outcome.
THANK YOU

More Related Content

What's hot

ER MODEL
ER MODELER MODEL
ER MODEL
Rupali Rana
 
Referential integrity
Referential integrityReferential integrity
Referential integrity
Jubin Raju
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
Smriti Jain
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
Siti Ismail
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
Shakila Mahjabin
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 
Entities and attributes
Entities and attributesEntities and attributes
Entities and attributes
Forrester High School
 
Dbms keys
Dbms keysDbms keys
Dbms keys
RUpaliLohar
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
joins in database
 joins in database joins in database
joins in database
Sultan Arshad
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
Database Keys
Database KeysDatabase Keys
Database Keys
Forrester High School
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
Pradnya Saval
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
Akanksha Jaiswal
 
Database Chapter 3
Database Chapter 3Database Chapter 3
Database Chapter 3
shahadat hossain
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
Mudasir Qazi
 

What's hot (20)

ER MODEL
ER MODELER MODEL
ER MODEL
 
Referential integrity
Referential integrityReferential integrity
Referential integrity
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Entities and attributes
Entities and attributesEntities and attributes
Entities and attributes
 
Dbms keys
Dbms keysDbms keys
Dbms keys
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
joins in database
 joins in database joins in database
joins in database
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Database Keys
Database KeysDatabase Keys
Database Keys
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Database Chapter 3
Database Chapter 3Database Chapter 3
Database Chapter 3
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 

Similar to RELATIONSHIP IN DBMS.pptx

Data resource management
Data resource managementData resource management
Data resource management
Nirajan Silwal
 
Database Concepts.pptx
Database Concepts.pptxDatabase Concepts.pptx
Database Concepts.pptx
DhruvSavaliya9
 
B & c
B & cB & c
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
Abhinayacheekati
 
ans_dbms.pdf
ans_dbms.pdfans_dbms.pdf
ans_dbms.pdf
SandipPradhan23
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
Dolchandra
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
Dolchandra
 
Data processing
Data processingData processing
Data processing
Joseph Lagod
 
MIS201 SQL database .pdf
MIS201  SQL database .pdfMIS201  SQL database .pdf
MIS201 SQL database .pdf
DrSalehAlSaleh
 
Unit 2 DBMS.pptx
Unit 2 DBMS.pptxUnit 2 DBMS.pptx
Unit 2 DBMS.pptx
ssuserc8e1481
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
Nikhil Deswal
 
Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship
ShouaQureshi
 
Design your own database
Design your own databaseDesign your own database
Design your own database
Frank Katta
 
2.2 keys
2.2 keys2.2 keys
2.2 keysELIMENG
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
harshalkwagh999
 
Database and Math Relations
Database and Math RelationsDatabase and Math Relations
Database and Math Relations
Prof Ansari
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
fikadumola
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
fanta teferi
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
نبيله نواز
 

Similar to RELATIONSHIP IN DBMS.pptx (20)

Data resource management
Data resource managementData resource management
Data resource management
 
Database Concepts.pptx
Database Concepts.pptxDatabase Concepts.pptx
Database Concepts.pptx
 
B & c
B & cB & c
B & c
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
 
ans_dbms.pdf
ans_dbms.pdfans_dbms.pdf
ans_dbms.pdf
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
 
Data processing
Data processingData processing
Data processing
 
MIS201 SQL database .pdf
MIS201  SQL database .pdfMIS201  SQL database .pdf
MIS201 SQL database .pdf
 
Unit 2 DBMS.pptx
Unit 2 DBMS.pptxUnit 2 DBMS.pptx
Unit 2 DBMS.pptx
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
 
Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship
 
Design your own database
Design your own databaseDesign your own database
Design your own database
 
2.2 keys
2.2 keys2.2 keys
2.2 keys
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Database and Math Relations
Database and Math RelationsDatabase and Math Relations
Database and Math Relations
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Database design
Database designDatabase design
Database design
 

More from KAnurag2

twitter ppt .pptx
twitter ppt                                  .pptxtwitter ppt                                  .pptx
twitter ppt .pptx
KAnurag2
 
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.pptModule-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
KAnurag2
 
Module III - 1 - Orders of Growth.p df
Module III - 1 - Orders of Growth.p   dfModule III - 1 - Orders of Growth.p   df
Module III - 1 - Orders of Growth.p df
KAnurag2
 
Module-2Deadlock.ppt
Module-2Deadlock.pptModule-2Deadlock.ppt
Module-2Deadlock.ppt
KAnurag2
 
dsppt-141121224848-conversion-gate01.pptx
dsppt-141121224848-conversion-gate01.pptxdsppt-141121224848-conversion-gate01.pptx
dsppt-141121224848-conversion-gate01.pptx
KAnurag2
 
Feasibility Study.pptx
Feasibility Study.pptxFeasibility Study.pptx
Feasibility Study.pptx
KAnurag2
 
Law-Of-Supply-_-Elasticity-of-Supply-PPT.ppt
Law-Of-Supply-_-Elasticity-of-Supply-PPT.pptLaw-Of-Supply-_-Elasticity-of-Supply-PPT.ppt
Law-Of-Supply-_-Elasticity-of-Supply-PPT.ppt
KAnurag2
 
dsa project.pptx
dsa project.pptxdsa project.pptx
dsa project.pptx
KAnurag2
 
Transformer.pptx
Transformer.pptxTransformer.pptx
Transformer.pptx
KAnurag2
 
key (1).pptx
key (1).pptxkey (1).pptx
key (1).pptx
KAnurag2
 
C PROJECT 1.pptx
C PROJECT 1.pptxC PROJECT 1.pptx
C PROJECT 1.pptx
KAnurag2
 
PPT - Independent and Dependent.pptx
PPT - Independent and Dependent.pptxPPT - Independent and Dependent.pptx
PPT - Independent and Dependent.pptx
KAnurag2
 
MATH PROJECT (3).pptx
MATH PROJECT (3).pptxMATH PROJECT (3).pptx
MATH PROJECT (3).pptx
KAnurag2
 
Operting system
Operting systemOperting system
Operting system
KAnurag2
 
DBMS .pptx
DBMS .pptxDBMS .pptx
DBMS .pptx
KAnurag2
 
ML PROJECT FINAL[1].pptx
ML PROJECT FINAL[1].pptxML PROJECT FINAL[1].pptx
ML PROJECT FINAL[1].pptx
KAnurag2
 
Project 1.pptx
Project 1.pptxProject 1.pptx
Project 1.pptx
KAnurag2
 
RLC Circuits^Jpedulum.pptx
RLC Circuits^Jpedulum.pptxRLC Circuits^Jpedulum.pptx
RLC Circuits^Jpedulum.pptx
KAnurag2
 
Human-Rights_Basic-Concepts-1.pptx
Human-Rights_Basic-Concepts-1.pptxHuman-Rights_Basic-Concepts-1.pptx
Human-Rights_Basic-Concepts-1.pptx
KAnurag2
 
DBMS[1].pptx
DBMS[1].pptxDBMS[1].pptx
DBMS[1].pptx
KAnurag2
 

More from KAnurag2 (20)

twitter ppt .pptx
twitter ppt                                  .pptxtwitter ppt                                  .pptx
twitter ppt .pptx
 
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.pptModule-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
 
Module III - 1 - Orders of Growth.p df
Module III - 1 - Orders of Growth.p   dfModule III - 1 - Orders of Growth.p   df
Module III - 1 - Orders of Growth.p df
 
Module-2Deadlock.ppt
Module-2Deadlock.pptModule-2Deadlock.ppt
Module-2Deadlock.ppt
 
dsppt-141121224848-conversion-gate01.pptx
dsppt-141121224848-conversion-gate01.pptxdsppt-141121224848-conversion-gate01.pptx
dsppt-141121224848-conversion-gate01.pptx
 
Feasibility Study.pptx
Feasibility Study.pptxFeasibility Study.pptx
Feasibility Study.pptx
 
Law-Of-Supply-_-Elasticity-of-Supply-PPT.ppt
Law-Of-Supply-_-Elasticity-of-Supply-PPT.pptLaw-Of-Supply-_-Elasticity-of-Supply-PPT.ppt
Law-Of-Supply-_-Elasticity-of-Supply-PPT.ppt
 
dsa project.pptx
dsa project.pptxdsa project.pptx
dsa project.pptx
 
Transformer.pptx
Transformer.pptxTransformer.pptx
Transformer.pptx
 
key (1).pptx
key (1).pptxkey (1).pptx
key (1).pptx
 
C PROJECT 1.pptx
C PROJECT 1.pptxC PROJECT 1.pptx
C PROJECT 1.pptx
 
PPT - Independent and Dependent.pptx
PPT - Independent and Dependent.pptxPPT - Independent and Dependent.pptx
PPT - Independent and Dependent.pptx
 
MATH PROJECT (3).pptx
MATH PROJECT (3).pptxMATH PROJECT (3).pptx
MATH PROJECT (3).pptx
 
Operting system
Operting systemOperting system
Operting system
 
DBMS .pptx
DBMS .pptxDBMS .pptx
DBMS .pptx
 
ML PROJECT FINAL[1].pptx
ML PROJECT FINAL[1].pptxML PROJECT FINAL[1].pptx
ML PROJECT FINAL[1].pptx
 
Project 1.pptx
Project 1.pptxProject 1.pptx
Project 1.pptx
 
RLC Circuits^Jpedulum.pptx
RLC Circuits^Jpedulum.pptxRLC Circuits^Jpedulum.pptx
RLC Circuits^Jpedulum.pptx
 
Human-Rights_Basic-Concepts-1.pptx
Human-Rights_Basic-Concepts-1.pptxHuman-Rights_Basic-Concepts-1.pptx
Human-Rights_Basic-Concepts-1.pptx
 
DBMS[1].pptx
DBMS[1].pptxDBMS[1].pptx
DBMS[1].pptx
 

Recently uploaded

How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring ChapterHow Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
Hector Del Castillo, CPM, CPMM
 
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Dirk Spencer Corporate Recruiter LION
 
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdfDOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
Pushpendra Kumar
 
Heidi Livengood Resume Senior Technical Recruiter / HR Generalist
Heidi Livengood Resume Senior Technical Recruiter / HR GeneralistHeidi Livengood Resume Senior Technical Recruiter / HR Generalist
Heidi Livengood Resume Senior Technical Recruiter / HR Generalist
HeidiLivengood
 
Personal Brand exploration KE.pdf for assignment
Personal Brand exploration KE.pdf for assignmentPersonal Brand exploration KE.pdf for assignment
Personal Brand exploration KE.pdf for assignment
ragingokie
 
Full Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptxFull Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptx
mmorales2173
 
134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science
Manu Mitra
 
The Impact of Artificial Intelligence on Modern Society.pdf
The Impact of Artificial Intelligence on Modern Society.pdfThe Impact of Artificial Intelligence on Modern Society.pdf
The Impact of Artificial Intelligence on Modern Society.pdf
ssuser3e63fc
 
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
foismail170
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
pxyhy
 
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
Chapters 3  Contracts.pptx Chapters 3  Contracts.pptxChapters 3  Contracts.pptx Chapters 3  Contracts.pptx
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
Sheldon Byron
 
han han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi samahan han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi sama
IrlanMalik
 
一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理
yuhofha
 
Digital Marketing Training In Bangalore
Digital  Marketing Training In BangaloreDigital  Marketing Training In Bangalore
Digital Marketing Training In Bangalore
nidm599
 
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaInteractive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
23211a7274
 
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
atwvhyhm
 
Andrea Kate Portfolio Presentation.pdf
Andrea Kate  Portfolio  Presentation.pdfAndrea Kate  Portfolio  Presentation.pdf
Andrea Kate Portfolio Presentation.pdf
andreakaterasco
 
New Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdfNew Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdf
Dr. Mary Askew
 
How to create an effective K-POC tutorial
How to create an effective K-POC tutorialHow to create an effective K-POC tutorial
How to create an effective K-POC tutorial
vencislavkaaa
 
Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!
LukeRoyak
 

Recently uploaded (20)

How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring ChapterHow Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
 
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
 
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdfDOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
 
Heidi Livengood Resume Senior Technical Recruiter / HR Generalist
Heidi Livengood Resume Senior Technical Recruiter / HR GeneralistHeidi Livengood Resume Senior Technical Recruiter / HR Generalist
Heidi Livengood Resume Senior Technical Recruiter / HR Generalist
 
Personal Brand exploration KE.pdf for assignment
Personal Brand exploration KE.pdf for assignmentPersonal Brand exploration KE.pdf for assignment
Personal Brand exploration KE.pdf for assignment
 
Full Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptxFull Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptx
 
134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science
 
The Impact of Artificial Intelligence on Modern Society.pdf
The Impact of Artificial Intelligence on Modern Society.pdfThe Impact of Artificial Intelligence on Modern Society.pdf
The Impact of Artificial Intelligence on Modern Society.pdf
 
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
 
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
Chapters 3  Contracts.pptx Chapters 3  Contracts.pptxChapters 3  Contracts.pptx Chapters 3  Contracts.pptx
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
 
han han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi samahan han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi sama
 
一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理
 
Digital Marketing Training In Bangalore
Digital  Marketing Training In BangaloreDigital  Marketing Training In Bangalore
Digital Marketing Training In Bangalore
 
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaInteractive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
 
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
 
Andrea Kate Portfolio Presentation.pdf
Andrea Kate  Portfolio  Presentation.pdfAndrea Kate  Portfolio  Presentation.pdf
Andrea Kate Portfolio Presentation.pdf
 
New Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdfNew Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdf
 
How to create an effective K-POC tutorial
How to create an effective K-POC tutorialHow to create an effective K-POC tutorial
How to create an effective K-POC tutorial
 
Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!
 

RELATIONSHIP IN DBMS.pptx

  • 1. RELATIONSHIP IN DBMS  ADARSHA DALABEHERA-220301120183  RUDRA PRASAD BARAL-220301120187  G. SIPRARANI PATRA-220301120188  ABHIPSA SAHOO-220301120189  NYAYABRATA DAS -220301120191
  • 2. CONTENTS:- Introduction How are relationships established ? keys Why are relationships important in a Database ? Relationship Types of relationship Importance of relationship in DBMS Conclusion
  • 3. INTRODUCTION:- A relationship in DBMS is the way in which two or more data sets are linked i.e, any association between two entity types is called a relationship. The main feature of relational database is relationships. Different relationship types control how the data and tables relate to one another. Establishing relationship makes this database type unique, and knowing how relationship works helps broaden database modeling capabilities.
  • 4.  How are relationships established ? The two following elements define how a database relationship is established.  Primary key  Foreign key
  • 5. KEYS :- Keys play an important role in the relational database. It is used to uniquely identify any record or row of data from the table.  It is also used to establish and identify relationships between tables.
  • 6. PRIMARY KEY:- It is the first key used to identify one and only one instance of an entity uniquely. An entity can contain multiple keys, as we saw in the PERSON table. The key which is most suitable from those lists becomes a primary key. In the EMPLOYEE table, ID can be the primary key since it is unique for each employee. In the EMPLOYEE table, we can even select License Number and Passport Number as primary keys since they are also unique. For each entity, the primary key selection is based on requirements and developers.
  • 7. FOREIGN KEY:- When tables relate , the primary key of one table becomes a foreign key of the other table. For the example, in the two tables on the right , employees table as a primary key and in the order as a foreign key . FOREIGN KEY when tables are linked by the primary key, the related field in the second table is known as the foreign key.
  • 8. CANDIDATE KEY:- A candidate key is an attribute or set of attributes that can uniquely identify a tuple(A tuple in DBMS is a collection of attribute values in which no two unique items have the same name.). Except for the primary key, the remaining attributes are considered a candidate key.  The candidate keys are as strong as the primary key.
  • 9. Example:- • In the EMPLOYEE table, id is best suited for the primary key. The rest of the attributes, like SSN, Passport_Number, License_Number, etc., are considered a candidate key. Candidate key
  • 10. SUPER KEYS : • Super key is an attribute set that can uniquely identify a tuple. A super key is a superset of a candidate key. • For example: In the EMPLOYEE table, for(EMPLOEE_ID, EMPLOYEE_NAME), the name of two employees can be the same, but their EMPLYEE_ID can't be the same. Hence, this combination can also be a key.
  • 11. ALTERNATE KEY:- Alternate Key or Secondary Key is the key that has not been selected to be the primary key, but are candidate keys.  However, it is considered a candidate key for the primary key. For example, employee relation has two attributes, Employee_Id and PAN_No, that act as candidate keys. In this relation, Employee_Id is chosen as the primary key, so the other candidate key, PAN_No, acts as the Alternate key.
  • 12. COMPOSITE KEY:- Whenever a primary key consists of more than one attribute, it is known as a composite key. This key is also known as Concatenated Key. For example, in employee relations, we assume that an employee may be assigned multiple roles, and an employee may work on multiple projects simultaneously. So the primary key will be composed of all three attributes, namely Emp_ID, Emp_role, and Proj_ID in combination. So these attributes act as a composite key since the primary key comprises more than one attribute.
  • 13. ARTIFICIAL KEY:- The key created using arbitrarily assigned data are known as artificial keys. These keys are created when a primary key is large and complex and has no relationship with many other relations. The data values of the artificial keys are usually numbered in a serial order. For example, the primary key, which is composed of Emp_ID, Emp_role, and Proj_ID, is large in employee relations. So it would be better to add a new virtual attribute to identify each tuple in the relation uniquely.
  • 14.  Why are relationships important in a Database ? Relationships in a database help create meaningful information. As a result, database relationships result in:  Reduced data redundancy : Relationships help reference information stored in existing tables, reducing repetition. Better organized database : Relationships help implement database normalization techniques. Normalization helps yield a better organized and robust database.  Referential integrity : As database grow, joins quires and sorting become expensive. Relationships help reduce the number of transactions and improve data validity.
  • 15. RELATIONSHIP:- DBMS, or Database Management Systems, is the process through which a Database is managed or controlled. A database is a collection of data. It may be in the form of tables, columns, charts, texts, etc. The way these databases are acted upon gives us , we call Database management systems or DBMS. The different steps that are taken to retrieve the data as well as store it, keeping in mind strict security concerns, is the ideal definition of a DBMS.
  • 16. CONTINUED:- The different steps that are taken to retrieve the data as well as store it, keeping in mind strict security concerns, is the ideal definition of a DBMS. A relationship is used to describe the relation between entities. Diamond or rhombus is used to represent the relationship.
  • 17. TYPES OF RELATIONSHIPS IN DBMS:- There are four types of relationships that can be found in DBMS:- One to One One to Many Many to one Many to Many
  • 18. 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 to one male, and a male can marry to one female.
  • 19. CONTINUED :- In a one-to-one relationship, one record in a tables is associated with one and only one record in another table. For example, in a school database, each student has only one student ID, and each student ID is assigned to only one person. A one-to-one relationship looks like this in the relationships graph.
  • 20. CONTINUED :- In this example, the key field in each table, Student ID, is designed to contain unique values. In the students table, the student ID field is the Primary key; in the contact info table, the student ID field is a Foreign key. This relationship returns related records when the value in the Student ID field in the Contact Info table is the same as the Student ID field in the Students table.
  • 21. ONE-TO-MANY RELATIONSHIP:- When only one instance of the entity on the left, and more than one instance of an entity on the right associates with the relationship then this is known as a one-to- many relationship. For example, Scientist can invent many inventions, but the invention is done by the only specific scientist.
  • 22. CONTINUED :- To support a one-to-many relationship, we need to design two tables. We can then create the one-to-many relationship by storing the primary key of the table Teacher (i.e., teacherID) (the "one"-end or the parent table) in the table classes (the "many"-end or the child table), as illustrated below. The column teacherID in the child table Classes is known as the foreign key. A foreign key of a child table is a primary key of a parent table, used to reference the parent table.
  • 23. MANY-TO-ONE RELATIONSHIP:- When more than one instance of the entity on the left, and only one instance of an entity on the right associates with the relationship then it is known as a many-to-one relationship. For example, Student enrolls for only one course, but a course can have many students.
  • 24. In relational databases, many-to-one relationships are often enforced by foreign key/primary key relationships, and the relationships typically are between fact and dimension tables and between levels in a hierarchy. The relationship is often used to describe classifications or groupings.
  • 25. MANY-TO-MANY RELATIONSHIP:- When more than one instance of the entity on the left, and more than one instance of an entity on the right associates with the relationship then it is known as a many-to-many relationship. For example, Employee can assign by many projects and project can have many employees.
  • 26. CONTINUED :- In this table where each row represent an item of a particular order. For orderdetails table the primary key consists of two columns : orderID and productID, that uniquely identifies each row. The many-to-many relationship is, in fact, implemented as two one-to-many relationships, with the introduction of the junction table. An order has many items in OrderDetails. An OrderDetails item belongs to one particular order. A product may appear in many OrderDetails. Each OrderDetails item specified one product.
  • 27. CONTINUED:- An order has many items in OrderDetails. An OrderDetails item belongs to one particular order. A product may appear in many OrderDetails. Each OrderDetails item specified one product.
  • 28. CONCLUSION:- The relationship in a Database Management System (DBMS) is the most essential part of its functioning. Without proper relationships, the entire database structure would become useless. We also need to keep in mind that though it is essential to create relationships that may look to be complex at times, it has to be thought after and well-defined for a favorable outcome.