Logo
Published on

What Is a Weak Entity in ER Diagrams? Explained with Simple Example in Banking

πŸ‘‰ 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, and Amount.

Questions:

  1. Which entity is strong?
  2. Which is the weak entity?
  3. What is the partial key of the weak entity?
  4. 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:

  1. Which is the strong entity?
  2. Which is the weak entity?
  3. What is the partial key of the weak entity?
  4. 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)