ALTER TABLE ADD COLUMN – MySQL Shell Python style

We all know as SQL professionals that a common use of the ALTER TABLE command is that we can change a tables’ structure in a myriad number of ways. And, that’s a good thing too because chances are, you won’t always nail down the initial structure. Due to changing business or application requirements, you may even have to add additional columns that were not considered during the schema design phase. Suppose you have many tables that are structured similarly and they all need a specific column added to their already-existing design. Under certain circumstances, using the MySQL Shell in Python mode (\py), can reduce the number of manual ALTER TABLE statements you have to type. Continue reading to see examples in the MySQL Shell…

[Keep reading for more MySQL database and Python/PHP-centric content >>>]

Dynamic MySQL CREATE TABLE statement with pandas and pyodbc

Have you ever had to type out a massive CREATE TABLE statement by hand? One with dozens of columns? Maybe several dozens of columns? There are likely some GUI tools to help with large CREATE TABLE commands. Or, other drag-n-drop types of software that I am not familiar with. What if you could write a few lines of Python code and take care of a huge CREATE TABLE statement with way less effort than typed manually? Interested? Continue reading and see how using pandas, pyodbc, and MySQL…

[Keep reading for more MySQL database and Python/PHP-centric content >>>]

Exploring .count() and COUNT() – MySQL Shell Python mode

Retrieving a table count of rows using the COUNT(*) aggregate function in MySQL is a straight-forward query. What if I told you that with the MySQL Shell, there are actually 3 possible ways – between 2 Shell modes (\sql and \py) – to retrieve a table row count? Would you be interested in knowing about them? Honestly, one of the queries will not surprise you in the least bit, as you are likely already using it. However, the other 2 queries – in this context – are specific to MySQL Shell Python mode. You can likely execute these queries in Javascript Mode. However, I am not versed in Javascript programming nor MySQL Shell Javascript mode so those queries are not covered here. Continue reading to see the example queries in Python mode…

[Keep reading for more MySQL database and Python/PHP-centric content >>>]

Column meta-data in MySQL Shell with Python mode

Meta-data is important to SQL DBA’s and Developers, likely for different reasons. There are all sorts of ways to access meta-data. The powerful MySQL Shell in Python mode is no exception. What if you need the column meta-data on a result set? You can use the get_columns() method and obtain useful meta-data information about it (the result set). All in Python mode. Continue reading to see examples…

[Keep reading for more MySQL database and Python/PHP-centric content >>>]

Use Regular Expressions to gain insight on Content Grouping

Today’s post is a special one and a first-timer here on Digital Owl’s Prose. I am featuring a guest post by Edoardo Frasca.

Let’s meet Edoardo in his own words…

“Hey, I’m Edoardo!
I’m an Italian digital marketing enthusiast living in London.
My professional focus is on marketing, web analytics and data analysis.

After graduating at the School of Management and Economics in Turin (IT), I had to face what a lot of other graduates face: INEXPERIENCE when transitioning from university to work πŸ™‚
That’s why I decided to share a few tips and tricks around highly requested tools like, in this case, Google Analytics.

  • What is working well or not working at all on your website?
  • Which category of products is gaining traction?
  • Are the blog posts just published gaining interest?

I hope you’ll be able to answer some of those questions after reading this blog post, unlock the power of content grouping in Google Analytics!”

Now without any further delay, let’s enjoy Edoardo’s post, Advanced Content Grouping with Regular Expressionsβ€Š.

Thank you, Edoardo for guest-posting on my blog!