Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

This db will work with a CakePhp app and need advice about design. Is it good idea to put orders on center or should I put clients on center?

Clients has orders and an order record can only have one domain or one hosting. An order record cannot have more than one domain or hosting record same time. It decides which of it has by orders_types.

enter image description here

share|improve this question

migrated from webmasters.stackexchange.com Sep 29 '13 at 16:25

This question came from our site for pro webmasters.

    
I don't think, that it is a bad idea. It is strange, however, that your bill might be connected to several orders. But I don't know crucial details about your subject area. Could you please describe it better? –  HAL9000 Sep 29 '13 at 17:13
    
I am mostly confused about merging tables on orders table. And orders records would be has only one domain or only one hosting. So is it OK to relate orders table with domains and hostings by 1:1 relationship. –  xy_ Sep 29 '13 at 17:17
    
Yes, if needed. Why not? –  HAL9000 Sep 29 '13 at 18:07
    
It doesn't mean orders had to have a domain and a hosting record sametime, does it? I was confused there. –  xy_ Sep 29 '13 at 18:14
    
It is. However, this issue may be solved with TRIGGERs or STORED PROCEDUREs. –  HAL9000 Sep 30 '13 at 2:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.