Relationship Help

kaseyq

New member
Local time
Today, 14:41
Joined
Oct 30, 2010
Messages
3
Hello,
I have a real problem. I am creating a database for our child care at my job and I need help on how to to relate the tables. I have the following tables:
Parents, Child, Activities, Billing, Payments, Payment Methods, Sites, and Employees. What is your suggestions on relating the tables? I did set it up where everything was attached to the parents and it wasn't coming out right. Help?
Thank you,

Kaseyq

What I had related was:
Parent ID - Child (Parent ID)
Child ID - Billing (Child ID)
Activity ID - Billing (Activity ID)
Parent ID - Payments (Parent ID)
I didn't have the lookup in the payments

The problem is when the after school people key this they usually have more than one item to bill, so when they put the payment in they would have to put the payment in more than once and relate the receipt to both of the billing items. I think I did figure it out, but any suggestions?

 
Last edited:
Usually you need to relate the tables WITHOUT any data in the tables first.
 
I suggest you do some research on Business Rules, then create a model of the things involved in "your business". See if your model will support your business rules - adjust accordingly. It may be the rule that is not correct, or it may be a relationship that is incorrect.

I'd also suggest you define/describe each of the things of interest to your business. Clear definitions will be of major assistance when you find relationships/rules that don't quite work.

See http://www.databaseanswers.org/data_models/index.htm for some existing models and go the business rules/user requirements to see the sorts of things that the model ( and eventually the database) must support.

Another good source of info is http://allenbrowne.com/casu-22.html
Good luck.
 
You need to make sure that they all have ID's in them. In your table for the child, it needs a unique ID, then in the table for the parents, you would have a column titled childID, for instance - that way the relationship is made using those ID's, thus leaving the child to be connected to the correct parent.

Hope that helps.
 
Thank you for your help. I realized I must relate the payment to the billing or it will display some funny results. Thanks for all your posts.
Kasey
 
Thanks for the post. I did just find the models the other day and that is an awesome website. The allen browne website I have known about for a while.
Thanks
 

Users who are viewing this thread

Back
Top Bottom