Quote:
Originally posted by certus
Let's backtrack completely. First you have to identify the entities and the relationships.
Take the names of the entities and go:
Relationship One:
A cardholder has (zero, one, many) Accounts
An Account has (zero, one, many) cardholders
Go through all the entities and identify all the relationships and the cardinality as above.
Post all the relationships here and I will tell you the next step. There will be three steps.
|
Ok let me take the time to thank you certus for taking the time to offer assitance it very much appreactied so thanks a lot.
here what i have come up, so far.
see attachment for first go at ER Diagram. I did try and make CardHolder primary key join transaction table but the tool Case studio 2.1 wouldn't let me so i presume it wasn't valid.
Here are the table now
CardHolder[
Account
Card
Statement
Merchants
Transaction
card_id : PK
accountNo: FK
first_name
surname
post_code
city
county
telephone
}
Account{
Card_id :PK
accountNo: FK
sort_code
first_name
surname
card_issued
date_created
overdraft_amount
balance
card_blocked
card_unblocked
}
Card {
card_id: FK
accountNo: FK
certicate
firstname
surname
date_expired
date_valid
status
}
Starement{
transaction_id: PK
accountNo :FK
statement_id
date_purchased
amount
location
current_balance
}
Merchants{
merchants_id: PK
accountNo
merchant_name
certificate
terminal_id
}
Transaction{
accountNo: FK
card_id: FK
merchants_id: FK
Transaction_id
Terminal_id
authorisation_code
delcined
amount
date
time
date_valid
expires
}
And the relation are as follows
Relationship One:
A cardholder has (one, many) Accounts
A Accounts has (Manu, one) cardholder {Not sure whether should be 1:1}
Relationship Two:
Card has (many , one) Cardholder
Cardholder has (one many) Card
Relationship Three:
Account has a (one many) Statement
Statement has a (one many) Account
Relationship Four:
Statement has a (one many) Transaction
Transaction has a (many one) Statement
Relationship Five:
Cardholder has a (one many) Transaction
Transaction has a (many one) Cardholder {I couldn't see to make it work}
Transaction Six
Transaction has a (Many one) Merchants
Merchants has a (one Many) Transaction
Please can make use reply as easy to understand as possible.
Many Thanks to all
Sean