M
M
medbrat132020-06-11 00:43:28
NoSQL
medbrat13, 2020-06-11 00:43:28

What exactly can be stored in NOSQL databases?

Hello. While developing my next project, I thought it was time to try something new, besides the standard LNMP stack. Added several data types (likes, chats) about which I'm not sure. Therefore, I ask those who know , gurus and all those who understand NoSQL to answer one question: what can be stored in nosql databases?

I read a little about the differences and what types of data can be stored, but it's not clear to me what kind of data we are talking about. What kind of documents are meant in the MongoDB dock?
And what, for example, can be stored in Redis, Cassandra?

You can rephrase the question a bit like this: why would I need a nosql database? For what purpose specifically?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2020-06-11
@medbrat13

Everything can be stored. But nosql databases are different, sharpened for different tasks.
It is necessary to clarify what you base for.
memcached, for example, can also be said to be a Nosql database. Used to speed up access.
And mongodb is more like objects, not documents.
For example, you need to store such fields
as first name, last name, phone
first name, address
last name, initials, year of birth
phone, address, description
as you can see, the fields are different. Therefore, in a normal relational database, you would need to pre-create columns for each value. At the same time, if there are a lot of "voids" in the data, the place will often still be allocated. Plus, you will need to specify data types for each column.
And in mongodb, for example, you can simply store objects as they are: First
name: Vasya, Last name: Pupkin, phone number 02
First name: Petya, address: "Ostankino, 1" First
name: Vera, initials: "VB", year of birth: I can't tell
phone: "red", address: "Ostankino, 1", description: "something somewhere"
And each object is stored exactly with the fields that it contains.
In this case, the fields can be of different types.
In this case, you can normally use queries and various functions.
Yes, there are no joins here, but mongo is optimized to work with similar things and the size of the collections will not bother her too much.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question