Nafine
Nafine

Reputation: 81

What kind of data is not relational?

I noticed Storing relational data in MongoDB (NoSQL).

I've been trying to get my head around NoSQL, and I do see the benefits [...]

What I can't understand, and hope someone can clear up, is how to store data if it must be relational.

User David commented, "If data is relational, store it in a relational database."

What useful or significant data isn't relational?

You never just have, say, users with maybe addresses, end of story.

users always have associated comments/posts/favorites/reviews/friends, or whatever.

Look at any app. Look at Zillow. houses have one address. But they're also in school_districts, which contains many other houses. Now it's relational.

I've never seen an application where associations within the data model were dispensable. Or that lacked any entities that needed to be associated with more than one other entity.

What type of data is like that?

Upvotes: 4

Views: 208

Answers (2)

Mickael
Mickael

Reputation: 4558

To answer to your question, I think that data model with no relation between the different entities is very unlikely. MongoDB can handle relational data model but if your data model have a lot of relations, I recommend to not use Document-Oriented NoSQL database such as MongoDB.

I suggest you to take a look the following MongoDB documentation. These MongoDB docs explain how to represent data your MongoDB database.

  • Data Modeling Introduction (link)
  • Thinking in Documents: Part 1 (link)
  • Thinking in Documents: Part 2 (link)

Upvotes: 1

SJoos
SJoos

Reputation: 91

An example I can provide is something I'm working on right now. It's pure binary data blobs taken from measurements, which also has to be stored somewhere in a database. MongoDB is one of the more popular databases for such data. The only relation that could be necessary is keeping metadata about said measurement, like the Date/Time of recording.

Upvotes: 1

Related Questions