0

Just started using MongoDB. I'm curious about the non-traditional (compared to sql db's) data type: array. Seems like a very powerful feature, but haven't seen too many people use it. I'd like to know what are some examples of good uses for Mongo's Arrays? In particular, with Rails.

Perhaps my question is too subjective, but I would still say worthy of answers. :)

1 Answer 1

1

We use arrays in documents a lot. You can even index them, and use operators like $push, $pull, etc. These operators make arrays a natural choice for a lot of use cases that needed to be handled via 1:n or n:m relationships in the SQL world. You can read up more on array operators here.

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.