SQL CRUD Compilation

SQL CRUD is everywhere in the database world. Be it application development or ad-hoc queries in analysis, there is a strong chance you are executing one of the CRUD commands: Create, Read, Update, or Delete. Having written several blog posts in the past on MySQL CRUD, I feel you the readers deserve an easy means to access them all. Therefore, consider this post the MySQL CRUD Compilation post. Enjoy!

[Keep reading for more SQL database and Python-centric content >>>]
Advertisements

MySQL DATE Calculations using INTERVAL – with examples

Recently in my day job, while developing the back-end of a reporting dashboard with PHP and MySQL, I noticed some interesting differences in DATE math calculations. The examples used in this post are purely arbitrary but stem from lessons learned, therefore, I feel they are definitely worth sharing…

[Keep reading for more SQL database and Python-centric content >>>]

CREATE TABLE using Python in the MySQL Shell – with examples.

Not only are basic SQL CRUD operations supported in MySQL Shell Python mode, but you can also execute DDL commands such as CREATE TABLE. While there is not a specific create_table() method per se, there is a sql() method for this – and other – types of commands that don’t have an individual method such as those for each of the individual CRUD operations. Keep reading to see a simple example use of the sql() method…

[Keep reading for more SQL database and Python-centric content >>>]

MySQL Shell CRUD With Python: Update – with examples

Using MySQL Shell in Python mode to CREATE and SELECT records are straight-forward processes using the insert() and select() methods respectively. However, we are fully aware that seldom is the case in which some of that data does not change. So how do we modify or change the data we have on-hand? In SQL, UPDATE takes care of that. We can also apply the same UPDATE command in MySQL Shell Python mode with the update() method. Just as in SQL, you use the SET clause, so too do you use it with update() by way of the set() method. Keep reading to see examples of these methods combined with the where() method for specific, targeted updates…

[Keep reading for more SQL database and Python-centric content >>>]

MySQL Shell CRUD with Python: Create – with examples.

I honestly feel like MySQL hit a home run with the release of version 8. Having included so many fantastic features, it is hard to single one out above the others. However, there is one – besides Window Functions – that is really a game-changer. To be exact, the one actually makes 3 (whatever kind of sense that makes). I am talking about the MySQL Shell, the Document Store, and the X DevAPI. The focus of this post is on the Shell itself. What is it about the Shell that intrigues me? I’m sure your curiosity is piqued so keep reading to find out about the functionality you simply cannot ignore… [Keep reading for more SQL database and Python-centric content >>>]