![]() ![]() In short, it probably matches your object model more closely than your average RDBMS schema. There are exceptions, but this is a good place to start. In addition to cascading deletes, other key signs that your objects belong in the same document are where a foreign key is part of a primary key, most 1:1 relationships, and nearly anywhere that you would never read from a "child" table row without first reading from the "parent" table row. You wouldn't have those other items without the parent object. In the event a person is deleted, you'd delete the addresses, phone numbers, and IM accounts with them or cascade the delete. For a person, addresses, phone numbers, and IM accounts are all examples of things that do not usually require another document and are embedded in the parent object in MongoDB. ![]() ![]() For SQL developers this requires changing the way of thinking about data and connections between them. If we decide to select Non-Relational MongoDB, let’s use it properly. A new project is created and you can start modeling your database structure. Select MongoDB project type and click Create a new project. We should already know when to use relational and Non-Relational DBS. To create a new project in Moon Modeler click the New item on the toolbar. Fortunately, some RDBMS skills port over easily - but schema design isn't one of them. MongoDB schema design for SQL developers. We don't truly care about duplicates (meaning two people with the same address might result in rows of the same address in the table that differ only in their key) - we only care that we can add your beach house to your personnel record so that we can find you. How to screw up your MongoDB schema design. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |