SlideShare une entreprise Scribd logo
1  sur  16
Relational Database Management Systems
Objectives


               In this session, you will learn to:
                  Map an ER diagram to a table




    Ver. 1.0                        Session 2        Slide 1 of 16
Relational Database Management Systems
Conceptual Model


               Reflects entities and their relationships, based on the data
               processing needs of an organization
               Can be mapped to a relational, hierarchical, or network
               model
               Is independent of individual applications, database
               management systems, hardware, and physical storage of
               data




    Ver. 1.0                       Session 2                         Slide 2 of 16
Relational Database Management Systems
Mapping ERDs to Tables


               • A database that conforms to an ER diagram can be
                 represented by a collection of tables in the relational
                 system.
               • The mapping of ER diagrams to tables can be discussed in
                 relation to the following:
                     Regular entities
                     Attributes
                     Relationships
                     Weak entities
                     Subtypes and Supertypes




    Ver. 1.0                         Session 2                     Slide 3 of 16
Relational Database Management Systems
Regular Entities


                They can exist in isolation, independent of any other entity.
                They are the “building blocks” of the database.
                Each regular entity maps to a table.




     Ver. 1.0                       Session 2                          Slide 4 of 16
Relational Database Management Systems
Attributes


               Each property or attribute shown in the ER diagram maps to
               a column in the appropriate table.




    Ver. 1.0                      Session 2                       Slide 5 of 16
Relational Database Management Systems
Relationships


               Each type of relationship maps to tables in a different
               manner in the relational database management system.
               The most important principle is to create tables where
               information from the real world is stored and retrieved in an
               optimal way; that is, a minimum number of tables with a
               minimum number of attributes.
               In a relational system, a join operation retrieves all
               information by combining two or more tables.
               Are of the following types:
                  One-to-One
                  One-to-Many
                  Many-to-Many




    Ver. 1.0                       Session 2                         Slide 6 of 16
Relational Database Management Systems
Weak Entities


               A weak entity is an entity whose existence depends on
               some other entity.
               It cannot exist if the entity on which it depends does not
               exist.




    Ver. 1.0                       Session 2                          Slide 7 of 16
Relational Database Management Systems
Subtypes and Supertypes


               Each entity type (subtypes and supertypes) maps to a
               separate table.
               The primary key of the supertype is the foreign key of the
               subtype:
                  It creates a link between the two.
                  The foreign key of the subtype is also its primary key.




    Ver. 1.0                        Session 2                               Slide 8 of 16
Relational Database Management Systems
Tips on Logical Database Design


               Attributes:
                  Do not introduce any unnecessary attributes.
                  An attribute serves three purposes:
                       To identify its owner entity
                       To refer to another entity
                       To simplify the description of an entity
               Keys:
                  Relational systems require keys that uniquely identify the rows
                  of a table.
                  There are various types of keys:
                       Primary
                       Foreign
                       Candidate
                       Alternate
                       Composite



    Ver. 1.0                           Session 2                         Slide 9 of 16
Relational Database Management Systems
Tips on Logical Database Design (Contd.)


               Any attribute (or set of attributes) that uniquely identifies a row
               in a table is a candidate for the primary key.
               Such an attribute is called a candidate key.
               Any attribute that is a candidate for the primary key but is not
               the primary key is called the alternate key.
               Keys can be simple or composite:
                   A simple key is composed of a single attribute.
                   A composite key, on the other hand, comprises two or more
                   attributes.




    Ver. 1.0                      Session 2                               Slide 10 of 16
Relational Database Management Systems
Just a minute


                Define the following terms:
                 1. Candidate Key
                 2. Alternate Key




                Answer:
                 1. Any attribute (or set of attributes) that uniquely identifies a row
                    in a table is a candidate for the primary key. Such an attribute
                    is called a candidate key.
                 2. Any attribute that is a candidate for the primary key but is not
                    the primary key is called the alternate key.

     Ver. 1.0                          Session 2                              Slide 11 of 16
Relational Database Management Systems
Tips on Logical Database Design (Contd.)


                Entities:
                   Some attributes may acquire further attributes during database
                   design and become entities.
                Subentities:
                   Replace optional attributes of an entity with subentities. This is
                   called specialization.
                   Specialization is the result of taking a subset of a higher-level
                   entity set to form a lower-level entity set.
                   Generalization is the result of taking the union of two or more
                   lower-level entity sets to produce a higher‑level entity set.




     Ver. 1.0                         Session 2                              Slide 12 of 16
Relational Database Management Systems
Demo: Mapping the ER Diagram to Tables


                Problem Statement
                   Map the ER diagram to its corresponding tables.




     Ver. 1.0                       Session 2                        Slide 13 of 16
Relational Database Management Systems
Summary


              In this session, you learned that:
                 The conceptual model reflects entities and their relationships.
                 Data analysis helps determine entities and relationships. The
                 conceptual model is independent of the system where it is to
                 be implemented.
                 Regular entities are not dependent. They can exist in isolation,
                 independent of any other entity.
                 Each entity maps to a table. Each attribute in an E/R diagram
                 maps to an attribute in a table.
                 Entities with common attributes should be merged. Attributes
                 may acquire further attributes and become entities.
                 The mapping of relationships depends on the type of
                 relationship. Each type of relationship maps to tables in a
                 different manner in the relational database management
                 system.


   Ver. 1.0                        Session 2                             Slide 14 of 16
Relational Database Management Systems
Summary (Contd.)


               In one-to-one relationships, one instance of an entity can relate
               to only one instance of the related entity.
               In a one-to-many relationship, one instance of an entity can
               relate to more than one instance of the related entity.
               Many-to-many relationships map to tables. One-to-one
               relationships are not very common and may map to foreign
               keys in tables.
               A weak entity is an entity whose existence depends on some
               other entity.
               A subtype is a subset of another entity. A subtype is always
               dependent on supertype for its existence.
               The primary key of the supertype is the foreign key of the
               subtype. It creates a link between the two.




    Ver. 1.0                     Session 2                             Slide 15 of 16
Relational Database Management Systems
Summary (Contd.)


               A candidate key is a candidate for the primary key. An
               alternate key is a candidate key that is not a primary key.
               Optional attributes should be replaced with subentities; this is
               also called specialization.
               To simplify multiple references, a new superentity should be
               introduced; this is also called generalization.




    Ver. 1.0                     Session 2                              Slide 16 of 16

Contenu connexe

Tendances

Pertemuan 4-analysis-modelling
Pertemuan 4-analysis-modellingPertemuan 4-analysis-modelling
Pertemuan 4-analysis-modellingMeerat Malik
 
Dbms interview questions s.pdf
Dbms interview questions s.pdfDbms interview questions s.pdf
Dbms interview questions s.pdfShivani139202
 
Data oriented and Process oriented Strategies for Legacy Information Systems ...
Data oriented and Process oriented Strategies for Legacy Information Systems ...Data oriented and Process oriented Strategies for Legacy Information Systems ...
Data oriented and Process oriented Strategies for Legacy Information Systems ...IDES Editor
 
database chap 1 and 2.pptx
database chap 1 and 2.pptxdatabase chap 1 and 2.pptx
database chap 1 and 2.pptxEliasasefa
 
Decision support n system management
Decision support n system managementDecision support n system management
Decision support n system managementkrishna_v111
 
information system lecture notes
information system lecture notesinformation system lecture notes
information system lecture notesnaeem_mnm
 
Implementation issues software engineering
Implementation issues software engineeringImplementation issues software engineering
Implementation issues software engineeringrishi ram khanal
 
Aps11 design interface
Aps11 design interfaceAps11 design interface
Aps11 design interfaceArif Rahman
 
System analysis and design logical design
System analysis and design  logical designSystem analysis and design  logical design
System analysis and design logical designGirdharRatne
 

Tendances (13)

Pertemuan 4-analysis-modelling
Pertemuan 4-analysis-modellingPertemuan 4-analysis-modelling
Pertemuan 4-analysis-modelling
 
Dbms interview questions s.pdf
Dbms interview questions s.pdfDbms interview questions s.pdf
Dbms interview questions s.pdf
 
Data oriented and Process oriented Strategies for Legacy Information Systems ...
Data oriented and Process oriented Strategies for Legacy Information Systems ...Data oriented and Process oriented Strategies for Legacy Information Systems ...
Data oriented and Process oriented Strategies for Legacy Information Systems ...
 
ans3ed-oddonly.pdf
ans3ed-oddonly.pdfans3ed-oddonly.pdf
ans3ed-oddonly.pdf
 
IT class IV - ICAB PS-KL
IT class IV - ICAB PS-KLIT class IV - ICAB PS-KL
IT class IV - ICAB PS-KL
 
database chap 1 and 2.pptx
database chap 1 and 2.pptxdatabase chap 1 and 2.pptx
database chap 1 and 2.pptx
 
Decision support n system management
Decision support n system managementDecision support n system management
Decision support n system management
 
information system lecture notes
information system lecture notesinformation system lecture notes
information system lecture notes
 
Implementation issues software engineering
Implementation issues software engineeringImplementation issues software engineering
Implementation issues software engineering
 
Aps11 design interface
Aps11 design interfaceAps11 design interface
Aps11 design interface
 
E workshop system design
E workshop system designE workshop system design
E workshop system design
 
System analysis and design logical design
System analysis and design  logical designSystem analysis and design  logical design
System analysis and design logical design
 
SA Chapter 10
SA Chapter 10SA Chapter 10
SA Chapter 10
 

Similaire à 02 rdbms session02

Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And AnswerJagan Mohan Bishoyi
 
DBMS interview questions
DBMS interview questionsDBMS interview questions
DBMS interview questionsHarish Gyanani
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMSKr Shrishant
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answerssheibansari
 
DBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsDBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsKuntal Bhowmick
 
DBMS Campus crack Question Prepared by Randhir Kumar
DBMS Campus crack Question Prepared by Randhir KumarDBMS Campus crack Question Prepared by Randhir Kumar
DBMS Campus crack Question Prepared by Randhir KumarRandhir Chouhan
 
Database Management Systems Tutorial
Database Management Systems TutorialDatabase Management Systems Tutorial
Database Management Systems TutorialSachin MK
 
17032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp0217032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp02Samina Sam Sam
 
Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management systememailharmeet
 
Dbms Concepts
Dbms ConceptsDbms Concepts
Dbms Conceptsadukkas
 
Data Mining And Data Warehousing Laboratory File Manual
Data Mining And Data Warehousing Laboratory File ManualData Mining And Data Warehousing Laboratory File Manual
Data Mining And Data Warehousing Laboratory File ManualNitin Bhasin
 

Similaire à 02 rdbms session02 (20)

Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And Answer
 
DBMS interview questions
DBMS interview questionsDBMS interview questions
DBMS interview questions
 
Technical Note on DBMS
Technical Note on DBMSTechnical Note on DBMS
Technical Note on DBMS
 
1resume
1resume1resume
1resume
 
Dbms basic nots
Dbms basic notsDbms basic nots
Dbms basic nots
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Unit_2.pdf
Unit_2.pdfUnit_2.pdf
Unit_2.pdf
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answers
 
Rdbms concepts
Rdbms conceptsRdbms concepts
Rdbms concepts
 
Nagaraju
NagarajuNagaraju
Nagaraju
 
DBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsDBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental concepts
 
DBMS Campus crack Question Prepared by Randhir Kumar
DBMS Campus crack Question Prepared by Randhir KumarDBMS Campus crack Question Prepared by Randhir Kumar
DBMS Campus crack Question Prepared by Randhir Kumar
 
Database Management Systems Tutorial
Database Management Systems TutorialDatabase Management Systems Tutorial
Database Management Systems Tutorial
 
17032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp0217032658 database-management-systems-tutorial-090917034406-phpapp02
17032658 database-management-systems-tutorial-090917034406-phpapp02
 
uml.pptx
uml.pptxuml.pptx
uml.pptx
 
Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
 
Dbms Concepts
Dbms ConceptsDbms Concepts
Dbms Concepts
 
Chapter02
Chapter02Chapter02
Chapter02
 
Data Mining And Data Warehousing Laboratory File Manual
Data Mining And Data Warehousing Laboratory File ManualData Mining And Data Warehousing Laboratory File Manual
Data Mining And Data Warehousing Laboratory File Manual
 

Plus de Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

02 rdbms session02

  • 1. Relational Database Management Systems Objectives In this session, you will learn to: Map an ER diagram to a table Ver. 1.0 Session 2 Slide 1 of 16
  • 2. Relational Database Management Systems Conceptual Model Reflects entities and their relationships, based on the data processing needs of an organization Can be mapped to a relational, hierarchical, or network model Is independent of individual applications, database management systems, hardware, and physical storage of data Ver. 1.0 Session 2 Slide 2 of 16
  • 3. Relational Database Management Systems Mapping ERDs to Tables • A database that conforms to an ER diagram can be represented by a collection of tables in the relational system. • The mapping of ER diagrams to tables can be discussed in relation to the following: Regular entities Attributes Relationships Weak entities Subtypes and Supertypes Ver. 1.0 Session 2 Slide 3 of 16
  • 4. Relational Database Management Systems Regular Entities They can exist in isolation, independent of any other entity. They are the “building blocks” of the database. Each regular entity maps to a table. Ver. 1.0 Session 2 Slide 4 of 16
  • 5. Relational Database Management Systems Attributes Each property or attribute shown in the ER diagram maps to a column in the appropriate table. Ver. 1.0 Session 2 Slide 5 of 16
  • 6. Relational Database Management Systems Relationships Each type of relationship maps to tables in a different manner in the relational database management system. The most important principle is to create tables where information from the real world is stored and retrieved in an optimal way; that is, a minimum number of tables with a minimum number of attributes. In a relational system, a join operation retrieves all information by combining two or more tables. Are of the following types: One-to-One One-to-Many Many-to-Many Ver. 1.0 Session 2 Slide 6 of 16
  • 7. Relational Database Management Systems Weak Entities A weak entity is an entity whose existence depends on some other entity. It cannot exist if the entity on which it depends does not exist. Ver. 1.0 Session 2 Slide 7 of 16
  • 8. Relational Database Management Systems Subtypes and Supertypes Each entity type (subtypes and supertypes) maps to a separate table. The primary key of the supertype is the foreign key of the subtype: It creates a link between the two. The foreign key of the subtype is also its primary key. Ver. 1.0 Session 2 Slide 8 of 16
  • 9. Relational Database Management Systems Tips on Logical Database Design Attributes: Do not introduce any unnecessary attributes. An attribute serves three purposes: To identify its owner entity To refer to another entity To simplify the description of an entity Keys: Relational systems require keys that uniquely identify the rows of a table. There are various types of keys: Primary Foreign Candidate Alternate Composite Ver. 1.0 Session 2 Slide 9 of 16
  • 10. Relational Database Management Systems Tips on Logical Database Design (Contd.) Any attribute (or set of attributes) that uniquely identifies a row in a table is a candidate for the primary key. Such an attribute is called a candidate key. Any attribute that is a candidate for the primary key but is not the primary key is called the alternate key. Keys can be simple or composite: A simple key is composed of a single attribute. A composite key, on the other hand, comprises two or more attributes. Ver. 1.0 Session 2 Slide 10 of 16
  • 11. Relational Database Management Systems Just a minute Define the following terms: 1. Candidate Key 2. Alternate Key Answer: 1. Any attribute (or set of attributes) that uniquely identifies a row in a table is a candidate for the primary key. Such an attribute is called a candidate key. 2. Any attribute that is a candidate for the primary key but is not the primary key is called the alternate key. Ver. 1.0 Session 2 Slide 11 of 16
  • 12. Relational Database Management Systems Tips on Logical Database Design (Contd.) Entities: Some attributes may acquire further attributes during database design and become entities. Subentities: Replace optional attributes of an entity with subentities. This is called specialization. Specialization is the result of taking a subset of a higher-level entity set to form a lower-level entity set. Generalization is the result of taking the union of two or more lower-level entity sets to produce a higher‑level entity set. Ver. 1.0 Session 2 Slide 12 of 16
  • 13. Relational Database Management Systems Demo: Mapping the ER Diagram to Tables Problem Statement Map the ER diagram to its corresponding tables. Ver. 1.0 Session 2 Slide 13 of 16
  • 14. Relational Database Management Systems Summary In this session, you learned that: The conceptual model reflects entities and their relationships. Data analysis helps determine entities and relationships. The conceptual model is independent of the system where it is to be implemented. Regular entities are not dependent. They can exist in isolation, independent of any other entity. Each entity maps to a table. Each attribute in an E/R diagram maps to an attribute in a table. Entities with common attributes should be merged. Attributes may acquire further attributes and become entities. The mapping of relationships depends on the type of relationship. Each type of relationship maps to tables in a different manner in the relational database management system. Ver. 1.0 Session 2 Slide 14 of 16
  • 15. Relational Database Management Systems Summary (Contd.) In one-to-one relationships, one instance of an entity can relate to only one instance of the related entity. In a one-to-many relationship, one instance of an entity can relate to more than one instance of the related entity. Many-to-many relationships map to tables. One-to-one relationships are not very common and may map to foreign keys in tables. A weak entity is an entity whose existence depends on some other entity. A subtype is a subset of another entity. A subtype is always dependent on supertype for its existence. The primary key of the supertype is the foreign key of the subtype. It creates a link between the two. Ver. 1.0 Session 2 Slide 15 of 16
  • 16. Relational Database Management Systems Summary (Contd.) A candidate key is a candidate for the primary key. An alternate key is a candidate key that is not a primary key. Optional attributes should be replaced with subentities; this is also called specialization. To simplify multiple references, a new superentity should be introduced; this is also called generalization. Ver. 1.0 Session 2 Slide 16 of 16

