M
M
ML2016-07-02 17:08:55
PHP
ML, 2016-07-02 17:08:55

Switching to mongoDB?

I used to use mysql, and still liked everything, as a hierarchical structure was not needed.
And in principle, as I looked at noSql, it is more convenient. In general, I chose key-value (mongodb) I've
been sitting all day trying to figure it out. On nodejs, insert/update/delete/find seems to be understandable.
But in php, digging, digging, but nothing.
Generally I use php-7. And as I already understood new mongo();
It doesn’t roll there, dug up, something about MongoDB \ Driver \ Manager.
It would seem that everything is normal, it seems that I even understood how to add, edit and delete data.
But how to get them?! Couldn't find properties and methods.
In general, the question is this:
1) Why is it not necessary to create a specific user to write to the database.
2) How to read something from the database using php?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-07-02
Protko @Fesor

I used to use mysql, and still liked everything, as a hierarchical structure was not needed.

It would seem, and here mongodb. Muscle json can (although not so convenient), and I suspect that we are still talking about graphs. In this case, it is worth taking a graph database (Neo4j for example).
In a word, clarify your task.
We read the documentation.

E
Eugene Khablak, 2018-01-23
@jheka524

There is a wonderful ODM for php
phpmongo.readthedocs.io/en/latest/#connecting
I use it, I can't get enough

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question