- Published on
What Is a Weak Entity in ER Diagrams? Explained with Simple Example in Banking
- π Task 1: Identify Strong and Weak Entities
- π Task 2: Draw an ER Diagram
- π Example Answer: Bank and Transaction
π Task 1: Identify Strong and Weak Entities
Scenario 1: Bank Accounts
- A Bank manages multiple Accounts.
- Each Account has multiple Transactions.
- Each transaction has:
TransactionID
,Date
, andAmount
.
Questions:
- Which entity is strong?
- Which is the weak entity?
- What is the partial key of the weak entity?
- What would the full key be to identify each transaction?
Scenario 2: Library System
- A Library owns multiple Books.
- Each book has multiple Copies, and each copy has a unique
CopyNumber
only within that book.
Questions:
- Which is the strong entity?
- Which is the weak entity?
- What is the partial key of the weak entity?
- What combination of keys uniquely identifies each book copy?
π Task 2: Draw an ER Diagram
Use this template layout (draw it on paper or using a tool like dbdiagram.io, Lucidchart, or Draw.io):
[ Strong Entity ] ββββ§«β§«βββ [ Weak Entity ]
| |
(Primary Key) (Partial Key, Other Attributes)
Fill in with:
- Double rectangle for the weak entity
- Double diamond for identifying relationship
- Underline the partial key of the weak entity
- Show the full key using strong entityβs key + partial key
π Example Answer: Bank and Transaction
[ Bank ]
- BankID (PK)
||
β§«β§« "Has Transaction"
||
[ Transaction ] (Double Rectangle)
- TransactionID (Partial Key)
- Date
- Amount
ποΈ Full key: (BankID + TransactionID)