MySQL or PostGres? Why not both? Well …

I have some mini-projects that I would like to move off my laptop and onto the internet for further testing. Almost all my projects involve web-enabled databases, so I need to set up databases to handle the data used by the websites. For now, I want to stay away from NoSQL, which I something I don’t know yet. In that case, which to choose, MySQL or PostGres?

I’ve used MySQL forever. I think my first MySQL book (which I rarely use any more) discusses MySQL 3. I’ve appreciated the transition to MySQL 4, then 5. I know what it does. I have no trouble setting up MySQL PDO statements in PHP. I’m familiar with the MySQL Python modules and can also connect that way, too. However …

MySQL is owned by Oracle. Ever since it was bought by them, there has been an underlying question about how much support the community (free) edition would receive. Oracle’s latest financial snapshot came out recently (June 2016). They made most of their money with their cloud offering, as I understand it. They made no money in support or development. You have to wonder how much longer MySQL will keep going before it stagnates. I could move over to MariaDB, the “open source” version of MySQL, as strange as that sounds. I’m thinking that if I’m going to use a MySQL copy, why not use MySQL?

A few years ago, I took a Saas class through a Berkeley MOOC (CS 169, Agile Development Using Ruby on Rails). They set up accounts on Github and Heroku for their students. I liked how easy it was to migrate code and data onto the cloud using both platforms. My problem at the time was that I was not familiar with them, so it was one more thing I had to learn quickly while taking the class. Ruby favors Postgres as the database and Heroku made it easy to move the data through the command line interface installed through their app. If I’m going to host my projects on the cloud, then I should stick to what makes it easy.

However, I’m very familiar with MySQL. It’s easy to install. I know how to do basic hardening of the database. It’s easy to read/write to MySQL from PHP, using proper credentials. I’m starting over with Postgres. The stock version of PHP that comes with El Capitan does not handle PDO calls to Postgres by default. I have to compile them myself. Which Postgres do I install? Is Postgres.app really that much better? So many questions that I need to answer.

And now I’m looking at cloud services in addition to Heroku. AWS Elastic Beanstalk to use with Docker. Digital Ocean (super cheap). Linode (not as cheap, but I have considered them before.) Hmm …

Advertisements

Still valid!

I knew I had written about using Mercurial and Git at the same time. I realized this would be useful when I decided to rebuild a helper application and (eventually) post it to Heroku. Heroku uses git to push files back and forth. As mentioned before, I used Mercurial first and was used to it. I want to stick with it because I’m used to to SourceTree, their desktop client. I followed my old instructions and it worked.

I noticed that Github allows unlimited private repositories. That was one of the reasons why I initially chose Bitbucket over Github so many years ago. I still have to pay $7/month, which I don’t have to do with Bitbucket. Ideally, the school would pay for it, but that’s not happening for a while.

(future me here)

I know why I did not drop Bitbucket entirely. It’s the free private repositories that I like. What I should have done is created the repo as a Git repo and saved that up to Bitbucket. I was not thinking.