0

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 ?

Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
mulrali
  • 31
  • 6

1 Answers1

2

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/

myildirim
  • 2,248
  • 2
  • 19
  • 25
  • 1
    Thanks @myildirim i got your meaning by this [link](http://stackoverflow.com/questions/6010408/equivalent-of-erd-for-mongodb) :) i think i can use `select` in `select` to solve this problem. but i still think may be have someone have any solution good than me.so plz give me a simple example if u can to get result like it – mulrali Dec 06 '13 at 08:01