How can we ensure Data integrity in mongoDb?MongoDB: How to ensure data consistency for huge, interconnected structures over CRUD operationsUse cases for NoSQLMongoDB normalization, foreign key and joiningAggregation. I want to count record in mongo and I then want to multiply that count by a field in a different collectionWhen to use MongoDB or other document oriented database systems?NoSQL (MongoDB) vs Lucene (or Solr) as your databaseHow to query MongoDB with “like”?MongoDB/NoSQL: Keeping Document Change HistoryStoring time-series data, relational or non?When to Redis? When to MongoDB?What did MongoDB not being ACID compliant before v4 really mean?How do I drop a MongoDB database from the command line?When to use CouchDB over MongoDB and vice versa“Large data” work flows using pandas

Hide Select Output from T-SQL

The plural of 'stomach"

How can I replace every global instance of "x[2]" with "x_2"

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

Is the destination of a commercial flight important for the pilot?

Have I saved too much for retirement so far?

What to do with wrong results in talks?

How do I rename a LINUX host without needing to reboot for the rename to take effect?

What is the opposite of 'gravitas'?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

Time travel short story where a man arrives in the late 19th century in a time machine and then sends the machine back into the past

How does residential electricity work?

Your magic is very sketchy

Can criminal fraud exist without damages?

Was Spock the First Vulcan in Starfleet?

Teaching indefinite integrals that require special-casing

How to be diplomatic in refusing to write code that breaches the privacy of our users

Is there a problem with hiding "forgot password" until it's needed?

Increase performance creating Mandelbrot set in python

What is difference between behavior and behaviour

What is the intuitive meaning of having a linear relationship between the logs of two variables?

Will it be accepted, if there is no ''Main Character" stereotype?

Displaying the order of the columns of a table

Everything Bob says is false. How does he get people to trust him?



How can we ensure Data integrity in mongoDb?


MongoDB: How to ensure data consistency for huge, interconnected structures over CRUD operationsUse cases for NoSQLMongoDB normalization, foreign key and joiningAggregation. I want to count record in mongo and I then want to multiply that count by a field in a different collectionWhen to use MongoDB or other document oriented database systems?NoSQL (MongoDB) vs Lucene (or Solr) as your databaseHow to query MongoDB with “like”?MongoDB/NoSQL: Keeping Document Change HistoryStoring time-series data, relational or non?When to Redis? When to MongoDB?What did MongoDB not being ACID compliant before v4 really mean?How do I drop a MongoDB database from the command line?When to use CouchDB over MongoDB and vice versa“Large data” work flows using pandas













9















i am trying to migrate from relational database (mysql) data to nosql (mongoDb) . But how can i ensure data integrity in mongodb . what i have found that we cannot do it on server side. what should i use on application side to handle data integrity ?



For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table.
this is one of the requirement others like adding constraints , updating values etc










share|improve this question
























  • Are you sure you want to use nosql for your scenario?

    – Pio
    Oct 1 '15 at 13:41











  • just doing a poc if i can ..

    – rahul
    Oct 5 '15 at 6:24















9















i am trying to migrate from relational database (mysql) data to nosql (mongoDb) . But how can i ensure data integrity in mongodb . what i have found that we cannot do it on server side. what should i use on application side to handle data integrity ?



For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table.
this is one of the requirement others like adding constraints , updating values etc










share|improve this question
























  • Are you sure you want to use nosql for your scenario?

    – Pio
    Oct 1 '15 at 13:41











  • just doing a poc if i can ..

    – rahul
    Oct 5 '15 at 6:24













9












9








9








i am trying to migrate from relational database (mysql) data to nosql (mongoDb) . But how can i ensure data integrity in mongodb . what i have found that we cannot do it on server side. what should i use on application side to handle data integrity ?



For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table.
this is one of the requirement others like adding constraints , updating values etc










share|improve this question
















i am trying to migrate from relational database (mysql) data to nosql (mongoDb) . But how can i ensure data integrity in mongodb . what i have found that we cannot do it on server side. what should i use on application side to handle data integrity ?



For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table.
this is one of the requirement others like adding constraints , updating values etc







mongodb nosql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 22 '17 at 18:01









Community

11




11










asked Oct 1 '15 at 10:09









rahulrahul

6919




6919












  • Are you sure you want to use nosql for your scenario?

    – Pio
    Oct 1 '15 at 13:41











  • just doing a poc if i can ..

    – rahul
    Oct 5 '15 at 6:24

















  • Are you sure you want to use nosql for your scenario?

    – Pio
    Oct 1 '15 at 13:41











  • just doing a poc if i can ..

    – rahul
    Oct 5 '15 at 6:24
















