Well a customer to account would be a one to many.
customers
customer_id
name
....
accounts
account_id
name
customer_id
...
services
service_id
name
...
account_services
account_service_id
account_id
service_id
start_date
end_date
...
So you have a one to many customers to accounts relation. You have a
one to many accounts to account_services and a one to many services to
account_services.
Not sure if I am helping :/
Good luck
On Sep 12, 2009, at 10:02 PM, Matt Juszczak wrote:
Part of good db design is to plan way into the future. Your
customers may only have one account now, but is it possible in the
future they could have 2? These are HUGE decisions that can come
back with really big teeth.
Well, this is all in an example. Even if a customer could have more
than one accounts, allowing for a many:many, I'd still have the same
issue figuring out naming schemes.
What is a service?
"Email Hosting", "Web Hosting", etc. But I'm not designing a
billing system. This is just an example. But I'd have these same
questions if I was listing something else, like a forum, etc.
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org/show_participation.php