vaibhav
vaibhav

Reputation: 4103

MongoDB is it a good idea to use _id as entity ID

Porting a relational table structure to Mongo Collection, wondering whether we can use the _id as the primary Key for the collection, similar as we use entity ID, If yes is there a way other than in code that we can do aliasing for this property while doing a find.

Thanks, -V

Upvotes: 1

Views: 966

Answers (1)

Dinca Adrian
Dinca Adrian

Reputation: 1230

Here it is a good start from you documentation. And yes you can do "relational collections"

Relational Databases to Mongo

and

Transitioning from Relational Databases to MongoDB - Data Models

Hope if helps you.

Upvotes: 1

Related Questions