T
T
tgpglstbc2018-10-11 19:33:45
NoSQL
tgpglstbc, 2018-10-11 19:33:45

Is it ok to do this in MongoDB?

How to store order status in MongoDB (processing, canceled, completed)? I can't recover from relational sickness, I just want to create a collection of Statuses and do something like a foreign key in the order document.
Is it ok if I store the status as a regular string (like "cancelled")?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2018-10-11
@tgpglstbc

Yes, it's normal, now such volumes do not particularly affect the load (there are exceptions for bigdata / highload), development speed is now more important.
You need to think about the database differently - you need the ability to put data into the database, and quickly get it safely + some features. And it doesn't matter what's under the "hood", tables, heaps, columns ... you need to look at the features and characteristics.
And normalization is already in many cases not justified; The average project will use both normalization and denormalization together, depending on the task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question