Prepared & Presented by: Umber Ismail
:https://youtube.com/@umberismail?si=ao4NsC4koQypX7MM
Keys in Database
@TechGeniusHub
TOPICS TO BE DISCUSSED . .
• What is Keys?
• Tyes of Keys:
• Super Key
• Candidate Key
• Primary Key
• Composite Key
• Alternate Key
• Foreign Key
ER DIAGRAM OF BANK MANAGEMENT
SYSTEM
• KEYS in DBMS is an attribute or set of attributes which
helps to identify a row(tuple) in a relation(table).
• They allow us to find the relation between two tables.
• Key is helpful for finding unique record or row from
the table.
TblEMP
EMP_ID
EmpName
EmpAddress
ER DIAGRAM OF BANK MANAGEMENT
SYSTEM
Entities Attributes
BANK BankName, BankCode, Address
CUSTOMER CustomerID, CustomerName, PhoneNo, Address
BRANCH BranchID Name , Address.
ACCOUNT AccountNumber, Account_Type , Balance.
LOAN LoanID, Loan_Type , Amount.
*Note: Tell Me About (Key Attribute of each entity)
• Relationships
• Bank has Branches => 1 : N
One Bank can have many Branches but one Branch can not belong to many Banks, so the
between Bank and Branch is one to many relationship.
• Branch maintain Accounts => 1 : N
One Branch can have many Accounts but one Account can not belong to many Branches, so the
relationship between Branch and Account is one to many relationship.
ER DIAGRAM OF BANK MANAGEMENT
SYSTEM
BANK BRANCH
Have
N
I I
BRANCH ACCOUNT
Maintain
s
N
I I
• Relationships
• Account held by Customers => M : N
One Customer can have more than one Accounts and also One Account can be held by one
more Customers, so the relationship between Account and Customers is many to many
relationship.
• Loan availed by Customer => M : N
One Customer can have more than one Loans and also One Loan can be availed by one or
Customers, so the relationship between Loan and Customers is many to many
ER DIAGRAM OF BANK MANAGEMENT SYSTEM
ACCOUNT CUSTOMER
Holds
M N
I I
LOAN CUSTOMER
Avails
By
M N
I I
• Relationships
• Branch offer Loans => 1 : N
One Branch can have many Loans but one Loan can not belong to many
so the relationship between Branch and Loan is one to many relationship.
ER DIAGRAM OF BANK MANAGEMENT SYSTEM
BRANCH LOAN
Offers N
I I
ASSIGNMENTS
Sr. No. Group Name System Title
1 Group 1 Hospital Management System
2 Group 2 College Management System
3 Group 3 Library Management System
4 Group 4 Voting Management System
5 Group 5 School Management System
6 Group 6 Ticket Reservation System
7 Group 7 ATM ERD
8 Group 8 Restaurant Management System
ASSIGNMENTS SHOULD HAVE:
1. Identify Entities and Their Attributes
2. Identify Types of Relationship exists. (1 to 1 or many . .)
3. Identify Cardinality and Modality.
4. Point out relationships in textual form (e.g. slide 5 & 6)
5. Draw Entities their Attributes and their relationship.
6. Draw ERD of whole system.
Submission Date: 12-June-2024 via WhatsApp, Google Classroom
THANKS FOR WATCHING
@TECHGENIUSHUBE
https://youtube.com/@umberismail?si=ao4NsC4koQypX
7MM

Important Keys in Database Systemss.pptx

  • 1.
    Prepared & Presentedby: Umber Ismail :https://youtube.com/@umberismail?si=ao4NsC4koQypX7MM Keys in Database @TechGeniusHub
  • 2.
    TOPICS TO BEDISCUSSED . . • What is Keys? • Tyes of Keys: • Super Key • Candidate Key • Primary Key • Composite Key • Alternate Key • Foreign Key
  • 3.
    ER DIAGRAM OFBANK MANAGEMENT SYSTEM • KEYS in DBMS is an attribute or set of attributes which helps to identify a row(tuple) in a relation(table). • They allow us to find the relation between two tables. • Key is helpful for finding unique record or row from the table. TblEMP EMP_ID EmpName EmpAddress
  • 4.
    ER DIAGRAM OFBANK MANAGEMENT SYSTEM Entities Attributes BANK BankName, BankCode, Address CUSTOMER CustomerID, CustomerName, PhoneNo, Address BRANCH BranchID Name , Address. ACCOUNT AccountNumber, Account_Type , Balance. LOAN LoanID, Loan_Type , Amount. *Note: Tell Me About (Key Attribute of each entity)
  • 5.
    • Relationships • Bankhas Branches => 1 : N One Bank can have many Branches but one Branch can not belong to many Banks, so the between Bank and Branch is one to many relationship. • Branch maintain Accounts => 1 : N One Branch can have many Accounts but one Account can not belong to many Branches, so the relationship between Branch and Account is one to many relationship. ER DIAGRAM OF BANK MANAGEMENT SYSTEM BANK BRANCH Have N I I BRANCH ACCOUNT Maintain s N I I
  • 6.
    • Relationships • Accountheld by Customers => M : N One Customer can have more than one Accounts and also One Account can be held by one more Customers, so the relationship between Account and Customers is many to many relationship. • Loan availed by Customer => M : N One Customer can have more than one Loans and also One Loan can be availed by one or Customers, so the relationship between Loan and Customers is many to many ER DIAGRAM OF BANK MANAGEMENT SYSTEM ACCOUNT CUSTOMER Holds M N I I LOAN CUSTOMER Avails By M N I I
  • 7.
    • Relationships • Branchoffer Loans => 1 : N One Branch can have many Loans but one Loan can not belong to many so the relationship between Branch and Loan is one to many relationship. ER DIAGRAM OF BANK MANAGEMENT SYSTEM BRANCH LOAN Offers N I I
  • 8.
    ASSIGNMENTS Sr. No. GroupName System Title 1 Group 1 Hospital Management System 2 Group 2 College Management System 3 Group 3 Library Management System 4 Group 4 Voting Management System 5 Group 5 School Management System 6 Group 6 Ticket Reservation System 7 Group 7 ATM ERD 8 Group 8 Restaurant Management System
  • 9.
    ASSIGNMENTS SHOULD HAVE: 1.Identify Entities and Their Attributes 2. Identify Types of Relationship exists. (1 to 1 or many . .) 3. Identify Cardinality and Modality. 4. Point out relationships in textual form (e.g. slide 5 & 6) 5. Draw Entities their Attributes and their relationship. 6. Draw ERD of whole system. Submission Date: 12-June-2024 via WhatsApp, Google Classroom
  • 10.