Hello, I'm new with a NoSQL implementation. I'm using MongoDB with CI and it works very well, but I have a question.
I saw that in each collection, mongo creates an _id column that is an object that contains some data. Now, suppose that I've a page with articles an a document foreach article like this:
and I want to read this article, how can I do that? I don't think that something like website.dev/article/_id (where _id is the value in the document) is correct.. so how can I do that?
I readed that if I create a sort of auto_increment, like MySQL, mongo won't scale effectively. I'm new in this world, maybe I'm wrong in something and you can suggest me something!
Thank you!
I saw that in each collection, mongo creates an _id column that is an object that contains some data. Now, suppose that I've a page with articles an a document foreach article like this:
PHP Code:
{
_id: ObjectID // by Mongo,
title: "My first article",
body: "Body body body text text"
}
and I want to read this article, how can I do that? I don't think that something like website.dev/article/_id (where _id is the value in the document) is correct.. so how can I do that?
I readed that if I create a sort of auto_increment, like MySQL, mongo won't scale effectively. I'm new in this world, maybe I'm wrong in something and you can suggest me something!
Thank you!