0

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

  • 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? – BlitZ 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. – Kemal Sep 29 '13 at 17:17
  • Yes, if needed. Why not? – BlitZ 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. – Kemal Sep 29 '13 at 18:14
  • It is. However, this issue may be solved with TRIGGERs or STORED PROCEDUREs. – BlitZ Sep 30 '13 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.