You are on page 1of 2

Userid is the foreign key for account table

Entities list:

Customer: It has attributes, Userid(primary key), Mob(multivalued attributes), Name

Branches: It has attributes B_ID (primary key) and B_Name

Bank: It has attributes Code(primary key), Name, Address( Multivalued attribute consisting atomic attributes ZIP and City)
Employee: It has attributes E_Id, E_Name, DOB and Age ( a derived attribute, derived from DOB)

Account (weak entity): It has attributes A_type and Userid (foreign key referenced from ‘Customer’)

Loan: It has three attributes named L_Id, L_Amt, L_type

Relationships:

Customer “HAS” weak entity Account. It is M:N relation. A cutomer can have many accounts likewise an account can have more than one holder

Bank “HAS” branches. It is 1:N relationship as A bank can have many branches but a branch can only be associated with one bank only

Branches “OFFERS” loans to Customers. It is 1:N. One Branch can have many Loans but one Loan can not belong to many Branches.

Customer “AVAILS” loans. It is M:N. A customer can avail many loans and that loan (offered by the branch) can also be availed by other customers.

Bank “MAINTAINS” accounts. It is 1:N relationship. A bank can manage multiple accounts but each account is associated with only one Bank.

Bank “HIRES” Employee. It is 1:N relationship. A bank can hire many employess but in most cases, the employee belong to a single organisation only

You might also like