- BANK, ACCOUNT, CUSTOMER, LOAN
- weak entity: BANK-BRANCH, partial key: BanchNo, id relationship: BRANCHES
- The partial key BranchNo specifies that the same BranchNo value may occur in different banks. BRANCHES specifies that BranchNo values are uniquely assigned for those BANK-BRANCH entities that are related to the same BANK entity. The combination of Bank code and BranchNo together consititute a full indentifier for a BANK-BRANCH.
- BRANCHES, ACCTS, LOANS, A-C, L-C
BANK to BRANCHES (1,N): each bank has at least one branch
BANK-BRANCH to BRANCHES (1,1): each branch is associated with exactly 1 bank
BANK-BRANCH to ACCTS (0,N): a branch can have 0 or more accounts
ACCOUNT to ACCTS (1,1): an account is associated with exactly 1 branch
BANK-BRANCH to LOANS (0,N): a branch can have 0 or more loans
LOAN to LOANS (1,1): a loan is associated with exactly 1 branch
ACCOUNT to A-C (1,N): an account is associated with 1 or more customers
CUSTOMER to A-C (0,N): a customer can have 0 or more accounts
LOAN to L-C (1,N): a loan is associated with 1 or more customers
CUSTOMER to L-C (0,N): a customer can have 0 or more loans
- Some possible requirements: Each bank has a unique code and a name and address. Each bank is related to one or more branches and the BranchNo is unique among branches for a particular bank. Each bank-branch has a location, zero or more loans, and zero or more accounts. Each acct has a unique number, balance, type and is related to exactly one branch and to at least one customer. Each loan has a unique number, amount, and type and is related to exactly one branch and to at least one customer. Each customer has a SSN, Name, phone, address, and is related to 0 or more accounts and 0 or more loans.
- ACCOUNT to A-C (1,N)