Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi , draw erd Entities: 1 . Customer 2 . Account 3 . Transaction 4 . Branch 5 . Employee Relationships: A Customer can have

hi , draw erd
Entities:
1. Customer
2. Account
3. Transaction
4. Branch
5. Employee
Relationships:
A Customer can have multiple Accounts (One-to-Many)
An Account belongs to only one Customer (Many-to-One)
An Account can have multiple Transactions (One-to-Many)
A Transaction belongs to only one Account (Many-to-One)
A Branch can have multiple Employees (One-to-Many)
An Employee belongs to only one Branch (Many-to-One)
3456789101112131415161718192212223242526272829B182353637383944142Customer tableCREATE TABLE Customer(customer_id INT PRIMARY KEY,name VARCHAR (10e),email vARCHAR(100),phone VARCHAR (2e)-- Account tableCREATE TABLE ACcount (account_id INT PRIMARY KEY,customer_id INT,account_type VARCHAR (20),balance DECIMAL (10,2),FOREIGN KEY (CUstomer_id) REFERENCES Customer (customer_id)-- Transaction tableCREATE TABLE Transaction (transaction_id INT PRIMARY KEY,account_id INT,transaction_type VARCHAR(20),amount DECIMAL(1,2),transaction_date TIMESTAMP,FOREIGN KEY (account_id) REFERENCES ACCount (account_id)-- Branch tableCREATE TABLE Branch (branch_id INT PRIMARY KEY,name VARCHAR (180),location VARCHAR(100)-- Employee tableCREATE TABLE Employee (employee_id INT PRIMARY KEY,branch_id INT,name VARCHAR (100),position VARCHAR(50),FOREIGN KEY (branch_id) REFERENCES Branch(branch_id)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions