Sunday, July 26, 2020

Learning Python and MySQL

I have started to revise on Python and started to learn MySQL during this COVID period.

Python is really versatile and easy to pick up assuming you have some basics of programming in your bones. It supports JSON and RESTful API out of the box so it makes my project setup so much simpler. The language structure is not as strict as C and closer to spoken language so it is a breeze to code.

There are also rich resources in the community to support your learning journey, including the very feature rich Python Integrated Development Environment (IDE) - Spyder, which is lightweight yet powerful.

I learnt that MySQL is largely similar to the MSSQL, the relational database language that I have learnt during my earlier working years while I was a still system administrator whose work involved a little scripting to extract data from a database format. SQL Express was the choice back then but for now I have opted to make use of MySQL in Azure.

Most important factor: MySQL is free to use and there is close to zero maintenance if it is hosted on Azure - just create the instance and start using!

The MySQL Workbench, as the name implies, is a client side tool for managing MySQL. It feels much more light-weight than the MSSQL Management Studio too.

Incidentally I had delve into learning NoSQL and found that it is not useful (read: useless) since it is non-relational. Consider the fact that data is useful only if it can be used in relation to other data. Therefore, to establish relationship between different data sets, the relationship itself needs to manifest somewhat into the data structure, and so comes the ever recurring problem where you need to keep redesigning the data structure so that the relationship keeps in par with the need of your project. In SQL one would usually just add a new column or a new table without affecting the existing columns and data.

In essence, forget the hype about NoSQL being schema-less and takes up less computing resources, it actually gives you more headache afterwards in having to keep updating/re-loading the data structure.

Nevertheless most web-based API are RESTful and within the JSON/NoSQL data structure, so learning to retrieve data from such sources is a necessity. However for storing my own data I would still stick with SQL.

No comments: