mongodb - inheritance in document database? -


I am thinking because I searched for the PDF "[noSql] definitive guide" and "beginning [noSql]" Is "heritage" but I did not find anything? Am I forgetting something? Because I am being hibernate and successor to a tableperer hierarchy with mysql, has [noSql] been deprecated for some reason?

(replace [noSql] with the database not only "SQL")

I know this answer It's been a bit late, but for MongoDB, you're probably looking at something differently.

Mongo is schemeless, so the concept of "table hyacinth" is not necessary.

  class A property X property Y property In an RDM you probably have something like this  
  Table A: Column X, Y, Z Table B: Column X, Y, Z, W  

But there is no Schema in MongodiBi. So you do not need to structure the data in this way. Instead, you have "collections" of all objects (or "documents") of one or B (or C ...).

Then your collection will be a series of objects like this: "2", "X": "1", "X": 1, "Y": 2, "Z": 3} {" You can see that I type Type B's items: "2", "X": 5, "Y": 6, "Z": 7, "W": 6}

I am accumulating one type of things next to MongoDB makes it very easy. Just drag a document from the archive and it has all the appropriate fields / properties in "Magical".

However, if you have "data objects" or "entities", you can make your life easier 1, "Y": 2, "Z": 3} {1} "Type "," "A", "X" "_" ":" 2 "," Type ":" B "," X ": 5," Y ": 6," Z ": 7, "W": 6}

This makes it easy to write a factory class to load your object.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -