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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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? – Num6 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? – Num6 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. – Num6 Sep 30 '13 at 2:08

Your Answer


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

Browse other questions tagged or ask your own question.