Are you sure you want to use nosql for your scenario?

– Pio
Oct 1 '15 at 13:41





Are you sure you want to use nosql for your scenario?

– Pio
Oct 1 '15 at 13:41













just doing a poc if i can ..

– rahul
Oct 5 '15 at 6:24





just doing a poc if i can ..

– rahul
Oct 5 '15 at 6:24












3 Answers
3






active

oldest

votes


















8














Ultimately, you're screwed. There's no way (in mongodb) to guarantee data integrity in such scenario, since it's lacking relations in general and foreign keys in particular. And there's little point in building application-level checks. No matter how elaborate they are, they can still fail (hence "no guarantee").



So it's either embedding (so that related data is always there, right in the document) or abandoning the hope of consistent data.






share|improve this answer






























    2














    • MongoDb is nosql and hence no joins.

    • Data is stored as BSON documents and hence no Foreign key constraints

    Steps to ensure Data Integrity:



    • Check in the application before adding the task document whether it is having a valid user.





    share|improve this answer


















    • 2





      joins aren't mentioned in the question anywhere.

      – Sergio Tulentsev
      Oct 1 '15 at 11:15


















    2















    MongoDB doesn't support FOREIGN KEY. It's uses to Avoid JOINS.




    MongoDB doesn't support server side foreign key relationships. But some times we need to relate So MongoDB applications use one of two methods for relating documents:



    1. Manual references where you save the _id field of one document in another document as a reference. Then your application can run a second query to return the related data. These references are simple and sufficient for most use cases.


    2. DBRefs are references from one document to another using the value of the first document’s _id field, collection name, and, optionally, its database name. By including these names, DBRefs allow documents located in multiple collections to be more easily linked with documents from a single collection.This may be then not so speedy because DB has to make additional queries to read objects but allows for kind of foreign key reference.Still you will have to handle your references manually. Only while looking up your DBRef you will see if it exists, the DB will not go through all the documents to look for the references and remove them if the target of the reference doesn't exist any more. But I think removing all the references after deleting the book would require a single query per collection, no more, so not that difficult really.


    Refer to documentation for more info: Database References.




    How can I solve this task?




    To be clear, MongoDB is not relational. There is no standard "normal form". You should model your database appropriate to the data you store and the queries you intend to run.
    For ex-



    student

    _id: ObjectId(...),
    name: 'Jane',
    courses: [
    course: 'bio101', mark: 85 ,
    course: 'chem101', mark: 89
    ]


    course

    _id: 'bio101',
    name: 'Biology 101',
    description: 'Introduction to biology'



    Try to resolve to this



    student

    _id: ObjectId(...),
    name: 'Jane',
    courses: [

    name: 'Biology 101',
    mark: 85,
    id:bio101
    ,
    ]






    share|improve this answer

























    • I am not asking about consistency in data from RDBS to nosql but about data integrity in mongoDb For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table. this is one of the requirement others like adding constraints , updating values etc

      – rahul
      Oct 1 '15 at 10:41











    • foreign keys and joins are not related in any way whatsoever. It's foreign keys he needs, not joins.

      – Sergio Tulentsev
      Oct 1 '15 at 11:15












    • @SergioTulentsev look at exampple of user (rahul) . It seems to use foreign key.

      – Hitesh Mundra
      Oct 1 '15 at 11:18











    • @SergioTulentsev joins are not related to this but i write for user

      – Hitesh Mundra
      Oct 1 '15 at 11:19












    • @HiteshMundra: my point was "why did you even mention joins? They're completely irrelevant here"

      – Sergio Tulentsev
      Oct 1 '15 at 11:21










    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32884882%2fhow-can-we-ensure-data-integrity-in-mongodb%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    8














    Ultimately, you're screwed. There's no way (in mongodb) to guarantee data integrity in such scenario, since it's lacking relations in general and foreign keys in particular. And there's little point in building application-level checks. No matter how elaborate they are, they can still fail (hence "no guarantee").



    So it's either embedding (so that related data is always there, right in the document) or abandoning the hope of consistent data.






    share|improve this answer



























      8














      Ultimately, you're screwed. There's no way (in mongodb) to guarantee data integrity in such scenario, since it's lacking relations in general and foreign keys in particular. And there's little point in building application-level checks. No matter how elaborate they are, they can still fail (hence "no guarantee").



      So it's either embedding (so that related data is always there, right in the document) or abandoning the hope of consistent data.






      share|improve this answer

























        8












        8








        8







        Ultimately, you're screwed. There's no way (in mongodb) to guarantee data integrity in such scenario, since it's lacking relations in general and foreign keys in particular. And there's little point in building application-level checks. No matter how elaborate they are, they can still fail (hence "no guarantee").



        So it's either embedding (so that related data is always there, right in the document) or abandoning the hope of consistent data.






        share|improve this answer













        Ultimately, you're screwed. There's no way (in mongodb) to guarantee data integrity in such scenario, since it's lacking relations in general and foreign keys in particular. And there's little point in building application-level checks. No matter how elaborate they are, they can still fail (hence "no guarantee").



        So it's either embedding (so that related data is always there, right in the document) or abandoning the hope of consistent data.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 1 '15 at 13:30









        Sergio TulentsevSergio Tulentsev

        184k30295310




        184k30295310























            2














            • MongoDb is nosql and hence no joins.

            • Data is stored as BSON documents and hence no Foreign key constraints

            Steps to ensure Data Integrity:



            • Check in the application before adding the task document whether it is having a valid user.





            share|improve this answer


















            • 2





              joins aren't mentioned in the question anywhere.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15















            2














            • MongoDb is nosql and hence no joins.

            • Data is stored as BSON documents and hence no Foreign key constraints

            Steps to ensure Data Integrity:



            • Check in the application before adding the task document whether it is having a valid user.





            share|improve this answer


















            • 2





              joins aren't mentioned in the question anywhere.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15













            2












            2








            2







            • MongoDb is nosql and hence no joins.

            • Data is stored as BSON documents and hence no Foreign key constraints

            Steps to ensure Data Integrity:



            • Check in the application before adding the task document whether it is having a valid user.





            share|improve this answer













            • MongoDb is nosql and hence no joins.

            • Data is stored as BSON documents and hence no Foreign key constraints

            Steps to ensure Data Integrity:



            • Check in the application before adding the task document whether it is having a valid user.






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 1 '15 at 10:48









            Clement AmarnathClement Amarnath

            3,63911123




            3,63911123







            • 2





              joins aren't mentioned in the question anywhere.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15












            • 2





              joins aren't mentioned in the question anywhere.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15







            2




            2





            joins aren't mentioned in the question anywhere.

            – Sergio Tulentsev
            Oct 1 '15 at 11:15





            joins aren't mentioned in the question anywhere.

            – Sergio Tulentsev
            Oct 1 '15 at 11:15











            2















            MongoDB doesn't support FOREIGN KEY. It's uses to Avoid JOINS.




            MongoDB doesn't support server side foreign key relationships. But some times we need to relate So MongoDB applications use one of two methods for relating documents:



            1. Manual references where you save the _id field of one document in another document as a reference. Then your application can run a second query to return the related data. These references are simple and sufficient for most use cases.


            2. DBRefs are references from one document to another using the value of the first document’s _id field, collection name, and, optionally, its database name. By including these names, DBRefs allow documents located in multiple collections to be more easily linked with documents from a single collection.This may be then not so speedy because DB has to make additional queries to read objects but allows for kind of foreign key reference.Still you will have to handle your references manually. Only while looking up your DBRef you will see if it exists, the DB will not go through all the documents to look for the references and remove them if the target of the reference doesn't exist any more. But I think removing all the references after deleting the book would require a single query per collection, no more, so not that difficult really.


            Refer to documentation for more info: Database References.




            How can I solve this task?




            To be clear, MongoDB is not relational. There is no standard "normal form". You should model your database appropriate to the data you store and the queries you intend to run.
            For ex-



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [
            course: 'bio101', mark: 85 ,
            course: 'chem101', mark: 89
            ]


            course

            _id: 'bio101',
            name: 'Biology 101',
            description: 'Introduction to biology'



            Try to resolve to this



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [

            name: 'Biology 101',
            mark: 85,
            id:bio101
            ,
            ]






            share|improve this answer

























            • I am not asking about consistency in data from RDBS to nosql but about data integrity in mongoDb For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table. this is one of the requirement others like adding constraints , updating values etc

              – rahul
              Oct 1 '15 at 10:41











            • foreign keys and joins are not related in any way whatsoever. It's foreign keys he needs, not joins.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15












            • @SergioTulentsev look at exampple of user (rahul) . It seems to use foreign key.

              – Hitesh Mundra
              Oct 1 '15 at 11:18











            • @SergioTulentsev joins are not related to this but i write for user

              – Hitesh Mundra
              Oct 1 '15 at 11:19












            • @HiteshMundra: my point was "why did you even mention joins? They're completely irrelevant here"

              – Sergio Tulentsev
              Oct 1 '15 at 11:21















            2















            MongoDB doesn't support FOREIGN KEY. It's uses to Avoid JOINS.




            MongoDB doesn't support server side foreign key relationships. But some times we need to relate So MongoDB applications use one of two methods for relating documents:



            1. Manual references where you save the _id field of one document in another document as a reference. Then your application can run a second query to return the related data. These references are simple and sufficient for most use cases.


            2. DBRefs are references from one document to another using the value of the first document’s _id field, collection name, and, optionally, its database name. By including these names, DBRefs allow documents located in multiple collections to be more easily linked with documents from a single collection.This may be then not so speedy because DB has to make additional queries to read objects but allows for kind of foreign key reference.Still you will have to handle your references manually. Only while looking up your DBRef you will see if it exists, the DB will not go through all the documents to look for the references and remove them if the target of the reference doesn't exist any more. But I think removing all the references after deleting the book would require a single query per collection, no more, so not that difficult really.


            Refer to documentation for more info: Database References.




            How can I solve this task?




            To be clear, MongoDB is not relational. There is no standard "normal form". You should model your database appropriate to the data you store and the queries you intend to run.
            For ex-



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [
            course: 'bio101', mark: 85 ,
            course: 'chem101', mark: 89
            ]


            course

            _id: 'bio101',
            name: 'Biology 101',
            description: 'Introduction to biology'



            Try to resolve to this



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [

            name: 'Biology 101',
            mark: 85,
            id:bio101
            ,
            ]






            share|improve this answer

























            • I am not asking about consistency in data from RDBS to nosql but about data integrity in mongoDb For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table. this is one of the requirement others like adding constraints , updating values etc

              – rahul
              Oct 1 '15 at 10:41











            • foreign keys and joins are not related in any way whatsoever. It's foreign keys he needs, not joins.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15












            • @SergioTulentsev look at exampple of user (rahul) . It seems to use foreign key.

              – Hitesh Mundra
              Oct 1 '15 at 11:18











            • @SergioTulentsev joins are not related to this but i write for user

              – Hitesh Mundra
              Oct 1 '15 at 11:19












            • @HiteshMundra: my point was "why did you even mention joins? They're completely irrelevant here"

              – Sergio Tulentsev
              Oct 1 '15 at 11:21













            2












            2








            2








            MongoDB doesn't support FOREIGN KEY. It's uses to Avoid JOINS.




            MongoDB doesn't support server side foreign key relationships. But some times we need to relate So MongoDB applications use one of two methods for relating documents:



            1. Manual references where you save the _id field of one document in another document as a reference. Then your application can run a second query to return the related data. These references are simple and sufficient for most use cases.


            2. DBRefs are references from one document to another using the value of the first document’s _id field, collection name, and, optionally, its database name. By including these names, DBRefs allow documents located in multiple collections to be more easily linked with documents from a single collection.This may be then not so speedy because DB has to make additional queries to read objects but allows for kind of foreign key reference.Still you will have to handle your references manually. Only while looking up your DBRef you will see if it exists, the DB will not go through all the documents to look for the references and remove them if the target of the reference doesn't exist any more. But I think removing all the references after deleting the book would require a single query per collection, no more, so not that difficult really.


            Refer to documentation for more info: Database References.




            How can I solve this task?




            To be clear, MongoDB is not relational. There is no standard "normal form". You should model your database appropriate to the data you store and the queries you intend to run.
            For ex-



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [
            course: 'bio101', mark: 85 ,
            course: 'chem101', mark: 89
            ]


            course

            _id: 'bio101',
            name: 'Biology 101',
            description: 'Introduction to biology'



            Try to resolve to this



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [

            name: 'Biology 101',
            mark: 85,
            id:bio101
            ,
            ]






            share|improve this answer
















            MongoDB doesn't support FOREIGN KEY. It's uses to Avoid JOINS.




            MongoDB doesn't support server side foreign key relationships. But some times we need to relate So MongoDB applications use one of two methods for relating documents:



            1. Manual references where you save the _id field of one document in another document as a reference. Then your application can run a second query to return the related data. These references are simple and sufficient for most use cases.


            2. DBRefs are references from one document to another using the value of the first document’s _id field, collection name, and, optionally, its database name. By including these names, DBRefs allow documents located in multiple collections to be more easily linked with documents from a single collection.This may be then not so speedy because DB has to make additional queries to read objects but allows for kind of foreign key reference.Still you will have to handle your references manually. Only while looking up your DBRef you will see if it exists, the DB will not go through all the documents to look for the references and remove them if the target of the reference doesn't exist any more. But I think removing all the references after deleting the book would require a single query per collection, no more, so not that difficult really.


            Refer to documentation for more info: Database References.




            How can I solve this task?




            To be clear, MongoDB is not relational. There is no standard "normal form". You should model your database appropriate to the data you store and the queries you intend to run.
            For ex-



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [
            course: 'bio101', mark: 85 ,
            course: 'chem101', mark: 89
            ]


            course

            _id: 'bio101',
            name: 'Biology 101',
            description: 'Introduction to biology'



            Try to resolve to this



            student

            _id: ObjectId(...),
            name: 'Jane',
            courses: [

            name: 'Biology 101',
            mark: 85,
            id:bio101
            ,
            ]







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Oct 1 '15 at 13:16









            Sergio Tulentsev

            184k30295310




            184k30295310










            answered Oct 1 '15 at 10:31









            Hitesh MundraHitesh Mundra

            1,2701611




            1,2701611












            • I am not asking about consistency in data from RDBS to nosql but about data integrity in mongoDb For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table. this is one of the requirement others like adding constraints , updating values etc

              – rahul
              Oct 1 '15 at 10:41











            • foreign keys and joins are not related in any way whatsoever. It's foreign keys he needs, not joins.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15












            • @SergioTulentsev look at exampple of user (rahul) . It seems to use foreign key.

              – Hitesh Mundra
              Oct 1 '15 at 11:18











            • @SergioTulentsev joins are not related to this but i write for user

              – Hitesh Mundra
              Oct 1 '15 at 11:19












            • @HiteshMundra: my point was "why did you even mention joins? They're completely irrelevant here"

              – Sergio Tulentsev
              Oct 1 '15 at 11:21

















            • I am not asking about consistency in data from RDBS to nosql but about data integrity in mongoDb For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table. this is one of the requirement others like adding constraints , updating values etc

              – rahul
              Oct 1 '15 at 10:41











            • foreign keys and joins are not related in any way whatsoever. It's foreign keys he needs, not joins.

              – Sergio Tulentsev
              Oct 1 '15 at 11:15












            • @SergioTulentsev look at exampple of user (rahul) . It seems to use foreign key.

              – Hitesh Mundra
              Oct 1 '15 at 11:18











            • @SergioTulentsev joins are not related to this but i write for user

              – Hitesh Mundra
              Oct 1 '15 at 11:19












            • @HiteshMundra: my point was "why did you even mention joins? They're completely irrelevant here"

              – Sergio Tulentsev
              Oct 1 '15 at 11:21
















            I am not asking about consistency in data from RDBS to nosql but about data integrity in mongoDb For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table. this is one of the requirement others like adding constraints , updating values etc

            – rahul
            Oct 1 '15 at 10:41





            I am not asking about consistency in data from RDBS to nosql but about data integrity in mongoDb For eg: i have two tables user and task . Both have userId field common . if i add a new entry in task table it should check if userid present in user table. this is one of the requirement others like adding constraints , updating values etc

            – rahul
            Oct 1 '15 at 10:41













            foreign keys and joins are not related in any way whatsoever. It's foreign keys he needs, not joins.

            – Sergio Tulentsev
            Oct 1 '15 at 11:15






            foreign keys and joins are not related in any way whatsoever. It's foreign keys he needs, not joins.

            – Sergio Tulentsev
            Oct 1 '15 at 11:15














            @SergioTulentsev look at exampple of user (rahul) . It seems to use foreign key.

            – Hitesh Mundra
            Oct 1 '15 at 11:18





            @SergioTulentsev look at exampple of user (rahul) . It seems to use foreign key.

            – Hitesh Mundra
            Oct 1 '15 at 11:18













            @SergioTulentsev joins are not related to this but i write for user

            – Hitesh Mundra
            Oct 1 '15 at 11:19






            @SergioTulentsev joins are not related to this but i write for user

            – Hitesh Mundra
            Oct 1 '15 at 11:19














            @HiteshMundra: my point was "why did you even mention joins? They're completely irrelevant here"

            – Sergio Tulentsev
            Oct 1 '15 at 11:21





            @HiteshMundra: my point was "why did you even mention joins? They're completely irrelevant here"

            – Sergio Tulentsev
            Oct 1 '15 at 11:21

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32884882%2fhow-can-we-ensure-data-integrity-in-mongodb%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

            Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

            2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived