if i write query like this
SELECT student.name, class.subj
FROM student
INNER JOIN class
ON student.class_id = class.class_id;
in MySql so how i can write for mongoDB script ?
if i write query like this
SELECT student.name, class.subj
FROM student
INNER JOIN class
ON student.class_id = class.class_id;
in MySql so how i can write for mongoDB script ?
MongoDB does not support joins because join operations make database response slower. You should change your thinking style while designing a database. If you use your documents together, it is suggested to make them embedded documents. Here is a tip for designing based on relations :
http://docs.mongodb.org/manual/applications/data-models-relationships/
Some of data modeling documents are below :
http://docs.mongodb.org/manual/data-modeling/ http://www.toadworld.com/platforms/nosql/w/wiki/349.mongodb-data-modeling.aspx#Collection http://highlyscalable.wordpress.com/2012/03/01/nosql-data-modeling-techniques/