MongoDB vs MySQL

They both conveniently start with M so whether it is MEAN or MERN, I suppose that the M could stand for both. I’ve used both databases extensively for a while and wanted to compare the two. So the ultimate question I suppose is… which one is better? Mongo or MySQL. Would MySQL be better off with the No than the My?

The answer I have to say is… it depends on what you’re doing.

Personally I like working with MongoDB more because I like coding in Javascript. When working with MongoDB in my projects, it feels like you do not necessarily have to learn a whole new syntax to make MongoDB queries. Also there is a big convenience in forgoing relational databases and using container databases (a document model being the container to be more clear). MongoDB uses nesting in order to set up relationships between data sets so the tree like database structure makes it very easy to grasp and understand the flow of information. The simplicity of the database in addition to easy query commands that can be chained together to run with an ‘.exec’ command makes MongoDB very easy to learn, use, and it is very effective.

As a result, I recommend MongoDB but ONLY for small, medium-size projects. What determines the size of a project you ask? Well I would say that size is synonymous with complexity. The more RELATIONSHIPS you need among your data tables, the more power and flexibility you need. The tree-like nested design of MongoDB which makes MongoDB easy to learn and use actually becomes a drawback once your application grows in complexity and is in need of a more powerful, dynamic, and flexible database.

To explain RELATIONSHIPS better to those who need a more visual example, suppose you have holiday decorations for Easter, Halloween, and Christmas. MongoDB can be seen as a container database in which you would store your decorations accordingly in a box for Easter, another box for Halloween, and the third box for Christmas. When Halloween comes around and you need to pull out all the Halloween decorations, it is very convenient to find all the items in one location. That is what makes MongoDB so easy to set up and use.

However, suppose that you receive new holiday tablecloths for your decorations and need to replace the ones you already have. It would be tedious for you to sort through each box and pull out the tablecloth and replace the item one by one.

MySQL makes it so that whenever you need to replace items for your decorations, you can do it all in one place. What MySQL does is get one giant box, throw all the content of the three holidays boxes in there, sorts through all the material, and pulls out the tablecloths you need to replace. You give instructions on how MySQL throws the contents into the one giant box (called JOINS in MySQL) and you are able to make adjustments accordingly in one place.

That is what is meant by RELATIONAL database. MySQL sets up flexible and customizable relationships between data tables (or holiday decoration boxes) so that the user does not have to go through separate data tables in order to make data adjustments.

MySQL is definitely the database you need to use for complex applications like business support systems for enterprises. Although MongoDB is effective for a group of developers the size of one to ten people, if the organization has dozens of developers who need to set up and make their own data without having to depend too much on others, then MySQL makes this possible. However, because MySQL is more powerful, there is a significantly higher learning curve than MongoDB. MySQL has its own syntax and you need to approach it as if you are learning a completely new programming language (because it is).

As a result, both MongoDB and MySQL has its pros and cons. Both are very popular and well supported by the tech community so learning either one would not be a bad idea.

For absolute beginners though, I recommend using MongoDB first so that beginners can focus more on learning the art of coding rather than being bogged down by additional complexity that can be learned later. It was painful for me to learn MySQL at the same time as learning web development. I realize now it was certainly not something I had to learn at the very start of my programming journey.

However, for more experienced people who are very familiar with HTML, CSS, Javascript, and making API requests, then I would recommend learning MySQL over MongoDB as MySQL would be able to do everything that MongoDB can do and offer more powerful capabilities. Also I think there are more jobs out there that require knowing MySQL over MongoDB.

Biggest Lesson from Learning Fuze

10 days ago, I completed the 12-week Full Immersion Program at a programming Bootcamp called Learning Fuze in Irvine, California. The journey was very rewarding and I am very grateful for the incredible staff and the resources they provided for us. The biggest takeaway lesson that I learned was the importance of teamwork. It may be strange that I say this considering that I volunteered to do the program’s final project solo when the solo option was made available. I remember my instructor pulling me aside to encourage me to join a group instead and that the institution offers awards to those who greatly help others in their teams.

The reason I declined was that I had spent 3 years in the programming industry where highly skilled developers were often worshiped by upper managers. I found tragic yet understandable that upper managers often overlooked these developers’ unwillingness to work with others, share their skill sets, and socialize with others as long as they got the work they needed to get done in a timely fashion. These individuals often indirectly promoted an air of fierce competition that now I see, was silently toxic to our department.

There were times when these developers politely declined the assistance of other developers explaining that their involvement would slow down their progress. I would agree with their decisions, but interestingly I cannot recall a single collective project that succeeded as a whole when these developers would have to come together and merge all their work into one product. What were superior apps individually became unusable, irreparable products when these apps had to be combined into one comprehensive product.

The unfortunate result was that individuals succeeded but groups failed. People like myself were incentivized not to work with anybody. I suspect the reason my instructor pulled me aside and encouraged me to join a group was that he too had seen these things happen many times in his professional career.

Yes, it is important to develop self-reliance skills, but I learned that there is only so much that only one person can do when developing a quality product. There is just too much workload and too many technical skill sets that are necessary.

I feel that teamwork is too often times undervalued in corporations and that upper management too often relies on the quick gains they can gain by glamorizing individuals. They do so at the expense of promoting collaboration and they sacrifice the health and benefits that could be gained for the whole in the long run.

The reason Learning Fuze was such a memorable experience was that the warm positive team atmosphere I got from my cohort was a welcome change in my daily life. I do not take for granted the time that I spent there and I will always remember the incredible level of dedication from my instructors. It is my hope that I continue meeting such wonderful people in my next journey.

My First Post

Genesis 1:1-5 GNT

In the beginning, when God created the universe, the earth was formless and desolate. The raging ocean that covered everything was engulfed in total darkness, and the Spirit of God was moving over the water. Then God commanded, “Let there be 1111111111’s!!!” – and 1’s appeared. God was pleased with what he saw. Then he separated the 1 from the 0, and he named the 1 “true” and the 0 “false.” Evening passed and morning came-that was the first day.