Notes de l'éditeur

  1. Students have learnt the structure of different types of dimensions and the importance of surrogate keys in Module I. In this session, students will learn to load the data into the dimension tables after the data has been transformed in the transformation phase. In addition, students will also learn to update data into these dimension tables. Students already know about different types of dimension tables. Therefore, you can start the session by recapitulating the concepts. Initiate the class by asking the following questions: 1. What are the different types of dimensions? 2. Define flat dimension. 3. What are conformed dimension? 4. Define large dimension. 5. Define small dimension. 6. What is the importance of surrogate key in a dimension table? Students will learn the loading and update strategies theoretically in this session. The demonstration to load and update the data in the dimension table will be covered in next session.
  2. Students know the importance of surrogate keys. In this session students will learn the strategy to generate the surrogate key. Give an example to explain the strategy to generate the surrogate keys by concatenating the primary key of the source table with the date stamp. For example, data from a Product table has to be loaded into the Product_Dim dimension table on Feb 09, 2006. The product_code is the primary key column in the Product table. To insert the surrogate key values before loading the data into the dimension table, you can combine the primary key value with the date on which the data has to be loaded. In this case the surrogate key value can be product_code+09022006.
  3. Students have learnt the structure of different types of dimensions and the importance of surrogate keys in Module I. In this session, students will learn to load the data into the dimension tables after the data has been transformed in the transformation phase. In addition, students will also learn to update data into these dimension tables. Students already know about different types of dimension tables. Therefore, you can start the session by recapitulating the concepts. Initiate the class by asking the following questions: 1. What are the different types of dimensions? 2. Define flat dimension. 3. What are conformed dimension? 4. Define large dimension. 5. Define small dimension. 6. What is the importance of surrogate key in a dimension table? Students will learn the loading and update strategies theoretically in this session. The demonstration to load and update the data in the dimension table will be covered in next session.
  4. Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
  5. Explain the strategy to load the data into conformed dimension with help of an example to load the data in the date dimension given in SG. Explain the strategy to load the data into the Snowflaked dimension with the help of an example given in SG.
  6. Explain the strategy to load the data into conformed dimension with help of an example to load the data in the date dimension given in SG. Explain the strategy to load the data into the Snowflaked dimension with the help of an example given in SG.
  7. Explain the strategy to load the data into conformed dimension with help of an example to load the data in the date dimension given in SG. Explain the strategy to load the data into the Snowflaked dimension with the help of an example given in SG.
  8. Explain the strategy to load the data into conformed dimension with help of an example to load the data in the date dimension given in SG. Explain the strategy to load the data into the Snowflaked dimension with the help of an example given in SG.
  9. Explain the strategy to load the data into conformed dimension with help of an example to load the data in the date dimension given in SG. Explain the strategy to load the data into the Snowflaked dimension with the help of an example given in SG.
  10. Explain the strategy to load the data into conformed dimension with help of an example to load the data in the date dimension given in SG. Explain the strategy to load the data into the Snowflaked dimension with the help of an example given in SG.
  11. Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
  12. Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
  13. You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.
  14. You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.
  15. You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.