1

In the app I'm currently working on we have the following:

  • Clients
  • Quotes
  • Quote Line Items (associated to a quote)

Now I know it would be quite easy to say well quotes can't exist without the client so they should live in the client document but I'm thinking about the queries I'm most likely to be doing.

I want to be able to get all quotes of a certain status irrespective of the client (but with the clients detail)

What I'm not sure on is should the clients and quotes be separate collections or should everything live in the client collection?

1 Answer 1

1

Personally, I'd put them separate. The most important consideration is, as you mentioned, the query patterns. It sounds like you'll be dealing with quotes separately from clients. If anything, I'd put all the line items in the same Quote document. But from the little info you've provided, it seems like keeping clients and quotes separate makes sense.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.