228k views
2 votes
A bank has three types of accounts: checking, savings, and loan. Following are the attributes for each type of account:

CHECKING: Acct No, Date Opened, Balance, Service Charge
SAVINGS: Acct No, Date Opened, Balance, Interest Rate
LOAN: Acct No, Date Opened, Balance, Interest Rate, Payment
Assume that each bank account must be a member of exactly one of these subtypes. Using generalization, develop an EER model segment to represent this situation using the traditional EER notation, the Visio notation, or other tools like Lucidchart / Draw.io. Remember to include a subtype discriminator.

User DavidR
by
6.9k points

1 Answer

3 votes

Final answer:

An EER model for a bank's account system would feature a generalization hierarchy with a base entity named 'Account' with common attributes and subtypes for each account type—checking, savings, and loan—each with additional specific attributes and a subtype discriminator attribute to differentiate between them.

Step-by-step explanation:

Developing an Enhanced Entity-Relationship (EER) model for a bank's account system involves creating a generalization hierarchy to represent the different types of accounts, which are checking, savings, and loan accounts, each with unique attributes. The generalization hierarchy starts with a base entity named Account that includes common attributes: Acct No, Date Opened, and Balance. These attributes are inherited by the three subtypes: checking, savings, and loan accounts.

The Checking account further includes a Service Charge attribute, the Savings account includes an Interest Rate attribute, and the Loan account adds both an Interest Rate and a Payment attribute. A subtype discriminator, often a simple attribute like 'Account Type', would be used to distinguish among the account types within the database.

Here's an example of how the hierarchy might be illustrated in an EER diagram:

  • Account (Base entity)
  • - Acct No (PK)
  • - Date Opened
  • - Balance
  • - Account Type (Discriminator)
  • Checking (Subtype)
  • - Service Charge
  • Savings (Subtype)
  • - Interest Rate
  • Loan (Subtype)
  • - Interest Rate
  • - Payment
User Zach Jensz
by
6.3k points