user1221098
user1221098

Reputation: 85

about the Complex relationship in database

I have got 3 tables which has got ternary relationship with these three table: buyer, item, paycenter... now as buyer pays paycenter for items ..... I've got many buyers can get many item paying at paycenter how do i do it.... all the item has same paycenter... how do I do it and show it on er diagram... what I've done is I have got the table called payment where I've got buyerid, itemid, paycenterid as foreign keys... in here does all the attributes also act as a primarykey?? It must be easy one but after thinking about for quite a while I am just going around and around without any result... How do I do it is there any way without ternary relationship

Upvotes: 1

Views: 728

Answers (1)

Shriram
Shriram

Reputation: 165

  1. Write your solution in clear steps even if it's not complete
  2. Define the properties/attributes of each table specifying Foreign/Private Key. It's easy to read and understand
  3. Then try alternate ways for the above if you feel or think of a different way

These three steps mentioned can help you arrive at a working solution. It helps in discussion also.

Upvotes: 1

Related Questions