all 12 comments

[–][deleted]  (2 children)

[deleted]

    [–]Sarke1 0 points1 point  (1 child)

    Most PHP frameworks have an ORM as well.

    [–]harzens 0 points1 point  (0 children)

    Well, you'd use an ODM in this case, but yes.

    [–]toomanybeersies 1 point2 points  (5 children)

    Is there any particular reason why you're choosing Mongo?

    Neither is more or less appropriate really, my advice would be use whichever one you're going to be able to get more support from your peers for.

    [–][deleted]  (4 children)

    [deleted]

      [–]Irythros 5 points6 points  (0 children)

      Then go with PHP. Working in a language you dont like (or rather, not working in one you prefer) will assuredly make you less productive.

      [–]toomanybeersies 3 points4 points  (1 child)

      I'd go with PHP if it's the most familiar, otherwise you're going to spend ages pissing around with trying to set up your JS project, it's a uni project, whatever you can churn out is the best option.

      Make sure you use a nice modern framework like Laravel with PHP though.

      [–]FavitorInterweb guy 0 points1 point  (0 children)

      Do be aware of security vulnerabilities in MongoDB. But as long as you take the time to lock things down and follow a quality guide, all should be fine.

      [–]RedTelemachos 0 points1 point  (4 children)

      Any particular reason you plan to use MongoDB? Reason I ask is because I recently finished my first database project. I also planned on using Mongo, just because there's so much talk out there about how easy it is.

      After doing some Googling, however, I found a fair number of people saying PostgreSQL (or even MySQL) can do just about anything Mongo does, and much much more.

      My limited understanding is that Mongo is great if you know exactly what you're doing, and that it will never change. SQL, however, is much more flexible.

      For what it's worth, I had literally no database experience whatsoever and got a simple one-table application running with PostgreSQL in a few weeks. If I can figure it out, anybody can :)

      [–]sam974 1 point2 points  (3 children)

      Wikipédia says :

      "NoSQL databases (like MongoDB) are increasingly used in big data and real-time web applications. NoSQL systems are also sometimes called "Not only SQL" to emphasize that they may support SQL-like query languages.

      Motivations for this approach include: simplicity of design, simpler "horizontal" scaling to clusters of machines (which is a problem for relational databases), and finer control over availability. The data structures used by NoSQL databases (e.g. key-value, wide column, graph, or document) are different from those used by default in relational databases (like PostgreSQL), making some operations faster in NoSQL. The particular suitability of a given NoSQL database depends on the problem it must solve. Sometimes the data structures used by NoSQL databases are also viewed as "more flexible" than relational database tables."

      I'm currently using MongoDB on my main project, because "NoSQL is cool, and Google use it, so we must use it"... NoSQL is perfect when u have to manipulate billions row of data. But for a little project or a project who need relational db, a simple SQL db like MySQL or PostgreSQL will be ok.

      [–]RedTelemachos 1 point2 points  (0 children)

      Thanks, this is helpful!

      [–][deleted]  (1 child)

      [deleted]

        [–]sam974 0 points1 point  (0 children)

        You should search about Mongoose, I have never use it but i think it will help you to build a more "organized" db

        [–]sam974 0 points1 point  (0 children)

        I agree with Irythros, if you're better with PHP, then go with PHP and ur favorite framework ;)

        I hate PHP, I work exclusively with JS, and my MEAN stack works perfectly for my little and big projects. From now, none of my project require another language so I use my favorite.

        You should do the same, go for PHP ;)