Question: Write the DDL statements to create the physical database in PostgreSQL for the EER in question 3. Once created, write the SQL statement to insert
1. Customer 221 at Royal Bank has a student loan of $20,000 and a line of credit of $5,000 at the same branch but does not have an account with RBC.
2. Customer 221 has a chequing account and no overdraft with TD bank.
3. Customer 222 has a savings account with Royal bank, and a home loan of $400,000
with the same bank branch.
4. Customer 223 has a saving account with Royal bank and 2 credit cards: 1 with RBC and
another with Scotia Bank.
5. Customer 224 has chequing account with Scotia Bank.
Customer 221, 222, and 223 operate with different branches of Royal bank.
All the queries for this question must be executable in a single click.
Consider the following EER model for a banking system: name number number address phone Bank branches Branch expiry Overdraft limit holds lends Interest Rate accum loanum Credit Card Chequing balance balance Revolving interestRate Account Loan date Line of Credit m amount Savings Regular has borrows ustNum Customer first House Car Student name last address amortization model gradYear Map the EER model to a relational database using the principles covered in the course. Clearly show for each table, its primary key, foreign keys (and what they reference), and all other attributes in a schema diagram (similar to figure 5.7 in the text). You may use any of the option(s) for EER mapping (.e. 8a - 8d). State the option used.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
