1
A while ago I had an unpleasant surprise on my Azure invoice on account of a Mongodb database that I owned for access to an application.
I created, for example, the documents:
- Client
- Product
- Request
I did all the programming in a relational way (obviously against the no-sql standards, but...) in the end Azure gave me an absurd bill to pay because it considered each document created as a database. Thus, charged for individual use of documents.
I bypassed that situation, using only one document to store customers products and orders. Of course each with a "type" field specifying what it was, so you can get it later.
My question: I can’t believe this is correct, but I can’t think of any other way to resolve it. Today I have already discontinued the application, so this is simply a question.
What is the best way to model these types in mongodb in this situation? Do you actually create a document for each type of object? An attribute is created specifying the type of the object for further use?
Someone can give a light?
Note: My application was developed with c#.
I use the mongodb atlas, inside you get a free plan for the bank, however this option is only available for AWS.
– Fernando Paz
I understand. But in reality, this is not the issue. It’s more a case of modeling and experience as well
– DiegoSantos
Unfortunately, I no longer have the sources. But I can give an example here, where would have a table products, a customers and a budgets. Why should I model a document for each correct? If not, in this context of AZURE, how would we do?
– DiegoSantos
This is nonsense, database is one thing, document is another. In the relational world the document would be the row of a table, so there is no reason for you to be charged as each document represents a database. Unless Azure is charging you for the n° requisitions and not for the bank itself. In this case, you could then have a high account if you have many requests.
– romarcio