Relationship Troubles

sparlaman1

Registered User.
Local time
Today, 15:58
Joined
Apr 1, 2014
Messages
13
So my boyfriend and I... j/k

I can't wrap my brain around what I think I'm trying to do.

I have some tables: tblcustomers, tblprojects, tblproposals, tblorders, tblpayments, tblcreditcards

customers have credit cards (one to many)
customers have projects (one to many)
projects have proposals (one to many)
proposals have orders (one to many)

now here's the tricky part(s) (for me at least)

so... proposals can have one payment method for the whole thing or each order can have a separate payment method.

Payment methods include a PO# which can be for the whole proposal or each order gets it's own PO# (I think that just reiterates what I say above)

sometimes the payment method is a credit card

I think I have two separate issues here:

I'm trying to do something where if the payment method applies to the whole proposal I don't want to type it for each order just for the proposal, but if each order has separate payments then I need them to be order specific. So, is it OK to give a one to many relationship from Proposal to Payments and from Orders to Payments?

Also i'd like to store the credit card data so I don't have to retype it everytime I use it. Does it make sense for me to relate the customers to credit cards (one to many) and then relate credit cards back to billing (one to many) I KNOW I have relationships where I don't need them if I'm relating proposals, orders, and credit cards all to billing.

What's the 'correct'/best way to resolve these two issues? I've attached a simplified diagram. When I look at my diagram it seems that I should just relate CC's to Payments (one to many) and be done with it. Does that work?

I'll provide more info if it helps. Thanks for any replies.

SParlaman :)
 

Attachments

  • relationships.jpg
    relationships.jpg
    33 KB · Views: 103
This may give you some ideas. It is not intended to be the answer, but you may be able to use pieces of the model that fit your needs.
 
Interesting. That gives me a lot to think about. Thanks
 

Users who are viewing this thread

Back
Top Bottom