Answered step by step
Verified Expert Solution
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:
Customer
Account
Transaction
Branch
Employee
Relationships:
A Customer can have multiple Accounts OnetoMany
An Account belongs to only one Customer ManytoOne
An Account can have multiple Transactions OnetoMany
A Transaction belongs to only one Account ManytoOne
A Branch can have multiple Employees OnetoMany
An Employee belongs to only one Branch ManytoOne
BCustomer tableCREATE TABLE Customercustomerid INT PRIMARY KEY,name VARCHAR eemail vARCHARphone VARCHAR e Account tableCREATE TABLE ACcount accountid INT PRIMARY KEY,customerid INT,accounttype VARCHAR balance DECIMAL FOREIGN KEY CUstomerid REFERENCES Customer customerid Transaction tableCREATE TABLE Transaction transactionid INT PRIMARY KEY,accountid INT,transactiontype VARCHARamount DECIMALtransactiondate TIMESTAMP,FOREIGN KEY accountid REFERENCES ACCount accountid Branch tableCREATE TABLE Branch branchid INT PRIMARY KEY,name VARCHAR location VARCHAR Employee tableCREATE TABLE Employee employeeid INT PRIMARY KEY,branchid INT,name VARCHAR position VARCHARFOREIGN KEY branchid REFERENCES Branchbranchid
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started